I'm beginning to suspect that is the esp wroom. It only has 512K RAM.
I changed the code above to do 3 manual manual disconnects and you can see (below) both the disconnect and connect callbacks were called the first time but then not called afterwards (I used a timeout) even though it was really disconnected and connected. Sometimes though when I run it they may get all called for all three trials. The callback failure is not particularly consistent unless I fail to do a hard reset in which case then never get called.
I know that for low.js the minimum requirement is wrover (has extra (ps)ram and flash) maybe that is also true for espruino? @MaBe? Have others had similar issues issues using a wroom??
Explicit board JSON supplied: "../boards/ESP32.json"
Connecting to '/dev/ttyUSB0'
Connected
environment {
"VERSION": "2v06.122",
"GIT_COMMIT": "eca6aae8",
"BOARD": "ESP32",
"FLASH": 0, "STORAGE": 262144, "RAM": 524288,
"SERIAL": "246f2855-5a80",
"CONSOLE": "Serial1",
"MODULES": "Flash,Storage,heatshrink,fs,net,dgram,tls,http,NetworkJS,Wifi,TelnetServer,crypto,neopixel",
"EXPTR": 1073484860, "PRODUCTION": false }
determining wifi status
not connected...connecting
ERROR: Wifi: event_handler STA_START: esp_wifi_connect: 12298(SSID is invalid)
WARNING: Wifi:startMDNS - espressif
wifi connect callback
ESP connected to AP
application online at 10.0.0.225
---------------- manually disconnect/reconnect test -------------- 1
forcing disconnect now
wifi disconnect callback
ESP disconnected from AP
attempting reconnect in 5
application offline
determining wifi status
not connected...connecting
WARNING: Wifi:startMDNS - espressif
WARNING: Wifi:stopMDNS
wifi connect callback
ESP connected to AP
application online at 10.0.0.225
---------------- manually disconnect/reconnect test -------------- 2
forcing disconnect now
disconnect timeout
disconnect callback failed but device is disconnected!!!
ESP disconnected from AP
attempting reconnect in 5
application offline
determining wifi status
not connected...connecting
true timed out trying to connect
connect callback failed but device is connected!!!
ESP connected to AP
application online at 10.0.0.225
---------------- manually disconnect/reconnect test -------------- 3
forcing disconnect now
disconnect timeout
disconnect callback failed but device is disconnected!!!
ESP disconnected from AP
attempting reconnect in 5
application offline
determining wifi status
not connected...connecting
true timed out trying to connect
connect callback failed but device is connected!!!
ESP connected to AP
application online at 10.0.0.225
done disconnect trial of 3 times
>
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I'm beginning to suspect that is the esp wroom. It only has 512K RAM.
I changed the code above to do 3 manual manual disconnects and you can see (below) both the disconnect and connect callbacks were called the first time but then not called afterwards (I used a timeout) even though it was really disconnected and connected. Sometimes though when I run it they may get all called for all three trials. The callback failure is not particularly consistent unless I fail to do a hard reset in which case then never get called.
I know that for low.js the minimum requirement is wrover (has extra (ps)ram and flash) maybe that is also true for espruino? @MaBe? Have others had similar issues issues using a wroom??