How to determine SSID length from wifi_ap_record_t?

RobinC
Posts: 45
Joined: Sat Feb 04, 2017 5:29 pm

How to determine SSID length from wifi_ap_record_t?

Postby RobinC » Sun Jul 30, 2017 4:10 pm

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

RobinC
Posts: 45
Joined: Sat Feb 04, 2017 5:29 pm

Re: How to determine SSID length from wifi_ap_record_t?

Postby RobinC » Thu Aug 03, 2017 5:56 pm

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

Who is online

Users browsing this forum: Bing [Bot], ESP_Sprite and 101 guests