I'm facing an issue with SmartConfig on ESP32 (ESP-IDF). According to the logs, the SSID is correctly decoded during the process, but when I receive the GOT_SSID_PSWD event, the evt->ssid field contains unexpected characters instead of the correct SSID.
Details:
Here are the relevant logs:
Code: Select all
I (17221) smartconfig: T|pswd: foobar
I (17221) smartconfig: T|ssid: anaconda
I (17221) smartconfig: T|bssid: 34:27:92:38:57:b3
I (17231) wifi:ic_disable_sniffer
- (17231) jsWifi.c:400 scEventsDecoder - evt->ssid length:8 data:dC�?dC�?
SmartConfig event {"id":"GOT_SSID_PSWD","ssid":"dCC\u0019\u0000\u0000","password":"foobar","bssid":[52,39,146,56,87,179],"cellphoneIp":[192,168,0,192],"ackToken":23}
relevant code:
Code: Select all
switch( event_id ) {
case SC_EVENT_GOT_SSID_PSWD:
smartconfig_event_got_ssid_pswd_t *evt = (smartconfig_event_got_ssid_pswd_t *)event_data;
TRACE("evt->ssid length:%d data:%s", strnlen((char*)evt->ssid, sizeof(evt->ssid)), evt->ssid);
As you can see, T|ssid: anaconda is correctly logged during decoding, but when I handle the GOT_SSID_PSWD event, evt->ssid contains corrupted data (dCC\u0019\u0000\u0000).
Any insights would be greatly appreciated! Thank you in advance for your help.