Programming the nRF52840 Dongle from nRF Connect

2,926 views
Skip to first unread message

Jonathan Beri

unread,
Aug 23, 2018, 12:37:51 PM8/23/18
to openthread-users
I just received a new nRF52840 Dongle from Mouser with the intent to use it as a Sniffer with Wireshark. I also wanted to try the nRF Connect for Desktop GUI from Nordic to more easily program the device. I downloaded the pre-built NCP firmware from openthread.io and tried loading it in nRF Connect 2.5.0, Programmer 1.0.0-experimental.3. I can't seem to program the device and the warnings is a bit cryptic (see attached.)

Has anyone else been able to program the nRF52840 Dongle via the nRF Connect for Desktop?
Screen Shot 2018-08-23 at 9.24.02 AM.png

kamil...@nordicsemi.no

unread,
Aug 24, 2018, 6:34:16 AM8/24/18
to openthread-users
Support for nRF52840 dongle (PCA10059) is added via #2994.
You have to build firmware with BOOTLOADER=1 like so (assuming you are in root dir of OpenThread):
./bootstrap
make
-f examples/Makefile-nrf52840 BOOTLOADER=1 USB=1
arm-none-eabi-objcopy output/nrf52840/bin/ot-cli-ftd -O ihex ot-cli-ftd.hex
After those three steps you can use generated hex file with nRF Connect for Desktop.

Jonathan Beri

unread,
Aug 24, 2018, 6:44:30 PM8/24/18
to openthread-users
Thanks Kamil. Interestingly, once I flash the device, the Desktop tool seems to be doing some filtering on device target or USB product ID. Might be useful to remove or use the correct Product ID?
Screen Shot 2018-08-24 at 3.41.52 PM.png

kamil...@nordicsemi.no

unread,
Aug 28, 2018, 3:21:13 AM8/28/18
to openthread-users
This is expected. After flashing application starts and in this case it enumerates with application specific VID/PID which doesn't match bootloader VID/PID. So you have to reset the dongle to start bootloader again (or use DFU Trigger Library to trigger it from application). Check the documentation for more info here.

Jonathan Beri

unread,
Aug 30, 2018, 5:23:55 PM8/30/18
to openthread-users
Got it. I've got one step closer. However, when I try to launch sniffer.py with "python ./sniffer.py -c 11 -n 1 -u /dev/cu.usbmode | wireshark -k -i -", I get "ERROR: failed to initialize sniffer" in the terminal and "unrecognized pcap format or not libpcap data." on wireshark (presumably because the sniffer failed to initialize.)

I noticed that the docs mentioned, "For building an OpenThread ncp to support sniffer --enable-raw-link-api as a build option." I ran "./configure --enable-raw-link-api" before building the example. Anything else I might need to do? Does configure need more flags?

Jonathan Hui

unread,
Aug 30, 2018, 6:28:17 PM8/30/18
to Jonathan Beri, openthread-users
The `make -f examples/Makefile-nrf52840` also preforms the configure step. You can add the `--enable-raw-link-api` option by either:
  1. Adding it to the list of configure_OPTIONS in examples/Makefile-nrf52840
  2. Appending `LINK_RAW=1` to the `make -f ...` command (e.g. make -f examples/Makefile-nrf52840 BOOTLOADER=1 USB=1 LINK_RAW=1`)
Also be sure that you are loading the NCP firmware and not the CLI firmware.

--
Jonathan Hui

--
You received this message because you are subscribed to the Google Groups "openthread-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openthread-use...@googlegroups.com.
To post to this group, send email to openthre...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openthread-users/38b8f934-89e7-49cd-933a-ef96d99b2a0d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Yalcin

unread,
Sep 4, 2018, 9:44:10 AM9/4/18
to openthread-users

Hello.

I followed the discussion and built NCP firmware with recommended options.


> make -f examples/Makefile-nrf52840  BOOTLOADER=1 USB=1 LINK_RAW=1


then added both files to nRF Connect (Programmer app)

  1. NCP firmware:  ot-ncp-ftd.hex
  2. Softdevice:       s140_nrf52_6.1.0_softdevice.hex


But I’m getting the error: 

“Some of the .hex files have overlapping data”


I’m using MAC OSX. 


--- Yalcin

kamil...@nordicsemi.no

unread,
Sep 5, 2018, 5:25:34 AM9/5/18
to openthread-users
Just flash ot-ncp-ftd.hex

Softdevice is not needed for openthread as long as you are not using our multiprotocol solution.

Yalcin

unread,
Sep 6, 2018, 6:47:55 PM9/6/18
to openthread-users
Thank you for your help. But if I try just to flash ot-ncp-ftd.hex getting the error:
Neither Bootloader, Softdevice, nor Application detected. Write Button is also deactivated.
Any idea what is wrong?

Yalcin

unread,
Sep 7, 2018, 1:23:07 PM9/7/18
to openthread-users
I solved the issue, downloaded the newest version of openthread-master from Github. Run the commands in openthread directory, as mentioned from the Kamil, Jonathan Hui and Jonathan Beri.
./bootstrap

make -f examples/Makefile-nrf52840 BOOTLOADER=1 USB=1 LINK_RAW=1
arm-none-eabi-objcopy output/nrf52840/bin/ot-ncp-ftd -O ihex ncp_app.hex
And flashed with nRF Connect into the Dongle 52840 (pca10059), on MAC OSX environment.

nRF Connect v2.5.0 - Programmer (experimental) outputs error messages, that irritates, although flash write operation was successful.
e.g.
Reopen device failed: Timeout while waiting for device F4EFE18E8CA8 to be attached and enumerated
Nordic DFU Trigger Interface was not found.Please physically reset device.
Device not found due to failure during DFU

Jeff Bumgardner

unread,
Sep 7, 2018, 4:50:43 PM9/7/18
to Yalcin, openthread-users
Hey Yalcin - 

I get the same errors as you in nRF Connect, even though I was flashed the device successfully (following those same basic instructions).  So WAI, I suppose.

Jeff

--
You received this message because you are subscribed to the Google Groups "openthread-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openthread-use...@googlegroups.com.
To post to this group, send email to openthre...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages