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

USB DFU open_bootloader SoftDevice programming issue

Hello,

So I am just real confused on how the softdevice programming works via the open_bootloader right now and can't seem to track down the documentation I need to be successful.  So i have a working BLE app on the nrf52840 and I simply want to add in the USB DFU bootloader.  I followed the steps from other forum posts but seem to be stuck.

So firstly i am not sure i correctly identified the software FWID.  So I have a BLE application on the nrf52840 this means i have softdevice s140 correct?  Is there any way to verify the softdevice version in my Segger Embedded Studio project?

According to the release notes in my SDK it is s140 version 7.2 and the FWID is 0x100.. correct?

So next i created myself a key:

py -2 "C:\Python27\Scripts\nrfutil-script.py" keys generate C:\nrfKey.pem

Then i generated the code for the key and pasted it into the open_bootloader example:

py -2 "C:\Python27\Scripts\nrfutil-script.py" keys display --key pk --format code C:\nrfKey.pem

Now i generated by zip package using the key and FWID above:

py -2 "C:\Python27\Scripts\nrfutil-script.py" pkg generate --hw-version 52 --sd-req 0x100 --application-version 1 --application MyApp.hex  --key-file "C:\nrfKey.pem" app_dfu_package.zip

All good so far.  Finally i programmed my board with the open_bootloader using Segger embedded studio and i can see my board show up as COM20 on my PC as nRF52 SDFU USB.  So then i tried to write my application:

py -2 "C:\Python27\Scripts\nrfutil-script.py" dfu serial -pkg app_dfu_package.zip -p COM20

But i get this error:

File "C:\Python27\lib\site-packages\nordicsemi\dfu\dfu_transport_serial.py", line 502, in __get_response
raise NordicSemiException('Extended Error 0x{:02X}: {}'.format(resp[3], data))
pc_ble_driver_py.exceptions.NordicSemiException: Extended Error 0x07: The array of supported SoftDevices for the update does not contain the FWID of the current SoftDevice.

Not sure where to go from here?  What am i doing wrong?

Thanks,

Jarrod

Parents
  • Alright i got this figured out, I had two problems.  First was the project i was using wasn't referencing the SDK softdevice 7.2 it had version 6.1 stored in a subdirectory in the project folder and it was referencing that so the ID needed to be 0xae.

    Changing to this still didn't work however for a blank device.  For a blank device I had to build an image with an sd-req of 0x00:

    py -2 "C:\Python27\Scripts\nrfutil-script.py" pkg generate --hw-version 52 --sd-req 0x0 --application-version 1 --application MyApp.hex  --softdevice ./../../../nRF5/components/softdevice/s140/hex/s140_nrf52_6.1.0_softdevice.hex --sd-id 0xae --key-file "C:\nrfKey.pem" app_dfu_package.zip

    Then after this was programmed in the future i can just build the application without the softdevice and with the sd-req of 0xae and everything was good

    py -2 "C:\Python27\Scripts\nrfutil-script.py" pkg generate --hw-version 52 --sd-req 0xae --application-version 1 --application MyApp.hex --key-file "C:\nrfKey.pem" app_dfu_package.zip

    Thanks,

    Jarrod

Reply
  • Alright i got this figured out, I had two problems.  First was the project i was using wasn't referencing the SDK softdevice 7.2 it had version 6.1 stored in a subdirectory in the project folder and it was referencing that so the ID needed to be 0xae.

    Changing to this still didn't work however for a blank device.  For a blank device I had to build an image with an sd-req of 0x00:

    py -2 "C:\Python27\Scripts\nrfutil-script.py" pkg generate --hw-version 52 --sd-req 0x0 --application-version 1 --application MyApp.hex  --softdevice ./../../../nRF5/components/softdevice/s140/hex/s140_nrf52_6.1.0_softdevice.hex --sd-id 0xae --key-file "C:\nrfKey.pem" app_dfu_package.zip

    Then after this was programmed in the future i can just build the application without the softdevice and with the sd-req of 0xae and everything was good

    py -2 "C:\Python27\Scripts\nrfutil-script.py" pkg generate --hw-version 52 --sd-req 0xae --application-version 1 --application MyApp.hex --key-file "C:\nrfKey.pem" app_dfu_package.zip

    Thanks,

    Jarrod

Children
No Data
Related