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

SDK12 DFU service not found

I am developing software for a custom hardware based on NRF52. Previously I was tasked on updating the old NRF51 based software (used on older version of the device) for NRF52 using SDK11. Once that was done my next task was updating the software for SDK12. The software is otherwise working fine but I am having problems with DFU. I tried creating a zip of the application and flashed the combined softdevice/bootloader from SDK12 examples folder (dfu/ble_dfu_send_hex) to the device. The device shows as DfuTest on the mobile DFU app but when I try to upload the zip all I get is "DFU service not found". I also tried compiling the secure DFU bootloader example and using that instead but the result is the same.

Do I need to also have DFU support in the application for that to work ? Currently the application has some kind of DFU functionality from the earlier SDK 11 implementation but I'm guessing that wont work. Any examples to study so that I can implement the functionality ?

  • Hi, Did you do bonding with the phone when you test your app ? Have you included the "service changed characteristic" in your app ? (IS_SRVC_CHANGED_CHARACT_PRESENT = 1 )

    If you use nRF Connect app to connect and do service discovery, what do you see in the attribute table ?

  • Hi. Is this the setting ?

    ble_enable_params.gatts_enable_params.service_changed = 1;
    

    (from BLE initialisation code)

    Service part in nRF connect shows:

    Unknown service UUID: 000fe59-0000-1000-8000-00805f9b34fb (primary service).

    Perhaps this is the problem ?

  • I did some examination. It seems that the hex file containing both softdevice and bootloader is somehow broken (or possibly incompatible with the mobile application). If I upload that to the device and use nRF Connect on mobile it shows "Unknown service", but if I upload the relevant hex from SDK 11 the DFU is shown just fine ("Device Firmware Update Service"). Perhaps the mobile app is incompatible with the new SDK and must be updated ?

    update: it seems old version was indeed the problem. I updated both NRF Connect and NRF toolbox and the unit now shows up as it should (and the service is also shown as "Secure DFU Service". I still have problems uploading the packet, as if I try to upload it I get "Error: unknown (8202)".

    I guess it is not a problem with signing but with something else ?

  • The UUID is the DFU bootloader UUID that we registered with Bluetooth Sig. No issue there.

    Please let me know your nRFConnect version. The latest version on Google play/Appstore is compatible with SDK v12 DFU bootloader.

  • As I mentioned in my previous edit the problem seems to be the outdated version of NRF toolbox and NRF Connect. I updated both and then tried again. I did it as follows:

    1. flash softdevice to the device (S132 v 3.0.0)
    2. flash bootloader (I used the SDK 12 secure bootloader compiled using the public key from the private key I had created)
    3. Create zip from the application using the private key as signature.
    4. Upload using NRF DFU tool

    The upload worked without problems and the software started flawlessly (as evidenced by the debug logs in TeraTerm). However, it seems the DFU functionality in the application is not working since if I try to do an update while the application is running I get the "DFU service not found" error. What would be the proper way of implementing that under SDK 12 ?

Related