NCP using nRF52840 native USB

880 views
Skip to first unread message

Cheong

unread,
Nov 1, 2017, 12:29:50 AM11/1/17
to openthread-users
Hi everyone,

I am doing some experiments with OpenThread, I made a custom board (nRF52840 based) that we plan to use the native USB for connecting to external PC or RPi for a border router.

I am facing a problem that the USB CDC did not work for me, I loaded the OpenThread NCP firmware with USB enabled and then I tried using a Raspberry Pi 3 and openwrt, the wpantund did not work as expected and I could not create a mesh network successfully, please see the attached photo for the screen dump.

If I use their DK board via the USB interface chip, it works as expected.

I also tried to use my board to connect to a Win10 PC, the device manager shows the COM port correctly, but without any luck, the Nordic Thread Topology Monitor did not show the COM port and thus, the tool did not work for me. Again, if using their DK then it works as expected.

Thanks!

IMG_3779.jpg

lukas...@nordicsemi.no

unread,
Nov 5, 2017, 3:13:49 PM11/5/17
to openthread-users

Hello Cheong!

Thank you for using nRF52840 and OpenThread!

You wrote:
"If I use their DK board via the USB interface chip, it works as expected."

I want just to ensure, what do you mean by USB interface chip? Did you use native USB connector, or Jlink USB connector which emulates virtual UART?
Note that nRF52840 PDK has two USB connectors, and only one is directly connected to our nRF52840 chip for native USB support.

Have you also compiled nRF52840 Openthread port with USB=1 option? Please refer to our documentation - https://github.com/openthread/openthread/tree/master/examples/platforms/nrf52840#native-usb-support

When it comes to Thread Topology Monitor issue, it is the limitation of the current version. The tool filters COM ports with JLink product ID (to make the serial COM selection process easier - for the users who have our DK). All in all, right now you can't use Thread Topology Monitor tool with native USB.

Best regards,
Łukasz

piotr....@nordicsemi.no

unread,
Nov 6, 2017, 9:47:16 AM11/6/17
to openthread-users

Hello Cheong!

I see that you are starting wpantund manually with wpantund &.
In that case you may be starting the wpantund when another instance is already running as it autostarts with the OS.

I assume that you are using the Nordic Thread Border router image.
For such experiments you may want rather use /etc/init.d/thread_border_router stop followed by the /etc/init.d/thread_border_router start or just use the reboot command to reboot the whole Border Router.

As you are using the native usb connection please comment out the wpanctl reset and wpanctl sleep (lines 165 and 166) in /usr/local/sbin/thread_border_router
You can view the whole file below.
Then write changes and reboot the Border Router with the reboot command.

Just to confirm that you are really using the native USB connection when working with the PCA10056 kit:
Please note that for the native USB conenction you should connect the Development Kit as shown below with the nRF power source switch set to the USB position.


Please let us know what are you observations after trying these hints.

Kind regards,
Piotr Szkotak

Cheong

unread,
Nov 8, 2017, 3:41:03 AM11/8/17
to openthread-users
Hi Piotr,

Thank you for providing the hints to me.

Yes, I connected to the native USB and modified the script as you mentioned, but no luck, it did not work for me.

Would you mind to have a compiled NCP border router firmware for me to try? I am not sure if it was my compilation problem or not.

Best Regards,
Cheong

Cheong

unread,
Nov 8, 2017, 8:44:34 PM11/8/17
to openthread-users
Thank you, Lukasz, for the information about the Thread Topology Monitor. Yes, I did use the native USB connector with USB=1 switch to compile.

Cheong

unread,
Nov 8, 2017, 8:55:30 PM11/8/17
to openthread-users
Hi Piotr,

Why I said I might did wrong during the compilation because I used this command line to compile with the switches enabled:

make -f examples/Makefile-nrf52840 TMF_PROXY=1 BORDER_ROUTER=1 COMMISSIONER=1 USB=1


and the log shows it did not enable the configuration correctly, for example, the TMF Proxy support was still set to "no", but if I do the same for CC2538, the log shows correctly.

Thanks for your support.

 Link libraries                            :  

 Link maps                                 : yes 

 Pretty                                    : ${abs_top_srcdir}/.astyle/astyle-wrap.sh 

 Pretty args                               : astyle --options=${abs_top_srcdir}/.astyle/astyle-opts 

 Pretty check                              : ${abs_top_srcdir}/.astyle/astyle-wrap.sh 

 Pretty check args                         : astyle --options=${abs_top_srcdir}/.astyle/astyle-opts --dry-run 

 OpenThread CLI support                    : yes 

 OpenThread CLI-MTD support                : yes 

 OpenThread CLI-FTD support                : yes 

 OpenThread NCP support                    : yes 

 OpenThread NCP-MTD support                : yes 

 OpenThread NCP-FTD support                : yes 

 OpenThread NCP-BUS Configuration          : uart 

 OpenThread Multiple Instances support     : no 

 OpenThread MTD Network Diagnostic support : no 

 OpenThread builtin mbedtls support        : yes 

 OpenThread TMF Proxy support              : no 

 OpenThread Commissioner support           : no 

 OpenThread Joiner support                 : no 

 OpenThread DTLS support                   : no 

 OpenThread Jam Detection support          : no 

 OpenThread MAC Filter support             : no 

 OpenThread Diagnostics support            : yes 

 OpenThread Child Supervision support      : no 

 OpenThread Spinel vendor specific support : no 

 OpenThread Legacy network support         : no 

 OpenThread Certification log support      : no 

 OpenThread DHCPv6 Server support          : no 

 OpenThread DHCPv6 Client support          : no 

 OpenThread DNS Client support             : no 

 OpenThread Application CoAP support       : no 

 OpenThread Raw Link-Layer support         : no 

 OpenThread Border Router support          : no 

 OpenThread Service support                : no 

 OpenThread examples                       : nrf52840

