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

Getting error "DFU characteristic not found"

Dear

I am try to perform an  OTA  operation on a dongle of nrf52840 by ble_app_blinky for PCA10059 project   and  light-switch server for PCA10059 project, which works well on the PCA10059.

For the OTA operation, I have a Android smart phone with nRF toolbox , a PCA10056 DK which can be connect to a dongle by swd interface. I use nRF5 SDK_16.0.0 and SDK for MASH 4.0.0.

In these case, the Softdevice will be " s140_nrf52_7.0.1_softdevice"

Step1 : I make a pair keys for this operation by nrfutil command and build  "secure_bootloader_ble_s140_pca10056_debug.emProject" project with the new public_key.

Step2 :  I download the dfu_bootloader which be built last step to  dongle which be clean by "nrfjprog -e"

Step3 :  Make a dfu.zip for ble_app_blinky project by nrfutil command which is

nrfutil pkg generate --hw-version 52 --debug-mode --sd-req 0x00 --sd-id 0xCA --application ble_app_blinky_pca10059_s140.hex --key-file private.key --softdevice s140_nrf52_7.0.1_softdevice.hex ble_app_blinky_pca10059_s140_sd_DBdfu_package.zip

Make a dfu.zip for light-switch server for PCA10059 project by nrfutil command which is

nrfutil pkg generate --hw-version 52 --debug-mode --sd-req 0x00 --sd-id 0xCA --application light_switch_server_nrf52840_xxAA_s140_7.0.1.hex --key-file private.key --softdevice s140_nrf52_7.0.1_softdevice.hex light_switch_server_nrf52840_xxAA_s140_V701_sd_DBdfu_package.zip

Step4 :  Upload those packages to different Dongle separately by DFU of nRF Toolbox on Android smart phone. All of them be successful.

Step5 :  Modify the  ble_app_blinky for PCA10059 project   and  light-switch server for PCA10059 project by exchange LED pins with each other. Repeat step3 to step4. All of them be failure with a error "DFU characteristic not found"

Q1: Is there anything wrong with the process described above?Why does the first update succeed, but then fail (only once?)?

Q2: When  I doing DFU on DFU tools of nrf toolbox on my phone, if I select  "Application" as file type, I have to select an other file as init package. which mean is if I want download an app.hex to chips, an init package will be supported. Because the SES can build a project to generate a hex file and can download the hex file to chip.  For this reason, can I assume that SES also generated the corresponding init package during the build? If the answer is yes, where is the init package?

Q3: About the bootloader setting page, If a donwload a app.hex go through bootloader, a  bootloader setting page will be generated by bootloader. is it correct? 

When I read the post here, I donot uderstand  those words below.

"But in production for example, you may not want to install the application by doing OTA DFU for thousands of device which takes lots of time. The same when you are doing development. You don't want to do DFU for any change you made to your application.

To solve this, we can generate a bootloader setting manually and merge it with the bootloader to trick the bootloader to accept the pre-flashed application. We use nrfutil to generate the bootloader setting and can use mergehex.exe tool to merge the hex files. If you don't want to merge you can flash the setting first then flash the bootloader."

Would you explain the function to me. Some examples will be better for me.

Q5: I want doing  a OTA by a dongle and a PCA10056. which tools can be used on my disktop like the DFU of nrf toolbox on smart phone?  How I can connect the PCA10056 with the desktop(J2 or J3 or others connector)?  Do i need download the dfu project to the PCA10056? Do you have a manual with detail? 

Thanks,

Di-Sheng

Parents
  • Hi Edvin

    Thanks for your reply.

    I have added buttonless function into ble_app_blinky example of nRF5_SDK_16.0.0_98a08e2  which is for PCA10056. It works very well, and past the testing of DFU without button.

    I also try to add the buttonless function to light-switch server example of nrf5_SDK_for_Mesh_v4.0.0_src which is for PCA10056. but I got  an error of building:

     

        implicit declaration of function 'NRF_LOG_INFO'; did you mean 'NRF_GPIO'? [-Wimplicit-function-declaration]

        implicit declaration of function 'NRF_LOG_ERROR'; did you mean 'NRF_LOG_DEFERRED'? [-Wimplicit-function-declaration]

        'err_code' undeclared (first use in this function)

    I think I miss some files of SDK in my project which defined error code of SDK.

    Q1: Would you help me to find which files I missed.

    Q2: Will the function of MESH be affected or destroyed if SDK files are added?

    Thanks,

    Di-Sheng

  • Di-sheng said:
    Q2: Will the function of MESH be affected or destroyed if SDK files are added?

     I don't think so.

     

    Di-sheng said:
    Q1: Would you help me to find which files I missed.

     Look at where they are defined in the examples from the normal SDK. 

    But I think you may run into some trouble (I am not sure) if you try to add the log module from the normal SDK to the mesh SDK, since the Mesh SDK already have a logging module. Either remove the calls to NRF_LOG_INFO(), or replace them with the mesh log function.

Reply
  • Di-sheng said:
    Q2: Will the function of MESH be affected or destroyed if SDK files are added?

     I don't think so.

     

    Di-sheng said:
    Q1: Would you help me to find which files I missed.

     Look at where they are defined in the examples from the normal SDK. 

    But I think you may run into some trouble (I am not sure) if you try to add the log module from the normal SDK to the mesh SDK, since the Mesh SDK already have a logging module. Either remove the calls to NRF_LOG_INFO(), or replace them with the mesh log function.

Children
No Data
Related