webrepl: Support LAN as well as WLAN boards.
When webrepl starts, it prints out the IP address to stdout, however it does this by querying the network.WLAN object -- https://github.com/micropython/micropython-lib/blob/master/micropython/net/webrepl/webrepl.py#L105
This should also try network.LAN (and not fail if network.LAN xor network.WLAN are unavailable).
WebREPL on WIZnet W5500-EVB-Pico
The a.m. board contains both the webrepl modules (webrepl.py and webrepl_setup.py). I was able to set up webrepl. However, the next time I started the board, webrepl.start() failed because the setup_conn() function expects the network interfaces class network.WLAN to exist (see lines 104ff in webrepl.py). However, on this ethernet based board, no such class exists. It seems webrepl is only meant for WiFi enabled boards.
These are the possible resolutions:
- Don't include the 'webrepl' module in the board firmware (i.e. don't include 'bundle-networking' in the boards manifest.py)
- Modify webrepl.setup_conn() function such, that it works on this board as well.