This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Resetting smart beacon to factory state

I'm doing some work with the nRF51822 smart beacon kit. I tried to do an over the air firmware update of the application, but kept getting dfu invalid state (2) errors after progress got to 1%. I tried to reupload the original precompiled hex application from the firmware files, with the same result. Device appeared to reset and go into advertising mode after any attempts to update the application file.

I figured the failed update may have caused other issues - so I tried to update the bootloader with the one from the precompiled hex folder (along with a init.dat file that was correct). Also updated the softdevice with an unaltered copy as well. Both failed in the same way as the application update. Now the device seems to be stuck in programming mode (blinking blue light), but now does not reset into advertising mode if the firmware update fails. I can still connect to the device to begin a firmware update normally, just the update fails.

I'm doing the update through the nRFBeacon Android app, and also tried with the Master Control Panel app. Phone is an LG L90 with Android 4.4.2. I saw that one other person had an issue with updates with 4.4, so I'm wondering if it's the phone and whether buying the nRF51822 dev kit might help and offer a hardwired option for updates to the beacon.

In any case, I would appreciate any advice on how to get the thing back to a factory state (if I haven't completely ruined it).

Parents
  • You can re-program the beacon through the interface available on the little tap on the side of it. Either use the TC2030 connector or solder onto VDD, GND, SWDIO and SWDCLK to reprogram the unit. I'm not sure what has happened to your beacon, but it does seem to be stuck in the bootload mode. Do you see it constantly advertising as a dfu service as well?

  • I thought I had done something wrong, so I actually ordered 2 additional beacons over the weekend to try again before I saw your response. I figured that there might have been a serious issue with my original code that caused the problem. I simplified my firmware code (now the firmware code is just the source Keil project, with three lines to define the number of a port to be opened as an output, set the port as an output and set it high). This was compiled to an axf file, then converted to a BIN with fromelf.

    Interestingly, if I attempt the firmware update with the beacon stuck in Bootloader mode, and one of the new beacons, I get a DFU invalid state (2) error. This is on the LG phone with Android 4.4.2. So both beacons are behaving the same way when I send an application update. So I suspected phone was the issue.

Reply
  • I thought I had done something wrong, so I actually ordered 2 additional beacons over the weekend to try again before I saw your response. I figured that there might have been a serious issue with my original code that caused the problem. I simplified my firmware code (now the firmware code is just the source Keil project, with three lines to define the number of a port to be opened as an output, set the port as an output and set it high). This was compiled to an axf file, then converted to a BIN with fromelf.

    Interestingly, if I attempt the firmware update with the beacon stuck in Bootloader mode, and one of the new beacons, I get a DFU invalid state (2) error. This is on the LG phone with Android 4.4.2. So both beacons are behaving the same way when I send an application update. So I suspected phone was the issue.

Children
No Data
Related