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

NRF52833: Impelementation of DFU serial bootloder without signed key.

Hi,

We have 2 microcontroller on board. One of our micro controller will update nordic chip using serial DFU without any signed keys.

For testing purpose i am implementing simple Serial bootloader On NRF52833 development kit and SDK 16.0.0. 

I am referring following example.

https://devzone.nordicsemi.com/f/nordic-q-a/56155/nrf52833-uart-bootloader

I am able to run example code on NRF52833 dev board but serial DFU is failing.

I am facing following issue:

  1. I unable the  NRF_DFU_REQUIRE_SIGNED_APP_UPDATE 0 for not using secure bootloader. is this right to ignore signed dfu update?
  2.  I have created zip package "nrfutil pkg generate --debug-mode --application ble_llecu4.hex app_dfu_serial_pkg.zip" for testing purpose. is this right?
  3. Using zip file i have tried to transfer application file "nrfutil dfu serial -pkg app_dfu_serial_pkg.zip -p 5 -b 115200 -fc 0" but iam getting following error

File "c:\python38-32\lib\site-packages\nordicsemi\dfu\dfu_transport_serial.py", line 202, in open
raise NordicSemiException("Serial port could not be opened on {0}"
pc_ble_driver_py.exceptions.NordicSemiException: Serial port could not be opened on 5. Reason: None

 

Can anybody suggest above approach is right or not? Also what will be the while accessing serial port.

  • Hi Swapnil

    1. We tested this on our end, and setting NRF_DFU_REQUIRE_SIGNED_APP_UPDATE to 0 seems to do the trick if you'd like to do an open DFU.

    2. This seems correct.

    3. This error seems to be caused due to something else using the serial port. Are you, for example, using UART for logging while debugging, or using UART for something else? Please try power cycling (turning off the board and removing power sources, then turning it back on) the board before starting the DFU (and not doing anything else before calling "nrfutil dfu serial".

    Best regards,

    Simon

  • Hi Simon,

    We have one  query regarding application or softdevice  package zip file created for dfu process, the file containing dat file(Init packet)  and bin file(application firmware or softdevice).

    The question arises due to we are not using any Nordic application to upgrade firmware. As you know DFU process initiated into in our Host Micro controller, So copying this files into host takes place using Xmodem protocol on TeraTerm.

    Could you please suggest how can we create these files and merging into single file without ani ZIP and UNZIP file process?

  • Hi Simon,

    Adding some more clarification on above query

    Using nrfutil we create DFU package ZIP file which contain init packet and application firmware.  My question is how can we replace DFU package zip file creation process with creating only .dat file(init packet ) and bin file(application or softdevice)?
    The reason behind is, after ZIP file creation we have to extract it, merge dat and bin file into single bin file send it to our host micro controller over Tera term.

    Basically we just want to avoid one step of ZIP file.

  • Hi Swapnil

    This should be possible, but we don't have anything that does this already, so you will have to implement this yourself. Here are a few suggestions for what you can take a look at. Please check out the message sequence chart here which describes how the transfer of an init packet and firmware image is done. 

    You can also modify the UART DFU Master code, found here, to use the BLE transportation layer instead of UART.

    Best regards,

    Simon

Related