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

pca10040_debug can do OTA while pca10040 cann't do

Hi

I'm using nRF5_SDK_12.0.0_12f24da and s132_nrf52_3.0.0_softdevice to do the OTA. What I do as follow:

  1. Generate public & private keys
  •      nrfutil keys generate priv.pem 
    
  •      nrfutil keys display --key pk --format code --out_file dfu_public_key.c priv.pem 
    
  1.  Compile bootloader 
    
  •      Over write dfu_public_key.c by the one generated in step #1. 
    
  •      Compile 
    
  •      Program bootloader and S132 v3 to nRF52-DK. 
    
  1. Compile application: ble_app_multilink_central
  2. Generate packages

debug zip nrfutil pkg generate --debug-mode --application nrf52832_1124.hex --key-file key_pro.pem nrf52832_debug_1124.zip

Not debug zip nrfutil pkg generate --hw-version 52 --sd-req 0x80 --application-version 4 --application nrf52832_1124.hex --key-file key_pro.pem nrf52832_1124.zip

  1. In IOS(9.3.5) nRF Toolbox(V4.1.1), DFU APP
  •      Connect to DfuTarg, and then press the upload-icon. 
    

I found that when I use pca10040_debug bootloader, I can do OTA successfully,while pca10040 do OTA fail. I donn't know why. Is there anyother things I need to do? Thanks.

Parents
  • @Alice: The main difference between the debug version and the normal version is the checking of application version and hardware version, and softdevice version. You may want to checkout what is the fail reason. I can see that you use sd-req 0x80, are you sure ? 0x80 is for S130, if you have S132 onboard it should be 0x81, 0x88 or 0x8C.

  • @Hung Bui: Sorry, it's my carelessness. It should me ox8C and it's OK now. After OTA, when I do some modification on my code and then programed it again, it doesn't run the application,but the OTA.I want it to run application first when there are bootloader,application and softdevice in the chip. So I do a DFU settings as follow:

    1. Merge the three file(bootloader,application and softdevice) to one file,such as mutilink_app.hex
    2. Generate the setting file:

    nrfutil settings generate --family NRF52 --application mutilink_app.hex --application-version 12--bootloader-version 2 --bl-settings-version 1 setting.hex 3. program setting.hex

    But it cann't run.

    Besides, now I just use a button to make it switch to DFU mode. How could I do that DFU app make it go to DFU mode like the heart rate example s130_with_dfu in SDK11? That should be more conveinent .I think I should add a peripheral and DFU service to nRF52, is there any document I can refer to? Thanks

Reply
  • @Hung Bui: Sorry, it's my carelessness. It should me ox8C and it's OK now. After OTA, when I do some modification on my code and then programed it again, it doesn't run the application,but the OTA.I want it to run application first when there are bootloader,application and softdevice in the chip. So I do a DFU settings as follow:

    1. Merge the three file(bootloader,application and softdevice) to one file,such as mutilink_app.hex
    2. Generate the setting file:

    nrfutil settings generate --family NRF52 --application mutilink_app.hex --application-version 12--bootloader-version 2 --bl-settings-version 1 setting.hex 3. program setting.hex

    But it cann't run.

    Besides, now I just use a button to make it switch to DFU mode. How could I do that DFU app make it go to DFU mode like the heart rate example s130_with_dfu in SDK11? That should be more conveinent .I think I should add a peripheral and DFU service to nRF52, is there any document I can refer to? Thanks

Children
No Data
Related