No event catch on 0.4.9

Simple sketch:

   SYSTEM_THREAD(ENABLED);
SYSTEM_MODE(MANUAL);

const uint32_t RETRY = 1000;
uint32_t ms;

void setup()
{
    Serial.begin(9600);
    System.on(network_status, handle_all_the_events);
    Serial.println("setup end");
    WiFi.on();
    WiFi.connect();

}

void loop()
{
    if (millis() - ms > RETRY )
    {
        ms = millis();
        Serial.print(WiFi.ready());
        Serial.print(" | ");
        Serial.println(ms);
    }
}

void handle_all_the_events(system_event_t event, int param)
{
    Serial.printlnf("got event %d with value %d");
}

In serail output i see only:
setup end
0 | 2000
1 | 3000
1 | 4000 and so on…

If I turn on/off router - photon lost wifi and make reconnect. I see it by blinking green led, but no Serial output for this events.
Any assumptions - why?

This is an error in the docs. network_status events are not implemented in this release. I’ll update the docs.

1 Like

Ok. Want use it for debug of second reconnect trouble - Solid green and no loop() work after wifi router reboot. Second reconnect trouble.
Can we hope on implementation of network_status event in 0.5.0 ???