Skip to content

Commit

Permalink
V1.0.1 Wlan patch_v02
Browse files Browse the repository at this point in the history
- update wlan reconnect mode
  • Loading branch information
M-ichae-l committed Jul 13, 2021
1 parent 022263d commit fc5a6d7
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion MicroPython_RTL8722/ports/rtl8722/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ IMAGETOOL = amebad_image_tool.exe
PICK = pick.exe
PAD = pad.exe
BUILDTOOL_PATH := tools/windows
UPLOAD_PATH := COM10
UPLOAD_PATH := COM6
POSTBUILDTOOL_PATH := amebad_tool/tools/windows
MPY_CROSS = $(TOP)/mpy-cross/mpy-cross.exe
LINKER_SCRIPT = amebad_vendor/linker_script
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -567,14 +567,18 @@ STATIC mp_obj_t wlan_connect(size_t n_args, const mp_obj_t *pos_args, mp_map_t *
break;
}

for (int i = 0; i < 4; i++) {
for (int i = 1; i < 6; i++) {
//printf("\n Before wifi_connect \r\n");
ret = wifi_connect((char*)wifi.ssid.val, wifi.security_type, (char*)wifi.password, wifi.ssid.len, wifi.password_len, wifi.key_id, NULL);
//printf("\n After wifi_connect \r\n");
if (ret == RTW_SUCCESS) {
break;
} else {
printf("\n Auto reconnect to WiFi... \r\n");
}
mp_hal_delay_ms(2000);
//mp_hal_delay_ms(10000);
vTaskDelay(10000);
//printf("\n After vTaskDelay 10s \r\n");
}

if (ret == RTW_SUCCESS) {
Expand Down
Binary file modified Release/Linux/km0_km4_image2.bin
Binary file not shown.
Binary file modified Release/MacOS/km0_km4_image2.bin
Binary file not shown.
2 changes: 1 addition & 1 deletion Release/Windows/Double-Click-Me-to-Upload.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
@echo First check your ameba's serial port and edit this file accordingly before setting your ameba to UART Download mode and upload the image
@echo Right click on this file and select "Edit", update the correct COM port to the third last line then save and exit before re-run this program
pause
amebad_image_tool.exe COM8
amebad_image_tool.exe COM6
:: Change COMXX above to your ameba's actual COM port number
pause
Binary file modified Release/Windows/km0_km4_image2.bin
Binary file not shown.

0 comments on commit fc5a6d7

Please sign in to comment.