Thread border router : Network adapter set but no network

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Thread border router : Network adapter set but no network

2,327 Views
sterenn
Contributor II

Hello,

Using the USB-KW41Z board, I flashed it following the steps described in Instructions on how to use the USB-KW41Z Thread Border Router demo. I can now create a Thread network and connect other devices to it (here, FRDM-KW41Z boards). Ping between devices is OK.

I am using windows 7. On the drivers side, I can see NXP USB RNDIS in the list of network adapters (Devices manager/Network adapters), so I assume I've got the right driver. I restarted my computer after a first installation to make sure the driver was recognized.

However, I have no network to connect to, nor any "FD01:" prefix to the hypothetic IPv6 address of my border router as described in the Demo Application User's Guide. 

Did I forget a step ?

Thank you, 

Sterenn

8 Replies

1,485 Views
sterenn
Contributor II

To get more information, I did look at the router through an Ubuntu virtual machine. There, the router is identified as "USB Ethernet" and has the right "fd01::" prefix address (attached screenshot). Still, I am able to ping the router from a terminal, but not to access the other Thread devices connected to the Thread network. 

borderrouterVM.PNG

Any idea on how I could access the Thread network from here ?

Thank you, 

0 Kudos

1,485 Views
Alexandru-Lilia
NXP Employee
NXP Employee

Hi Sterenn,

I believe that you don't have global addresses on your devices. On your devices, if you don't see on ifconfig command "Global unicast address" it means that it is not set yet. In order to do this, on the shell of the border router you should add a dhcpserver with the following command thr nwkdata add dhcpserver -p <Prefix> - len <prefixLength> -t <lifetime in seconds>. After that, to notify the devices, you should write thr sync nwkdata.

For more information, check the Kinetis Thread Stack Shell Interface User's Guide.pdf found in the *SDK folder*/docs/wireless/Thread. Also in shell you could type help to see what commands are available. And also help *command* shows information about that specific command.

Please tell me if this was the problem. Good luck.

Regards,

Lilian

0 Kudos

1,485 Views
sterenn
Contributor II

Hi Lilian, 

It is very likely that you found the right problem. I have indeed only "local" addresses defined on ifconfig commads on my devices. 

However, I am affraid I cannot access the shell of the border router. I am using USB-KW41Z RNDIS, and I found the following on this post : 

The USB-KW41 RNDIS border router example does not support shell interface because there's only one USB port and it's already being occupied by the RNDIS. But you can create a thread network by double short pressing SW1. 

I did go in the border_router demo code to enable DHCP6 server macros, but this is not enough to add a dhcp server and notify the devices... 

Is there an alternative to shell ? (Though I haven't seen much keyboard commands available for USB-KW41Z  in the Demo Applications User's Guide)

Thank you,

0 Kudos

1,485 Views
Alexandru-Lilia
NXP Employee
NXP Employee

Hi Sterenn,

Sorry for the late reply and for the inconsistent information that I've provided to you. I answered by only guessing, didn't have at that time the hardware for testing this.

Let me tell you the steps I did to have connection between devices attached to the border router and PC.

  1. Flashed the USB-KW41Z_K22F with the necessary software. One observation, I found the project border_router in USB-KW41Z SDK, built  and flashed it(on KW41Z chip, on J1). And in USB-KW41Z_K22F SDK I found a binary, placed here [...]\USB-KW41Z_K22F\tools\wireless\binaries\rndis_bridge_spi_slave_usbkw41z_k22f.bin. This binary was flashed with Test Tool. On the bar from upper screen select Firmware Loader, make sure you have the flash programmer connected to K22F (on J6). By the way, here you can find the last SDKs.
    Select Board  MCUXpresso SDK Builder - Google Chrome.jpg
  2. I saw that my device was not recognized as RNDIS network adapter. It should look like this.
    pastedImage_16.png
    If it is not seen as in the image above, try the method provided in the thread you've posted in the first comment, there is a comment posted by Steven Riedl explaining how to do this.
  3. When I verify my interfaces, I've seen that there was created another one with fd01::... ip address.
    pastedImage_1.png
    Also, on my device that is connected to the BR has the following interface:
    pastedImage_2.png
  4. Pinging from device to PC was possible, and vice versa.
    pastedImage_3.png
    pastedImage_4.png
    Make sure you are using the unique local address.

I didn't set any routes, it was automatically done when I installed the driver. I am using Windows 10. You can check to see if they are set. Also, make sure that you put down the addresses correctly. First time I tried it failed, and I saw that the address weren't copied correctly to clipboard, it trimmed me some characters.

If it doesn't work, try getting the newest firmwares and drivers.

Good luck, and please tell me if you managed to solve the problem.

Regards,

Lilian

1,485 Views
sterenn
Contributor II

Hi Lilian, 

Thank you for the detailed answer.

I followed these steps with the only difference that I used JFlash Lite to flash K22F. The RNDIS Network adapter shows up as expected : 

