Building RCP binary for USB (NRF52840 Dongle)

171 views
Skip to first unread message

tarun....@zenatix.com

unread,
Jul 24, 2020, 1:42:02 AM7/24/20
to openthread-users
Hi,

I was thinking of migrating older version of OpenThread which uses NCP to newer version of OpenThread which uses RCP. I looked at OpenThread repository and discovered that there is no option for compiling firmware of RCP for USB. 

Can anyone help with this. How I can use RCP over USB?

Yakun Xu

unread,
Jul 24, 2020, 1:48:46 AM7/24/20
to openthread-users
Hi, it should be the same as NCP. You will find the binary(ot-rcp)  in the same directory of ot-ncp-ftd. And you can convert it to hex format the same way as NCP.
Message has been deleted

Bhumika Jain

unread,
Jul 24, 2020, 6:24:02 AM7/24/20
to openthread-users
Hi,

I have built ot-rcp as described in the link build openthread. using the following make command..

make -f examples/Makefile-nrf52840 BORDER_AGENT=1 BORDER_ROUTER=1 COAP=1 COMMISSIONER=1 DISABLE_BUILTIN_MBEDTLS=1 DNS_CLIENT=1 DIAGNOSTIC=1 EXTERNAL_HEAP=1 JOINER=1 LINK_RAW=1 MAC_FILTER=1 MTD_NETDIAG=1 SERVICE=1 UDP_FORWARD=1 ECDSA=1 SNTP_CLIENT=1 COAPS=1 DHCP6_SERVER=1 DHCP6_CLIENT=1 USB=1

which is described in Nordic info centre.

After that I ran the following command..

1. ./configure --enable-ncp --enable-radio-only
2. make

after that in directory, output/nrf52840/bin  I executed the following command.

arm-none-eabi-objcopy -O ihex ot-rcp ot-rcp.hex

Now I flashed the ot-rcp.hex in my dongle.
but when I connect the dongle on my Border-Router Rpi, I can't seem to find any ACM0/USB0 port associated with rcp.

Please suggest what could be done.

Jonathan Hui

unread,
Jul 25, 2020, 12:41:29 AM7/25/20
to Bhumika Jain, openthread-users
If you are using the nRF52840 USB Dongle PCA10059, you need to add the `BOOTLOADER=USB` flag as noted in the Nordic Infocenter:

For PCA10059 support in a bare OpenThread environment, you need to add BOOTLOADER=USB flag.

The `make -f examples/Makefile-nrf52840 ...` command should produce the RCP binary. You should not need to run configure and make again after that.

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/openthread-users/0c60cd62-00b5-45c4-80c4-8257e0869aa4n%40googlegroups.com.

Bhumika Jain

unread,
Jul 25, 2020, 4:50:31 AM7/25/20
to openthread-users
After running make distclean and make clean command, I rebuild using the following command..

make -f examples/Makefile-nrf52840 BORDER_AGENT=1 BORDER_ROUTER=1 COAP=1 COMMISSIONER=1 DISABLE_BUILTIN_MBEDTLS=1 DNS_CLIENT=1 DIAGNOSTIC=1 EXTERNAL_HEAP=1 JOINER=1 LINK_RAW=1 MAC_FILTER=1 MTD_NETDIAG=1 SERVICE=1 UDP_FORWARD=1 ECDSA=1 SNTP_CLIENT=1 COAPS=1 DHCP6_SERVER=1 DHCP6_CLIENT=1 USB=1 BOOTLOADER=USB

and then the binary is generated in output/nrf52840/bin.
using "arm-none-eabi-objcopy -O ihex ot-rcp ot-rcp.hex", the hex file is generated, which I further flashed in nrf52840 dongle.
But still I can't any ACM/USB port associated with rcp in the Border Route Rpi.

Please suggest.

Jonathan Hui

unread,
Jul 27, 2020, 8:03:53 PM7/27/20
to Bhumika Jain, openthread-users
I just tested this and it worked for me. What are you using to flash your nRF52840 USB Dongle? I am using nRF Connect Programmer.

--
Jonathan Hui

Steven Riedl

unread,
Jul 27, 2020, 9:09:35 PM7/27/20
to Jonathan Hui, Bhumika Jain, openthread-users
BOOTLOADER=1 ? Instead of BOOTLOADER=USB?

Also with just RCP, most of the rest of the flags are unnecessary…

I did get a working RCP build (once I realized they changed from NCP that I previously used)



Steven Riedl
rie...@gmail.com
(404) 205-9487
Skype: sriedl

"The difference between genius and stupidity is that genius has its limits" - Einstein

Jonathan Hui

unread,
Jul 27, 2020, 9:42:20 PM7/27/20
to Steven Riedl, Bhumika Jain, openthread-users
`BOOTLOADER=1` was deprecated in commit 3a248f6 and replaced with `BOOTLOADER=USB/UART/BLE`

Good point - many of the flags are specific to NCP and not necessary on RCP, but they should not affect the RCP build.

--
Jonathan Hui

Bhumika Jain

unread,
Jul 27, 2020, 10:38:20 PM7/27/20
to openthread-users
I am using nrfjprog to program my NRF52840 Dongle from nrf52840 dk board.
nrf52840 dongle don't have any bootloader and mbr image on it.

Jonathan Hui

unread,
Jul 29, 2020, 9:15:10 PM7/29/20
to Bhumika Jain, openthread-users
If you are using JTAG, then you do not need the BOOTLOADER flag.

What git commit id are you using for the openthread/openthread repo?

After plugging in your nRF52840 USB Dongle, what is the output of `lsusb -t`?

--
Jonathan Hui


Reply all
Reply to author
Forward
0 new messages