This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Blinky does not work after OTA Firmware update

Hi,

I am following the step by step tutorial "Getting Started with Secure DFU Bootloader Step by Step guide

Before following the above guide I compiled  ble_app_blinky from the examples/ble_peripheral folder of NRF52 SDK Ver 17.0.2

The above example was tested successfully on NRF52-DK along with NRF Blinky App running on an Android phone. Everything worked well.

I then followed the guide to create:

1. Secure bootloader (Steps A, B in the guide)

2. Created the application ZIP file (Step C)

3. Performed DFU using NRF Connect for mobile (Steps D1 to D3)

STEP D4 (Testing the Application after DFU)  - failed - Most of the time I could not see the BLE Device name in NRF Blinky App. Once I did see the BLE Device name "Nordic_Blinky" but it would not connect. Once it did connect and I was even able to switch on the LED but after that it seemed the program froze - there were no responses to LED on/off on Blinky App nor was there any response to BUTTON press on the NRF52-DK. 

I failed to understand what is it that I am doing that is breaking the Application!

Any help in this regard would be helpful. 

Parents
  • Hi,

    STEP D4 (Testing the Application after DFU)  - failed - Most of the time I could not see the BLE Device name in NRF Blinky App. Once I did see the BLE Device name "Nordic_Blinky" but it would not connect. Once it did connect and I was even able to switch on the LED but after that it seemed the program froze - there were no responses to LED on/off on Blinky App nor was there any response to BUTTON press on the NRF52-DK. 

    Could you please provide more information about these transitions (cannot see the device -> can see the device, cannot connect -> can connect)?
    When did they occur? Did you do anything to enable these transitions?

    Best regards,
    Dejan

Reply
  • Hi,

    STEP D4 (Testing the Application after DFU)  - failed - Most of the time I could not see the BLE Device name in NRF Blinky App. Once I did see the BLE Device name "Nordic_Blinky" but it would not connect. Once it did connect and I was even able to switch on the LED but after that it seemed the program froze - there were no responses to LED on/off on Blinky App nor was there any response to BUTTON press on the NRF52-DK. 

    Could you please provide more information about these transitions (cannot see the device -> can see the device, cannot connect -> can connect)?
    When did they occur? Did you do anything to enable these transitions?

    Best regards,
    Dejan

Children
  • Hi Dejan,

    I restarted fresh as I had modified the code with some debug line in blink's main.c and was not sure if did something wrong.

    Here is what I mean by restarted:

    PART 1 - blinky app as is

    1. Downloaded NRF52 SDK 17.0.2 

    2. Recompiled ble_app_blinky  available in the examples/ble_peripheral folder

    3. Tested the app on NRF52-DK using. both Android and iOS nrf blinky app. Everything worked consistently - i.e. LED on/of as well as BUTTON press/release. 

    PART 2 - blinky app - transferred using SECURE DFU

    Next step was to do the secure DFU OTA.

    1. Created the secure bootloader hex file by following steps in the guide (Steps B1a,B2,B3)

    2. Generated DFU package (.zip file) as in step C of guide 

     nrfutil pkg generate --hw-version 52 --sd-req 0x0101 --application-version 0 --application ble_app_blinky_new.hex --key-file ../private.pem blinky_new.zip
    
    

    3. Created Bootloader Settings file

    nrfutil settings generate --family NRF52 --application ble_app_blink_new.hex --application-version 0 --bootloader-version 0 --bl-settings-version 2 boot_loader_setting.hex

    4. Flashed SoftDevice and Secure Bootloader and Bootloader Settings file

    ## Flash SD
    nrfjprog --family nRF52 --verify --program s132_nrf52_7.2.0_softdevice.hex --sectorerase
    echo ... Softdevice flashed 
    echo ----------------------
    ## Flash BOOTLOADER
    nrfjprog --family nRF52 --verify --program secure_bootloader_ble_s132_pca10040_debug_mar22.hex --sectorerase
    echo ... Secure Bootloader flashed
    echo ----------------------
    ## Flast Settings
    nrfjprog --family nRF52 --verify --program boot_loader_setting.hex --sectorerase

    5. Restarted NRF52 DK (power off/on)

    6. Using iOS app nRF Connect connected to NRF52 DK  (device named  "DfuTarg" ) and did DFU over the air using the package generated in step 2 of PART 2.

    Logfile of secure DFU attached 

    7. Powered off / on the NRF52 DK 

    8. Using nrf Connect app on iOS - Tried to look for "Nordic_Blinky" but did NOT see any. Tried this multiple time by restarting NRF52 board and checked with both iOS and Android phones - the result was same - cannot see the BLE device name. [This is way different from my observations in earlier post but this time I was careful of recording each step and have provided more details.

    After this weekend - I will try the same process with buttonless DFU IMAGEs provided in the SDK to check if that works.

    Do let me know if you need more details.

    Regards

    Murthy

  • Hi Dejan,

    Today I tested Buttonless Secure DFU without bonds using the images that came with the SDK 17.0.2

    I was able to Test the whole process as given in the SDK documentation.

    From this I conclude that the BLINKY fails on DFU OTA because I may be overwriting some code while flashing but I don't know how to check that.

    Grateful for a solution.

  • Hi,

    Can you provide more information about the current issue?
    Are you having a problem with the DFU process or is the problem that after the DFU has finished you cannot see your device anymore?

    Best regards,
    Dejan

  • Hi Dejan,

    The DFU process works and there are no issues.

    It is after the DFU is completed successfully that I cannot see device name. In this case I am using the ble_blinky app.

    Note: I did not modify anything in the example ble_blinky app.

    I have tried the buttonless_dfu_without_bonds image provided in the SDK - DFU as well as being able to device name after DFU works well. No issues.

    I am really hard pressed for time. I am stuck at this last step. Grateful for any help. I am sure I am missing some step somewhere and not able to see it.

  • Hi,

    Following the same guide and using ble_app_blinky application on nRF52840 (with SoftDevice s140), I was able to see the "Nordic_blinky" after DFU has finished successfully. For testing I used Bluetooth Low Energy desktop application v3.0.0.

    There are several things you could try in order to find the cause of the problem.
    Make sure that you are using the proper unchanged application from ble_app_blinky_sample.
    You could try inputting some print statements into your code and see in the terminal if you get anything. This could indicate some other problem with your application (excluding Bluetooth).
    Another thing to try would be to flash the same application to your board and check if it is advertising. This would show that Bluetooth part is working correctly.
    Are you sure that you have not missed any steps describe in the guide or used a changed version of the same application?

    Best regards,
    Dejan

Related