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).

  • 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.

  • As a result, I tried to execute a firmware update with my iPad and the Nordic Toolbox for iOS - using the application file as a hex, and a correct application.dat file using the format you specify in a .zip file. I was able to connect to both beacons again and begin the update. Both times I got a disconnect message. The beacon stuck in bootloader mode remained in bootloader mode, but the new beacon returned to advertising mode when the SW1 button was pressed.

    I checked the voltage on the PCB of the port I had attempted to open on the beacon in advertising mode. The voltage was unchanged from the factory behavior. So the update did not complete.

    Thanks for the advice about the connector as well. Would I need the Master Control Panel for Windows to execute a hardwired update? This is not included with the beacon, so if I do need it, what do I need to purchase? Thanks!

  • Currently working with Vidar in support on a solution. Will post details when resolved.

  • If DFU does not work on the beacon kit the first thing to check is what board revision you have. Revision 1.0.0 is pre-programmed with S110 v.6.0.0., thus compatible with beacon firmware v. 1.0.1 that uses the v.6.0.0 API.

    S110 v.6.0.0. does however not have the support for softdevice and bootloader DFU, so unfortunately, going from beacon FW 1.0.1 does require an external J-link/DK kit to update the kit with the cable Asbjørn mentioned. The update procedure is described in the index.html file found in the folder of the downloaded beacon firmware v.1.1.0.

    Board revisions after v.1.0.0 is already running with the latest firmware and can be updated with Master control panel 3.7.1 by following the steps described below the "testing" section in the SDK documentation. This makes an init file internally so you only need to provide the .hex file. On Android this init file has to be made manually. There is a guide on Github on how to do that.

Related