Page 1 of 1

Wi-Fi Reason Code

Posted: Sat Mar 16, 2019 2:19 pm
by arunbm123
hello all

This could be most silly question but I am finding it difficult.

In case SYSTEM_EVENT_STA_DISCONNECTED:
I would Like to get Wi-Fi Reason Code here to check the reason for disconnection , How to get ?

Thanks

Re: Wi-Fi Reason Code

Posted: Sat Mar 16, 2019 4:08 pm
by fly135
system_event_sta_disconnected_t *disconnected = &event->event_info.disconnected;
printf("SYSTEM_EVENT_STA_DISCONNECTED, ssid:%s, ssid_len:%d, bssid:" MACSTR ", reason:%d\n", disconnected->ssid,
disconnected->ssid_len, MAC2STR(disconnected->bssid), disconnected->reason);