border_router_1.PNG

After uninstalling and reinstalling the driver, the Ethernet configuration shows up in ipconfig : border_router_4.PNG

but as you can see there is no IPv6 configured : I am affraid this is due to a Group Policy of my company. 

So, in order not to be affected by it, I repeated the experiment plugging the USB-KW41Z on a Raspberry pi. Here, the IPv6 address shows up the same way as on your screenshots. 

The thing is, I still don't get to ping any Thread device tfrom the RaspPi, nor the RaspPi from the Thread device. I used the border_router example from the last SDK (built on 2018-05-07), first making no changes on it and then setting THREAD_BORDER_ROUTER_CONFIG on 1 in nwk_ip/core/interfaces/modules/thread_stack_config.h - still no pinging.

I also tried to set the routes manually : "route -6 add fd01:0:0:3ead::/64 metric 1 dev eth1" ... Still no pinging. 

Would you have some insights on linux configurations ? How is the border router supposed to set up the routes ? 

Thank you,

Sterenn

0 Kudos

1,485 Views
sterenn
Contributor II

Hi Lilian,

I connected the border router (short address 0x000), one host controlled device (short address 0x0400) and a thread router eligible end device (0x0800) to the thread network.

The interface configuration is the following :

 border_router_ifconfigTREED.PNG

(The border router is the second node).

  1. On the REED, I have the following routes :border_router_6_route.PNG

So we can see that we are routed to the border router through the Mesh network.

 

From the REED and Host controlled device, all the adresses (3 devices) from "getnodesip" can ping.

 2. On Windows, I had only IPv4 routes - as told before - and the interface was indeed enabled.

On the Pi (using Raspbian), the interface is enabled and has the following ipv6 addresses : fd01::84fo:whatever (global) and fe80::ff5:whatever (link)

Some routes are set, which give that the fd01:0:0:84f0:: and fe80:0:0:ff5:(full link address of the interface) go through eth1. No next hop is given.

3. Even when giving the interface -I eth1, we get either "network is unreachable" or "destination unreachable: address unreachable"

4. I have a second USB-KW41Z : the sniffer detects MLE and IEEE 802.15.4.

When REED pings eth1, it receives "Request timeout" while the sniffers identifies IEEE frames from the REED and to the REED (from Border router) containing "ACK" :

border_router_5.PNG

With this I feel we are really close from a result. If I get an ACK (so communication) on the MAC/PHY layer and not on the IP one, the problem should be in the configuration files (a misplaced macro) or indeed (thank you David for sharing) with a firewall or any other remaining security.

5. uname -r on the raspberry pi gives : 4.14.34-v7+

6. I've found information here - from the post you suggested - about a linux issue that would not allow Router advertisement on certain interfaces. I have indeed /proc/sys/net/ipv6/conf/eth1/accept_ra to 0, same for .../eth/autoconf and others. I will look further on that point. (Could this actually be our "firewall issue" ?)

I also noticed something that looks more like a MCUXpresso issue : the border router can be flashed by a binary file (generated by mcuxpresso) but I get an error when I launch debug directly through the IDE (still using j-link probe)

Thank you, 

Sterenn

0 Kudos

1,485 Views
david_piskula
NXP Employee
NXP Employee

Hi, last april when I worked on a project with the USB-KW41Z and FRDM-KW41Z I encountered a very similar issue to yours so I thought I'd mention it here, in case it helped a little.

I tested it on my home network and couldn't communicate from my end devices to my windows 10 machine and vice versa. If I recall correctly, I was using the SDK1.2 at the time. I tried moving my application to a Raspberry PI 2B with the Raspbian OS where I managed to send ping from the RPi to the end devices but not from the end devices to the RPi.

In the end I tried installing Ubuntu-Mate on the RPi and with that I could communicate both ways. I assumed it was a problem with the firewall or something related to that, but I didn't inspect it any further than that.

Regards,

David

1,485 Views
Alexandru-Lilia
NXP Employee
NXP Employee

Hi Sterenn,

Unfortunately, I don't have access at this moment to a Linux machine. I would verify the following things:

  1. See if I have the routes set on my machine.
  2. Better to be sure, the interface is enabled, right?
  3. See if I pass as parameter the interface to the ping if it gets an response. (ping -I)
  4. If you have another USB KW41Z to use it as a sniffer, to see if the messages from the Raspberry PI goes into the BR and are transmitted further.
  5. Is your Linux kernel version greater than 2.6?
  6. I found another thread on NXP community which is somehow related with your problem. I don't want to turn you away, but take a look, maybe you find some useful information.

If you don't manage to solve the problem, let me know, and try to provide me as much information as you can with your configuration.

Would you have some insights on linux configurations ? How is the border router supposed to set up the routes ? 

The routes are configured by the BR automatically, given that you don't have access to shell or other run-time modification interfaces, I would say that the problem is not there.

Regards,

Lilian

0 Kudos