piotr....@nordicsemi.no

unread,
Nov 9, 2017, 10:18:07 AM11/9/17
to openthre...@googlegroups.com
Hi Cheong,

Thank you for the response.
The make command you entered looks OK.

Moreover I am not able to reproduce the issue on a clean repo.
Here is what I did:

git checkout master
git fetch origin
git reset --hard origin/master
git clean -fdx
./bootstrap 
make -f examples/Makefile-nrf52840 TMF_PROXY=1 BORDER_ROUTER=1 COMMISSIONER=1 USB=1

the result is:
  OpenThread CLI support                    : yes
  OpenThread CLI-MTD support                : yes
  OpenThread CLI-FTD support                : yes
  OpenThread NCP support                    : yes
  OpenThread NCP-MTD support                : yes
  OpenThread NCP-FTD support                : yes
  OpenThread NCP-BUS Configuration          : uart
  OpenThread MTD Network Diagnostic support : no
  OpenThread builtin mbedtls support        : yes
  OpenThread TMF Proxy support              : yes
  OpenThread Commissioner support           : yes
  OpenThread Joiner support                 : no
  OpenThread DTLS support                   : yes
  OpenThread Jam Detection support          : no
  OpenThread MAC Whitelist support          : yes
  OpenThread Diagnostics support            : yes
  OpenThread Child Supervision support      : no
  OpenThread Legacy network support         : no
  OpenThread Certification log support      : no
  OpenThread DHCPv6 Server support          : no
  OpenThread DHCPv6 Client support          : no
  OpenThread DNS Client support             : no
  OpenThread Application CoAP support       : no
  OpenThread Raw Link-Layer support         : yes
  OpenThread Border Router support          : yes
  OpenThread examples                       : nrf52840
  OpenThread platform information           : NRF52840

Could you try the same steps?
Please note that it will destroy all the changes you have made.

Kind regards,
Piotr Szkotak

Cheong

unread,
Nov 10, 2017, 2:46:07 AM11/10/17
to openthread-users
Hi Piotr,

It works now (Raspberry Pi 3 + nRF52840 USB)! Thank you so much!

Best Regards,
Cheong

On Thursday, November 9, 2017 at 11:18:07 PM UTC+8, piotr....@nordicsemi.no wrote:
Hi Cheng,

Cheong

unread,
Nov 13, 2017, 3:51:39 AM11/13/17
to openthread-users
Hi Piotr,

On more question but I am not sure good or not to ask ^_^, please do not mind.

I know the Thread Topology Monitor will filter out non-segger USB CDC devices, I tried to change the USB PID and VID to the same as Segger's for the native USB, the TTM can now show the COM port correctly but after I connected, the GUI did not show anything. Do you think it is possible to use OpenThread with the TTM?

Thanks for your support.

Best Regards,
Cheong

lukas...@nordicsemi.no

unread,
Nov 15, 2017, 2:55:50 PM11/15/17
to openthread-users
Hello Cheong,

Thread Topology Monitor depends on CLI output to gather information about the network.

Recently, there was a commit in the openthread that changes the way of presenting Thread Diagnostc CoAP responses payload, specifically:

If you revert the string "DIAG_GET.rsp/ans" to "DIAG_GET.rsp", the TTM 0.8.0 should just work.

Anyway, we plan to release a new nRF5 SDK for Thread in couple of days with updated TTM and USB support.

Regards,
Łukasz

Cheong

unread,
Nov 27, 2017, 8:46:17 PM11/27/17
to openthread-users
Hi Łukasz,

Thanks for your update, the Thread SDK version 0.11 has been released and I will try it out.

Best Regards,
Cheong

Cheong

unread,
Jan 3, 2018, 10:02:12 PM1/3/18
to openthread-users
Hi Łukasz,

Do you have any plan on making Thread NCP with SPI interface? I tested both native USB and UART, they work great!

Regards,
Cheong

lukas...@nordicsemi.no

unread,
Jan 4, 2018, 4:27:18 AM1/4/18
to openthread-users
Hello Cheong,

Yes, we plan to support Thread NCP with SPI Slave interface for upcoming production release of nRF5 SDK for Thread (in March).
However you can expect to see this addition in OpenThread master branch earlier.

Note also, that production version of nRF52840 enables SPI Slave peripheral to transfer up to 65k of data, in contrast to maximum of 255 bytes in engineering samples of the chip,
which was the main reason to not include SPI Slave driver in OpenThread so far.

Regards,
Łukasz Duda

Cheong

unread,
Jan 6, 2018, 1:13:01 AM1/6/18
to openthread-users
Thanks Łukasz for the update, great news!

I have some chip samples with marked QIAABB on the chip, is it the production version or not yet?

Regards,
Cheong

lukas...@nordicsemi.no

unread,
Jan 12, 2018, 5:18:42 AM1/12/18
to openthread-users
Hello Cheong,

Yes, your version of the chip includes improved version of SPIS peripheral.

Regards,
Łukasz
Reply all
Reply to author
Forward
0 new messages