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

Serial DFU tool

I have a nrf51-DK, SDK 9.0, S110, dual-bank bootloader that supports both serial and ble protocols, developed using GCC/Eclipse. I'm able to flash my app/bootloader/softdevice using JLink through Eclipse as well as update my app via OTA. Now I need to be able to update the app via serial reflash. I use nRF Toolbox to do the OTA. Is there a similar app capable of performing serial reflash of my app? I see the format of the data and the handshake back and forth described here - infocenter.nordicsemi.com/index.jsp. Is there a tool/script available that implements this, or do I need to write this myself?

UPDATE: It looks like nrfutil is the program I need to do a serial reflash of my app. However, I'm having issues getting it to work. Here is what I'm sending:

nrfutil.exe dfu serial --package C:\Firmware\strobe\build\obj_strobe\strobe.zip --port 11 --flowcontrol --baudrate 38400

And here is what I get back:

Upgrading target on 11 with DFU package C:\Firmware\strobe\build\obj_strobe\stro be.zip. Flow control is enabled. [------------------------------------] 0%

Failed to upgrade target. Error is: Serial port could not be opened on 11. Reaso n: could not open port u'11': WindowsError(2, 'The system cannot find the file s pecified.')

Possible causes:

  • bootloader, SoftDevice or application on target does not match the requirement s in the DFU package.
  • baud rate or flow control is not the same as in the target bootloader.
  • target is not in DFU mode. If using the SDK examples, press Button 4 and RESET and release both to enter DFU mode.

C:\Program Files (x86)\Nordic Semiconductor\nRFgo Studio>

I have first put by dev kit into serial bootloader mode upon reset - I have LED3 lit.

From Windows Device Manager, I can see that Com11 is the correct port:

image description

The package file, strobe.zip, is the same file I use to program the device OTA, which works correctly. I generated it using the following: "c:\Program Files (x86)\Nordic Semiconductor\nRFgo Studio"nrfutil dfu genpkg strobe.zip --application strobe.hex --application-version 0xffff --dev-revision 0xffff --dev-type 0xffff --sd-req 0xfffe

Any ideas what I might be doing wrong? Thanks!

Related