Skip to content

Commit 851c2cd

Browse files
paul-1bill88t
authored andcommitted
picow: Add channel setting when starting AP
1 parent 8fdb2df commit 851c2cd

File tree

1 file changed

+4
-0
lines changed
  • ports/raspberrypi/common-hal/wifi

1 file changed

+4
-0
lines changed

ports/raspberrypi/common-hal/wifi/Radio.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,10 @@ void common_hal_wifi_radio_start_ap(wifi_radio_obj_t *self, uint8_t *ssid, size_
174174
// Is there a better way?
175175
common_hal_wifi_radio_stop_station(self);
176176

177+
// Channel can only be changed after inital powerup and config of ap.
178+
// Defaults to 1 if not set or invalid (i.e. 13)
179+
cyw43_wifi_ap_set_channel(&cyw43_state, (const uint32_t)channel);
180+
177181
cyw43_arch_enable_ap_mode((const char *)ssid, (const char *)password, CYW43_AUTH_WPA2_AES_PSK);
178182
// TODO: Implement authmode check like in espressif
179183
bindings_cyw43_wifi_enforce_pm();

0 commit comments

Comments
 (0)