I’ve been working on automating the flashing and testing of electrons. I’m having a problem where every device consistently is stuck flashing cyan until I power cycle the device.
Here is the manufacturing process leading to this:
- Plug Electron in to computer via usb (device also connected to sensor peripherals needed for testing)
- Electron is automatically put into DFU mode via po-util
- Electron is flashed with the three parts of System Firmware v0.6.4
- Electron is flashed with my Application Firmware
- Electron is automatically put into Serial mode via po-util
- Particle Identify is automatically ran and parsed for device ID and SIM ICCID
- SIM is activated
- Electron is automatically pulled back out of serial mode via po-util
- Script waits for the device to send valid data to my MQTT server
- More things…
In the Waiting For Validation state (#9), the device connects to MQTT just fine and starts sending data.
However, the device enters and remains in the flashing cyan state (not connected to particle cloud, but trying in theory). The interesting thing is that the timestamps being sent to my server are all negative integers.
Normally, before the device syncs for the first time since power-down, the time stamp begins at an epoch time that is in the vicinity of
944006421. However, the timestamps I receive are along the lines of
If I reset the device, this state doesn’t change. However, once I power cycle the device, it immediately begins working as expected, returning times such as
So, what I’m thinking is that somehow the time isn’t syncing properly when the device is hitting the network, and it’s causing the devices to get rejected from beginning the handshake with the Particle cloud. This happens with every single device using my procedure above. Any thoughts on what might be happening to cause this and how I could ensure a good handshake without a power-cycle?