Page 1 of 1

ESP32 soft AP ssid can`t set >6 bytes

Posted: Fri Mar 03, 2017 7:00 am
by long585

Code: Select all

ap_ssid:ZONCARE_041d1d
ap.ssid size:14
I (819) zq_wifi_test: Setting WiFi configuration AP SSID:ZONCARE_041d1d,STA SSID:My iPhone
I (1489) wifi: mode : sta (24:0a:c4:04:1d:1c) + softAP (24:0a:c4:04:1d:1d)
this is my setting,on my iphone i only see the ap ssid is ZONCAR.

Re: ESP32 soft AP ssid can`t set >6 bytes

Posted: Fri Mar 03, 2017 1:40 pm
by kolban
To configure WiFi we need to call the function esp_wifi_set_config(). This has a unionized structure called wifi_ap_config_t contained within it to set the access point details. This structure has two pertinent fields for this discussion:

Code: Select all

char ssid[32]
uint8_t ssid_len
The ssid contains the network identity. The ssid_len field contains the length of the ssid in bytes.

In your code, are you setting the ssid_len field?

It has a special value of 0 ... if set to 0 then the ssid length will be determined by calculating the length as a NULL terminated string of the ssid.