var ssid = 'YOUR_SSID';
var password = 'YOUR_SSID_PASSWORD';
var wifi = require('Wifi');
wifi.connect(ssid, {password: password}, function() {
console.log('Connected to Wifi. IP address is:', wifi.getIP().ip);
wifi.save(); // Next reboot will auto-connect
});
My WIFI does not re-connect on it's own (if I say reboot my WIFI router). However, it does connect when I reboot the ESP32.
I'll try some of the other suggestions and see what I get.
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.
Thank everyone for their suggestions. I have just gotten back to trying this again (had some OT at work and other things going on).
I am starting with a fresh install of everything (even my OS because when I tried to update Debian from stretch to buster, I broke it).
The ESP32 board that I'm using are MELIFE 2 ESP-32S (ESP-WROOM-32 module with 4MB flash, no pSRAM).
I've done a fresh flash of the firmware and I get the following right after flashing:
I then disabled bluetooth and get much more memory:
Then I turned on WIFI using
My WIFI does not re-connect on it's own (if I say reboot my WIFI router). However, it does connect when I reboot the ESP32.
I'll try some of the other suggestions and see what I get.