Hi guys,
I’ve wanted to give a try to the System.factoryReset() thus I’ve uploaded simple tinker app with 3rd party SIM credentials into the factory backup area. Ever since then electron dies with the assertion error whenever it connects to the cloud. It boots properly until it connects to the cloud. I tried to reflash the primary app, the factory backup app, the firmware itself.
All of these has been done on 1.4.2 firmware release and CLI 1.41.1.
Did somebody encounter this strange behaviour. It looks like writing to the factory backup area messed up somehow the memory of electron. Did anybody encounter such a problem? I would appreciate any help here or suggestions how to repair my broken electron. Particle cli doctor did not helped at all.
Hi @gkujawsk - interesting problem! Can you walk us precisely through your pathway here? I’m interested in learning more about how you went about flashing to backup.
Regarding getting the device back online - sorry to default to old faithful, but are you able to place the device in DFU Mode? If so, can you try:
particle update particle flash --usb tinker
to try and bring the device back into a blinking green state?
Hi,
You know what they say. Been there, done that. Here are the exact steps
Electron with 1.4.2 firmware on board. Updated through DFU mode from 0.6.2 to 1.4.2 following the update procedure posted on the release post on github. Basic tinker app specifying 3rd party SIM credentials used as the main app. Everything works like a charm.
Since I encountered some mysterious problems with firmware and app upgrade using OTA (it’s a topic for another thread) I decided to use the factory backup app to which my electrons could fallback after a number of consecutive hard_faults. These actually happened while I tried to OTA the firmware upgrade.
I’ve put electron into DFU mode and then I used the following command particle flash --usb --factory …/my-basic-tinker.bin I’ve restarted electron and now ever since then it reboots with the assertion error right after connecting to the clouds. I’ve uploaded the tinker with extended logging and thus I can see the last messaged from the system fimware which you can find below. The my-basic-tinker app is compiled against 1.4.2 although the one compiled against 0.6.4 behaves exactly the same.
So far the only thing that brings electron to regular operation is to downgrade it to 0.6.4 system firmware. Then it works as it should. I’ve tried a couple of such downgrade and upgrade rounds with no particular effect unfortunately.
I tried to remove the electron from my account and then add it again. Still no changes. I don’t know if you may need this but this is my electrons id: DEVICE ID HIDDEN BY MAREK.
0000005139 [comm.protocol] TRACE: Reply recieved: type=2, code=0
0000005139 [comm.protocol] INFO: message id 15 complete with code 0.00
0000005140 [comm.protocol] INFO: rcv'd message type=13
5.214 AT read + 17 "\r\n+UUSORD: 0,38\r\n"
Socket 0: handle 0 has 38 bytes pending
5.215 AT send 17 "AT+USORF=0,1024\r\n"
5.227 AT read + 78 "\r\n+USORF: 0,\"100.25.253.74\",5684,38,\"\x17\xfe\xfd\x00\x01\x00\x00\x00\x00\x00\x1d\x00\x19\x00\x01\x00\x00\x00\x00\x00\x1d\xecjr\xc4m\x16\x9b\x94 (-\x17c4\n\x1eW\"\r\n"
5.230 AT read OK 4 "OK\r\n"
5.230 AT send 4 "AT\r\n"
5.233 AT read OK 6 "\r\nOK\r\n"
5.233 AT send 14 "AT+USORF=0,0\r\n"
5.239 AT read + 15 "\r\n+USORF: 0,0\r\n"
Socket 0: handle 0 has 0 bytes pending
5.240 AT read OK 6 "\r\nOK\r\n"
I can confirm that downgrading to 0.6.4 makes electron successfully connect to particle cloud. for i in 1 2 3; do particle flash --usb ../../system-part${i}-0.6.4-electron.bin ; done && particle flash --usb --factory ../../tinker-play-keepalive.bin && particle flash --usb ../../tinker-play-keepalive.bin
Then upgrade to 1.4.2 wreaks the havoc. for i in 1 2 3; do particle flash --usb ../../electron-system-part${i}\@1.4.2.bin ; done && particle flash --usb --factory ../../tinker-play-keepalive-1.4.2.bin && particle flash --usb ../../tinker-play-keepalive-1.4.2.bin
0.7.0 gives the same results as 1.4.2. I have some more electrons on the stock but I would rather not to experiment with these.
In case somebody ever encounter the same problem. Here’s what helped me.
I took a healthy electron with 1.4.2 on board and dumped the whole flash memory:
dfu-util -d 1d50:607f -a 0 -s 0x8020000:917504 -U whole-healthy-1.4.2.bin
Then I’ve uploaded the dumped image onto the broken electron:
dfu-util -d 1d50:607f -a 0 -s 0x8020000:leave -D whole-healthy-1.4.2.bin
Then I’ve put the broken electron into the DFU again just to run the particle doctor on it. Particularly the part of the doctor exchanging the keys. I answered no to all the other questions. Doctor warned me that the device is not claimed to my account, so just in case I’ve run particle add before exchanging the keys. Again the doctor complained but this time I ignored the warning and my broken electron is alive again.
Before I do any experiments with the factory backup I’ll definitely will keep backup image of the memory which I recommend to the rest of the community. In case you need memory dump from the broken one for troubleshooting I’ll keep it.
Just a minute ago I tried again with particle flash --usb --factory with two different electrons and the both fail the same way again. Looks like a bug to me. Maybe somebody else from the community can check this out to confirm that I’m not the only lucky one.