ESP32 soft AP ssid can`t set >6 bytes

long585
Posts: 11
Joined: Mon Dec 26, 2016 8:19 am

ESP32 soft AP ssid can`t set >6 bytes

Postby long585 » Fri Mar 03, 2017 7:00 am

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.

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

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

Postby kolban » Fri Mar 03, 2017 1:40 pm

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.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

Who is online

Users browsing this forum: No registered users and 91 guests