Not sure if this would work but can you try putting the wifi.on stuff outside of the connect function? (I'm assuming this is what you were referring to as the callback)
Actually nvm, consider me confused which callback you're referring to :D I saw an emit somewhere and I'm not sure what's happening anymore.
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.
Not sure if this would work but can you try putting the
wifi.on
stuff outside of theconnect
function? (I'm assuming this is what you were referring to as the callback)Actually nvm, consider me confused which callback you're referring to :D I saw an
emit
somewhere and I'm not sure what's happening anymore.I personally just do simple things like the ones found here: https://www.espruino.com/ESP32#connecting-to-wifi
Maybe try this one first and see if the
wifi.connect
callback runs? (again, I'm not really sure which callback you're referring to).