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

device nRf51 - after OTA dfu, mobile not able to detect the device ..

Hello all I am new Nordic and Bluetooth, before starting my project I did small experiment to understand the system i did the following steps.

  1. Used nRF51822 -32 KB Ram AC version with preloaded bootloader supplied with the SDK 8.1.0 and has the softdevice s110. Its is not UART Interface and has SWD port.When i powered on the device, nRF Toolbox finds "DfuTarg" as expected

  2. Used eclipse Gcc compiler and its makefile to compile;

  3. for testing purpose I have used beacon example code with out any modification. (\nRF5_SDK_11.0.0_89a8197\examples\ble_peripheral\ble_app_beacon)

  4. I have successfully compiled using gcc compiler and generated hex file.

  5. i want to upgrade only Application. When i was trying to upgrade only hex file, it was asking init file so i did following step to create the zip.

C:\Program Files (x86)\Nordic Semiconductor\Master Control Panel\3.10.0.14\nrf>nrfutil dfu genpkg --application myapp.hex --application-version 0xffffffff --dev-type 0xffff --dev-revision 0xffff --sd-req 0x64,0x45,0x5a myapp.zip

Zip created at myapp.zip

  1. I have successfully uploaded new zip file and after that i am not able to see the device in my mobile app.

Please advice what went wrong..

  • The way I understand it you originally flashed the chip with the bootloader and S110 SoftDevice that was supplied with SDK 8.1.0. However, the S110 SoftDevice (version 8.0.0) is not compatible with SDK 11, which you built your application for. If you want to use SDK 11 on the nRF51, you must use S130 version 2, as you can see from nRF51 Series IC revisions compatibility with SDK and SoftDevices.

    What I suspect is happening is that the DFU upgrade succeeds, but the newly flashed application is not compatible with the older SoftDevice, and therefore will not function properly. If you want to upgrade to an application built for another SoftDevice as in this case, you must first upgrade the SoftDevice.

  • Thanks Einar Thorsrud .. so I want to re-flash the device with new SD; This can be done only with jlink tool. I was though that if it is not compatible it will fallback to original one.

  • In general, DFU provide a safe fallback, given that the upgrade image has been generated with care. If you upgrade to an application that is incompatible with the existing SoftDevice (without first upgrading the SoftDevice), the bootloader will start the application, which in turn will fail in some way.

    The proper way to handle this situation is to do at least the following:

    • Specify a SoftDevice version in the application upgrade .zip file with the --sd-req option to nrfutill dfu genpkg. This will make sure that the bootloader will only accept the application if the existing SoftDevice has the correct version.
    • If you should upgrade to a newer SoftDevice, first upgrade the SoftDevice. This will invalidate the application, and after reset the bootloader will enter DFU mode directly, and not start the application. Then the application can be upgraded.
Related