Firmware state during forced wifi credentials erasure

Hi All,

I have a SparkCore that I’m starting to get used to. I’ve noticed that if I:

  1. flash a program (really simple, just println(millis()); )
  2. let the program start and monitor it in a serial monitor
  3. hold the mode button down to force erase wifi credentials
  4. program new credentials via serial
  5. reconnect the serial monitor

then the program appears to have been running the whole time. There does not appear to be a reboot after the new credentials are applied.

Is this expected behavior? Its not a problem either way. I’d just like to confirm one way or the other.

thanks in advance.

@matt,

I think when you perform Steps 3 and 4, it is part of the larger loop that handles all the other stuff.

So the MODE button status is polled and once it exceeds the time set, wifi credentials are erased and the USB Serial port is enumerated (if it has not) and wait for user input.

After that is done, the core would enter the main loop (loop()) to run user firmware.

That should be the same behavior you observed.

That’s correct - there’s no reboot after credentials are applied, just the main loop isn’t run while the device is in listening mode (flashing blue.)

@kennethlimcp @mdma Thanks guys. I appreciate the clarification.

A nice thing for the documentation wishlist would be a block diagram of the “behind the scenes” state machine.

1 Like

Good idea! :+1: