Skip to content

Commit e817563

Browse files
committed
Update cyw43-driver, fix no-password wifi
Now, open wifi works on Pico W, so this closes #7438. For the web workflow it's now OK to either * specify an empty password string (as before) * not have the CIRCUITPY_WIFI_PASSWORD key at all (new functionality)
1 parent 0ed5c2d commit e817563

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

ports/raspberrypi/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ SRC_SDK := \
233233
$(SRC_SDK_CYW43) \
234234

235235
SRC_SDK := $(addprefix sdk/, $(SRC_SDK))
236-
$(patsubst %.c,$(BUILD)/%.o,$(SRC_SDK) $(SRC_CYW43)): CFLAGS += -Wno-missing-prototypes -Wno-undef -Wno-unused-function -Wno-nested-externs -Wno-strict-prototypes -Wno-double-promotion -Wno-sign-compare -Wno-unused-variable -Wno-strict-overflow
236+
$(patsubst %.c,$(BUILD)/%.o,$(SRC_SDK) $(SRC_CYW43)): CFLAGS += -Wno-missing-prototypes -Wno-undef -Wno-unused-function -Wno-nested-externs -Wno-strict-prototypes -Wno-double-promotion -Wno-sign-compare -Wno-unused-variable -Wno-strict-overflow -Ilib/cyw43-driver
237237

238238
SRC_C += \
239239
boards/$(BOARD)/board.c \

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,8 @@ wifi_radio_error_t common_hal_wifi_radio_connect(wifi_radio_obj_t *self, uint8_t
244244
common_hal_wifi_radio_stop_station(self);
245245

246246
// connect
247-
cyw43_arch_wifi_connect_async((const char *)ssid, (const char *)password, CYW43_AUTH_WPA2_AES_PSK);
247+
int auth_mode = password_len ? CYW43_AUTH_WPA2_AES_PSK : CYW43_AUTH_OPEN;
248+
cyw43_arch_wifi_connect_async((const char *)ssid, (const char *)password, auth_mode);
248249
// TODO: Implement authmode check like in espressif
249250

250251
while (port_get_raw_ticks(NULL) < deadline) {

supervisor/shared/web_workflow/web_workflow.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,10 @@ void supervisor_start_web_workflow(void) {
264264
}
265265

266266
result = common_hal_os_getenv_str("CIRCUITPY_WIFI_PASSWORD", password, sizeof(password));
267-
if (result != GETENV_OK) {
267+
if (result == GETENV_ERR_NOT_FOUND) {
268+
// if password is unspecified, assume an open network
269+
password[0] = '\0';
270+
} else if (result != GETENV_OK) {
268271
return;
269272
}
270273

0 commit comments

Comments
 (0)