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

doing dfu ble as a PCA10059 dongle

To the kind attention of Nordic support team,

I'm very interested in understanding how to have firmware that is working as in PCA10059 in respect to USB bootloader and fw connectivity to do dfu ble.

I did:

C:\Users\astella\AppData\Local\Programs\Python\Python38\Lib\site-packages\pc_ble_driver_py\hex\sd_api_v5>nrfjprog --eraseall
Erasing user available code and UICR flash areas.
Applying system reset.

Then:

C:\Users\astella\AppData\Local\Programs\Python\Python38\Lib\site-packages\pc_ble_driver_py\hex\sd_api_v5>nrfjprog --family nRF52 --program s132_nrf52_5.1.0_softdevice.hex
Parsing hex file.
Reading flash area to program to guarantee it is erased.
Checking that the area to write is not protected.
Programming device.

And:

C:\Users\astella\AppData\Local\Programs\Python\Python38\Lib\site-packages\pc_ble_driver_py\hex\sd_api_v5>nrfjprog --family nRF52 --program connectivity_4.1.1_usb_for_s132_5.1.0.hex
Parsing hex file.
Reading flash area to program to guarantee it is erased.
Checking that the area to write is not protected.
Programming device.

After that I had nRF Connect USB CDC ACM (COM12) in my Device Manager and

>nrfutil -v -v -v -v dfu ble -ic NRF52 -pkg app26022020.zip -p COM12 -n "DfuTarg" worked fine. So that I'm really happy about that.

The thing that I'm still missing in the puzzle, is usb bootloader. I already tried and tested USB secured bootloader.

I was wondering If I can use USB secured bootloader,  s132_nrf52_5.1.0_softdevice.hex and connectivity_4.1.1_usb_for_s132_5.1.0.hex together?

Are they compiled in order to work well together? Can I use hex files how they are? Should I do any modification to their src code and rebuild them, for example to link them

appropriately?

Thank you for all your kindness and your work

  • I saw in C:\Users\astella\AppData\Local\Programs\Python\Python38\Lib\site-packages\pc_ble_driver_py\hex\sd_api_v5

    connectivity_4.1.1_usb_with_s132_5.1.0.hex. I understood it is an hex file containing soft device and usb connectivity firmware together.

    I'm trying to do a dfu package using this file, so that it can be used with the usb bsecured bootloader

  • When I compile my own application in order to work together with the usb bootloader, I add linker info for flash start and ram start. I don't know if connectivity_4.1.1_usb_with_s132_5.1.0.hex has been linked so that it can be used to generate a dfu package. May you please confirm it? I have tried and did a dfu package but it seems it doesn't work yet

  • Hi, 

    Maybe you have seen it already, but I would very much recommend reading Einar's blog post about programming the 52840 dongles here: https://devzone.nordicsemi.com/nordic/short-range-guides/b/getting-started/posts/nrf52840-dongle-programming-tutorial. The easiest way to program it is to use the Programmer app in nRF connect for desktop. It accepts hex files as well. Let me know if you still have questions after reading this.

    astella said:
    I don't know if connectivity_4.1.1_usb_with_s132_5.1.0.hex has been linked so that it can be used to generate a dfu package.

     Yes, it should work. DFU package generator will automatically strip away the MBR section which occupies the first flash page.

  • Thank you Vidar for your kindness. We are going to make a custom board that is dongle like.And it is meant to ota update firmware also in a second board. We are interested in understanding what is the firmware that is in the dongle. In order to have our custom board like it. With a usb bootloader and a usb connectivity firmware.

    I'm doing some test using a PCA10056. I'd like to better understand what firmware to flash in it so that it completely works like a dongle. I don't understand at this stage if I can use precompiled files or I have to build custom files, based on your connectivity src files. Please, Let me know if I'm clear in explaining what I need to understand.

    In the meantime I'm trying to better read the link you just sent and build a dfu package using the file

    connectivity_4.1.1_usb_with_s132_5.1.0.hex

    Best regards

  • I tried something like this :

    nrfutil pkg generate --sd-req 0x0 --sd-id 0x0 --hw-version 52 --key-file private.key --application-version 1 --application connectivity_4.1.1_usb_for_s132_5.1.0.hex --softdevice s132_nrf52_5.1.0_softdevice.hex dfu.zip
    Zip created at dfu.zip

    I programmed PCA10056 DK with secured usb bootloader already flashed in it.

    It took a while but the dfu.zip was programmed.

    After that I had no the desired connectivity firmware working in order to do ota updating of a second board.

    To recap:

    the situation is:

    In PCA10056 DK s132_nrf52_5.1.0_softdevice.hex and connectivity_4.1.1_usb_for_s132_5.1.0.hex make it possible to do ota updating of a second board, when both files are flashed using jlink

    In the same PCA10056 I flashed the dfu.zip built with those working hex files, but using the secured usb bootloader. And it is not possible anymore to do ota updating of a second board.

    I don't know either if I'm wrong using precompiled files and/or wrong settings or I need to re build with appropriate option for the linker.

    Hope my question is clear.

    Thank you

Related