Event when wifi is dropped?

Posted on
  • Hello all!

    Is there an event or a way to trigger an event when an ESP32 looses it's wifi connection? I'm referring to the state when it's connected as a station, not a AP.

    I'm looking for something more elegant then polling the wifi to check for an ip or other.

    Thanks for your help.

  • Just to close this, I ended up using this bit:

    wifi.on('sta_left', function(){
      console.log('station lost...');
    });
    
  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Event when wifi is dropped?

Posted by Avatar for cmo @cmo

Actions