Page 1 of 1

How to determine SSID length from wifi_ap_record_t?

Posted: Sun Jul 30, 2017 4:10 pm
by RobinC
The IEEE wifi standard ( standards.ieee.org/getieee802/download/802.11-2012.pdf ) defines SSIDEncoding field. It can be UNSPECIFIED (for arbitrary data) or UTF8. That means that the SSID may contain NULL ('\0') characters. It also specifies that the SSID may be 0-32 octets in length.

The typedef struct wifi_ap_record_t (which is returned from a wifi scan) includes ssid but no ssid_len field so the length cannot be determined. Should one treat this as an opaque blob and always fill in the full 32 octets when using ssid in esp function calls?

Note also that wifi_ap_config_t includes ssid_len but wifi_sta_config_t does not.

Robin

Re: How to determine SSID length from wifi_ap_record_t?

Posted: Thu Aug 03, 2017 5:56 pm
by RobinC
Ok, I'm assuming that since there was no response that this is a design issue in esp-idf. I'll submit an issue to the github project.

Robin