cancel
Showing results for 
Search instead for 
Did you mean: 

Switch between thernet and wifi (I.e. ESP8266 ESP32) or even usb device

MEdgerton
Senior

I would like to know how to use the middleware lwIP but then be able to switch the the interface to a wifi if needed.

2 REPLIES 2
TDK
Guru

In general, lwIP is set up to use a single, fixed interface. I believe it can support multiple different interfaces (ethernet + wifi) but the examples you find likely won't support this out of the box and it would take some development on your part to do the "switch between them" part.

USB is something else entirely, I don't see what that has to do with ethernet/wifi/lwIP.

If you feel a post has answered your question, please click "Accept as Solution".

Is it possible to use a single external fixed WiFi device then? If so do I use the SLIP part of lwIP or is there a netif I need to write for the ESP8266/ESP32? Does something exist already. The Nucleo boards seem so well supported with the ethernet its hard to see why there isnt a WiFi plug in for it (I see there was but it looks discontinued).

For the USB I meant that as it can act as a host, in theory you could use a USB WiFi device. That would be harder than a standard serial, so I'll stick with the serial option if its supported.

Any suggestions on existing projects for this would be great, or an example of how to write the netif and get it linked so the CubeIDE can select it as the network connection for the lwIP middleware. Currently you select the ethernet as a drop-down and this would have to be overridden or added to so if I change the middleware config it doesn't break all the wifi netif code.