Commit fc0dc09
committed
webrepl: Support LAN interfaces and fix WLAN AttributeError.
On ports without network.WLAN (such as the ESP32-P4 port), webrepl
crashes on webrepl.start() because network.WLAN is accessed
unconditionally in setup_conn().
Add LAN interface support, add try/except around LAN and WLAN access,
and add fallback to 0.0.0.0:<port> if no active interface is found.
Based on #920 by @Romaric-RILLET.
Signed-off-by: AsinoEsel <lerefff@gmail.com>1 parent 09a33ee commit fc0dc09
2 files changed
Lines changed: 18 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
109 | 122 | | |
110 | 123 | | |
111 | 124 | | |
| |||
0 commit comments