Open yann-l opened 1 year ago
I'm not very familiar with this driver but it looks like the WiFi mode is set only once on init, and not allowed to be changed after: https://github.com/arduino/ArduinoCore-renesas/blob/main/libraries/lwIpWrapper/src/CNetIf.cpp#L181
I'm not sure if there's an easy fix for this, I don't see any tear down/clean-up functions to disable the link and any DHCP client/server that might be running, free the interface etc... so it can be re-enabled cleanly using a different mode. Note it should be possible to support STA/AP simultaneously using different interfaces, but since the interface is managed by a Singleton it seems impossible to support that either.
It seems it's not posible to switch from WiFi client mode to WiFi AP mode. To reproduce, I took the AP_SimpleWebServer example, and added a call to WiFi.scanNetworks() before the WiFi.beginAP() :
Same problem : if I connect to a wifi, then want to switch to AP mode, it's not possible to connect to the access point (the IP configured with WiFi.config() is not used, the phone cannot connect to the AP)