Using Wi-Fi with ESP-MDF
Posted: Tue Mar 12, 2019 11:26 am
Hi All,
I recently started working with the ESP-MDF framework. I want to use the Wi-Fi with mesh. I went through the ESP-mesh documents https://docs.espressif.com/projects/esp ... _mesh.html which says:
"When self organized networking is enabled, the ESP-MESH stack will internally make calls to Wi-Fi driver APIs. Therefore, the application layer should not make any calls to Wi-Fi driver APIs whilst self organized networking is enabled as doing so would risk interfering with ESP-MESH."
Since this document falls in the ESP-Mesh section under ESP-IDF, I'm not sure if this is also applicable to the ESP-MDF framework. When I call the "wifi_sta_init()" API within the code, it crashes.
The page https://docs.espressif.com/projects/esp ... nce/mwifi/ says:
"If you want to call Wi-Fi API to connect/disconnect/scan, please pause Mwifi first."
Is this the answer to my question? If so, do I "pause Mwifi" with the "mwifi_stop()" API, and resume it with "mwifi_start()"?
Also, I noticed when I pass the ".router_ssid" and ".router_password" to the "mwifi_config_t" structure, my root node connects to the WiFi successfully. Are there any "mwifi" APIs rather than "wifi" APIs to communicate with the router?
Please guide me through how to use Wi-Fi within the ESP-MDF framework or even point me to the right example? That would be very helpful.
Sorry for the multiple questions . Since they were all related, I preferred to go on a single post.
Thanks,
Karan
PS: I earlier posted this question on the general discussion section. Later moved it here.
I recently started working with the ESP-MDF framework. I want to use the Wi-Fi with mesh. I went through the ESP-mesh documents https://docs.espressif.com/projects/esp ... _mesh.html which says:
"When self organized networking is enabled, the ESP-MESH stack will internally make calls to Wi-Fi driver APIs. Therefore, the application layer should not make any calls to Wi-Fi driver APIs whilst self organized networking is enabled as doing so would risk interfering with ESP-MESH."
Since this document falls in the ESP-Mesh section under ESP-IDF, I'm not sure if this is also applicable to the ESP-MDF framework. When I call the "wifi_sta_init()" API within the code, it crashes.
The page https://docs.espressif.com/projects/esp ... nce/mwifi/ says:
"If you want to call Wi-Fi API to connect/disconnect/scan, please pause Mwifi first."
Is this the answer to my question? If so, do I "pause Mwifi" with the "mwifi_stop()" API, and resume it with "mwifi_start()"?
Also, I noticed when I pass the ".router_ssid" and ".router_password" to the "mwifi_config_t" structure, my root node connects to the WiFi successfully. Are there any "mwifi" APIs rather than "wifi" APIs to communicate with the router?
Please guide me through how to use Wi-Fi within the ESP-MDF framework or even point me to the right example? That would be very helpful.
Sorry for the multiple questions . Since they were all related, I preferred to go on a single post.
Thanks,
Karan
PS: I earlier posted this question on the general discussion section. Later moved it here.