Most recent activity
-
- 12 comments
- 5,918 views
-
-
-
-
okay, found out that after ESP32S serving as an AP, and connected with a client, then i need to disconnect it and wait for 10+ seconds before change it to station mode and connect to local wifi, however, after a minute or so, it will start to prompt errors :
E (348565) MDNS_Networking: Cannot allocate memory (line: 34, free heap: 60 bytes) E (364028) MDNS: Cannot allocate memory (line: 113, free heap: 32 bytes) E (364132) MDNS_Networking: Cannot allocate memory (line: 34, free heap: 60 bytes) E (366178) MDNS: Cannot allocate memory (line: 113, free heap: 32 bytes) E (374166) MDNS_Networking: Cannot allocate memory (line: 34, free heap: 108 bytes) E (470118) MDNS: Cannot allocate memory (line: 113, free heap: 32 bytes) E (470425) MDNS: Cannot allocate memory (line: 113, free heap: 32 bytes) E (472170) MDNS: Cannot allocate memory (line: 113, free heap: 32 bytes) E (485172) MDNS: Cannot allocate memory (line: 113, free heap: 32 bytes) E (486402) MDNS: Cannot allocate memory (line: 113, free heap: 32 bytes) E (490277) event: post event to user fail! WARNING: Wifi:startMDNS - espressif WARNING: Wifi:stopMDNS
-
-
and here's what happened when I try to startAP and also connect wifi:
>wifi.startAP("test",{authMode:'wpa2',password:"88888888"}); =undefined >wifi.connect("xxxx",{password:"xxxxxxxx"},(err)=>{if (err){print(err);return;}print("connected");}); ERROR: Wifi: event_handler STA_START: esp_wifi_connect: 12298(SSID is invalid) =undefined >wifi.getIP() ={ ip: "0.0.0.0", netmask: "0.0.0.0", gw: "0.0.0.0", mac: "3c:71:bf:4c:a4:d4" } WARNING: Wifi:startMDNS - espressif connected >wifi.getIP() ={ ip: "192.168.11.31", netmask: "255.255.240.0", gw: "192.168.1.253", mac: "3c:71:bf:4c:a4:d4" } >E (774880) event: post event to user fail! E (777720) event: post event to user fail! E (780562) event: post event to user fail! E (783403) event: post event to user fail! >wifi.getIP() ={ ip: "0.0.0.0", netmask: "0.0.0.0", gw: "0.0.0.0", mac: "3c:71:bf:4c:a4:d4" } >wifi.getDetails() ={ status: "NO_AP_FOUND" } >
-
Here's what happened for my newly flashed ESP32S
>require("Wifi").getStatus() ={ station: "Unknown reason", mode: "AP", powersave: "modem" } >require("Wifi").save("sta+ap"); =undefined >require("Wifi").getStatus() ={ station: "Unknown reason", mode: "AP", powersave: "modem" } >E.reboot() ets Jun 8 2016 00:22:57 rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0018,len:4 load:0x3fff001c,len:2668 load:0x40078000,len:7304 load:0x40080000,len:5312 entry 0x40080274 E (536) spiram: SPI RAM enabled but initialization failed. Bailing out. ____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |____|___| _|_| |___|_|_|_|___| |_| espruino.com 2v04.3 (c) 2019 G.Williams Espruino is Open Source. Our work is supported only by sales of official boards and donations: http://espruino.com/Donate WARNING: jswrap_wifi_restore: AP=ESP_4CA4D5 >require("Wifi").getStatus() ={ station: "Unknown reason", mode: "AP", powersave: "modem" } >process.env ={ VERSION: "2v04.3", GIT_COMMIT: "83fba1f3", BOARD: "ESP32", FLASH: 0, RAM: 524288, SERIAL: "3c71bf4c-a4d4", CONSOLE: "Serial1", MODULES: "Flash,Storage,hea" ... "lnetServer,crypto", EXPTR: 1073484860 } >
so how to make my ESP32S to support "sta+ap" ?
This MCU can run both mode when I script it in Arduino, but when I script it in Espruino, it will automatically disconnect station wifi when it has Access point on.also, how to fix "E (536) spiram: SPI RAM enabled but initialization failed. Bailing out." ?
thanks for reading
Yes it seems ESP32 wifi station connect eats up all heap memory!
This is what happened after a
reset(true)
You can see that the freeHeap dropped dramatically after connecting to the local network!