File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -130,8 +130,16 @@ static esp_err_t event_handler(void *ctx, system_event_t *event) {
130
130
system_event_sta_disconnected_t * disconn = & event -> event_info .disconnected ;
131
131
ESP_LOGI ("wifi" , "STA_DISCONNECTED, reason:%d" , disconn -> reason );
132
132
switch (disconn -> reason ) {
133
+ case WIFI_REASON_BEACON_TIMEOUT :
134
+ mp_printf (MP_PYTHON_PRINTER , "beacon timeout\n" );
135
+ // AP has dropped out; try to reconnect.
136
+ break ;
137
+ case WIFI_REASON_NO_AP_FOUND :
138
+ mp_printf (MP_PYTHON_PRINTER , "no AP found\n" );
139
+ // AP may not exist, or it may have momentarily dropped out; try to reconnect.
140
+ break ;
133
141
case WIFI_REASON_AUTH_FAIL :
134
- mp_printf (MP_PYTHON_PRINTER , "authentication failed" );
142
+ mp_printf (MP_PYTHON_PRINTER , "authentication failed\n " );
135
143
wifi_sta_connected = false;
136
144
break ;
137
145
default :
You can’t perform that action at this time.
0 commit comments