Open SrivamsiMalladi opened 1 year ago
From my understanding of the RIOT-OS's WiFi Network Interface for ESP32, it is
- only possible to specify the mode (Station or SoftAP) in the makefile before building the application
- not possible to scan for available networks
- only possible to specify the SSID and password of the network to connect to in the makefile or during the make command
You are absolutely right, the WiFi interface is statically configured at compile time. There have been no plans to change this yet.
The reason for this is the design of how RIOT handles network devices. In RIOT, network devices are statically configured at compile time and enabled at system startup. For the protocol stack, the network device is then just available regardless of whether it is an Ethernet or WiFi interface. Thus, there was no need to change the WiFi interface mode or change WiFi parameters at runtime, or search for available WiFi networks.
The correct approach to implement such features would be
esp_wifi
netdev driver,NETOPT_WIFI_SSID
, NETOPT_WIFI_AP_AVAIL
, a.s.o., andget
and set
to call these functions.You are welcome to contribute your ideas or even better the code :smile:
Hello @gschorcht. I would like to try implementing these features. I would like to start with adding support for changing the SSID and PASS in STA mode during runtime. So, if I understood correctly, I need to
NETOPT_WIFI_SSID
, NETDEV_WIFI_PASS
to the enum netopt_t in the netopt.h (netopt configuration options)_esp_wifi_get()
and _esp_wifi_set()
fucntions.Then to use the functionality I wanted, I need to set the SSID and PASS in the netdev (esp_wifi_netdev_t) using the netdev.set(), which is currently being initialized by the auto_init_esp_wifi() in the init.c. My question is, when I change the SSID and PASS using .set(), does the ESP32 automatically try to connect to this new Wi-Fi, or some reload()/reinit() kind of function must be called to reinitialize the Wi-Fi driver to consider the new Wi-Fi credentials?
( I have only used drivers/internal files directly till now. Never tried to mess around with the internal driver files. So. sorry if I am asking too many or silly questions.)
Description
I am looking forward to using RIOT-OS with ESP32 for developing IoT applications for which I will need certain features like
From my understanding of the RIOT-OS's WiFi Network Interface for ESP32, it is
Please let me know if these features are already available or if I am missing something related to these features.
Useful links