File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed
ports/raspberrypi/common-hal/wifi Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -206,18 +206,12 @@ void common_hal_wifi_radio_stop_ap(wifi_radio_obj_t *self) {
206
206
}
207
207
208
208
if (cyw43_tcpip_link_status (& cyw43_state , CYW43_ITF_AP ) != CYW43_LINK_DOWN ) {
209
- mp_raise_NotImplementedError (translate ("Stopping AP is not supported." ));
209
+ // Disassociate from WLAN
210
+ cyw43_wifi_leave (& cyw43_state , CYW43_ITF_AP );
211
+ // Stop AP
212
+ cyw43_wifi_set_up (& cyw43_state , CYW43_ITF_AP , false, 0 );
213
+ bindings_cyw43_wifi_enforce_pm ();
210
214
}
211
-
212
- /*
213
- * AP cannot be disconnected. cyw43_wifi_leave is broken.
214
- * This code snippet should work, but doesn't.
215
- *
216
- * cyw43_wifi_leave(&cyw43_state, CYW43_ITF_AP);
217
- * cyw43_wifi_leave(&cyw43_state, CYW43_ITF_STA);
218
- *
219
- * bindings_cyw43_wifi_enforce_pm();
220
- */
221
215
}
222
216
223
217
static bool connection_unchanged (wifi_radio_obj_t * self , const uint8_t * ssid , size_t ssid_len ) {
You can’t perform that action at this time.
0 commit comments