- esp_wifi_start()
- esp_wifi_set_config(WIFI_IF_AP, ...)
- esp_wifi_set_mode(WIFI_MODE_AP)
Correct order of API calls to become an access point ...
Correct order of API calls to become an access point ...
When looking at the API to become an access point, I see that there are three APIs of interest:
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: Correct order of API calls to become an access point ...
*bump*
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32
Re: Correct order of API calls to become an access point ...
Set mode -> Set config -> Start works fine for me. After starting, I can switch between modes using just esp_wifi_set_mode without needing to touch anything else.
As for a state diagram, I'm not sure, but it would be quite helpful to have one that encompasses everything from start to finish, including when the various events are raised.
Code: Select all
ESP_ERROR_CHECK( esp_wifi_set_mode(WIFI_MODE_AP) );
wifi_config_t apConfig = {
.ap = {
.ssid="SomeSSIDHere",
.password = "SomePasswordMoreThan8Chars",
.ssid_len = 0,
.channel = 0,
.authmode = WIFI_AUTH_WPA2_PSK,
.ssid_hidden = 0,
.max_connection = 4, // how many clients to allow?
.beacon_interval = 100 // default value
}
};
ESP_ERROR_CHECK( esp_wifi_set_config(WIFI_IF_AP, &apConfig) );
ESP_ERROR_CHECK( esp_wifi_start() );
Who is online
Users browsing this forum: No registered users and 297 guests