nrfutil DFU BLE and connectivity firmware

MarcoTull gravatar image

asked 2017-05-18 03:34:56 +0100

Hey Guys,

I noticed when I use nrfutil DFU BLE command on the nRF52 DK the nrfutil program a "connectivity firmware" before the perform the DFU BLE to a Target device.

The issue I am facing is I am using a custom hardware with a different pinout that nRF52 DK and with no J-Link OB like the nRF5X DK boards. Making incompatible it with the "connectivity firmware"

Are there any documentation to use nrfutil DFU BLE using a custom hardware with no J-Link OB chip? or where can I find an using that firmware (I dont know the correct name) to edit the board.h and make it compatible with my hardware and be able to make BLE DFU from a window PC

Regards, Marco

edit retag flag offensive close delete report spam

1 answer

Sort by » oldest newest most voted
bjorn-spockeli gravatar image

answered 2017-05-18 14:55:27 +0100

tesc gravatar image

updated 2017-05-19 18:03:21 +0100

Hi Marco,

in order to create connectivity firmware that is compatible with custom nRF52 hardware you have to apply the sdk121_connectivity.patch, found here in the pc-ble-driver GitHub repo, to the connectivity example in SDK v12.1.0. You can find the connectivity example in examples\ble_central_and_peripheral\ble_connectivity\pca10040\ser_s132_hci. You can then change the pinout in pca10040.h or create a custom_board.h to match your custom hardware.

Best regards


edit flag offensive delete publish link more


Does it works using SDK v13?

MarcoTull ( 2017-05-18 15:04:20 +0100 )editconvert to answer

The patch is based on SDK v12.1.0. It will not work on other SDK releases. If you need to base it on another version of the SDK then you must port this patched version to the target SDK on your own.

Terje Schjelderup ( 2017-05-18 15:12:38 +0100 )editconvert to answer

The patch is SDK v12.1.0 specific, however it might work with SDK v13, but I have not tried that.

Bjørn Spockeli ( 2017-05-18 15:14:32 +0100 )editconvert to answer

@tesc I want to port it to another SDK version

@bjorn-spockeli Thank for the info now it is more clear for me


MarcoTull ( 2017-05-18 16:08:59 +0100 )editconvert to answer

@MarcoTull Hi, I have given this some more thought, and it is definitely best to keep it at the SDK and SoftDevice it was originally made for. Porting it would quickly require changes in pc-ble-driver as well. You may have a wish to do all development using the same SDK, I can see great value in that, but in this case it simply is not worth the effort. If you miss functionality in the current version then please let us know, so that we can consider it for future releases.

Terje Schjelderup ( 2017-05-18 17:12:56 +0100 )editconvert to answer

@terje SchjelderupTerje Thanks for the reply. Before I made any changes I am trying make to work the connectivity firmware with no luck. I am able to compile it using gcc, but when I runnrfutil DFU BLE it keeps programming other 'connectivity firmware' removing the one I programmed before image description


I am getting the following error: image description

Thanks, Marco

MarcoTull ( 2017-05-18 17:20:40 +0100 )editconvert to answer

If you apply the patch then it should recognise the firmware. Also, by default it should not flash the connectivity firmware. It will do so only if you provide the -f option. What is the nrfutil version?

Terje Schjelderup ( 2017-05-18 17:33:38 +0100 )editconvert to answer

I tried using the patch, but I always got the following message :

$ git apply < sdk121_connectivity.patch
error: corrupt patch at line 194
MarcoTull ( 2017-05-19 00:58:07 +0100 )editconvert to answer

That is the last line. I suspect whitespace. Can you double check that you have the full last line, and try with the --ignore-whitespace option?

Terje Schjelderup ( 2017-05-19 10:53:08 +0100 )editconvert to answer

@terje Schjelderup I was able to apply the patch :)

Now I am testing with the ser_s132_hci being a little slow about 2mins to perform the DFU and ser_s132_uart (unable to perform the DFU yet)

trying to improve the speed

MarcoTull ( 2017-05-19 15:07:33 +0100 )editconvert to answer

Of course! We use the hci version, not uart, so you were trying with the wrong example. Sorry for missing that.

Terje Schjelderup ( 2017-05-19 17:59:46 +0100 )editconvert to answer

Thanks, for all the help. A last question my whole program was made on SDK13 is possible apply it for the SDK13? making the changes for myself and what values for RAM (rwx) : ORIGIN = 0x2000bcc0, LENGTH = 0x4340 should I put SDK13>

MarcoTull ( 2017-05-19 18:14:11 +0100 )editconvert to answer

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer. Do not ask a new question or reply to an answer here.

[hide preview]

Question Tools

1 follower


Asked: 2017-05-18 03:34:56 +0100

Seen: 282 times

Last updated: mai 19 '17