The border router device provides connectivity of the nodes in the Thread network with the possibility to connect to the networks as the www.
Requirements
Hardware
K32W/JN5189 DK6 Board
Udoo Neo
Ethernet Cable
Software
MCUXpresso IDE v11.4.1 o newer.
SDK 2.6.4. https://mcuxpresso.nxp.com/en/dashboard
DK6 Production Flash Programmer Tool
udoo_neo_os_nxp.img
Docker Image
Software Set up
1. Flash udoo_neo_os_nxp.img on an SD card using a tool. You could use any tool to flash the image, make sure that the SD card is correctly formatted.
2. Flash the ot-rcp.bin file on the USB Dongle(K32W/JN5189), included in the SDK.
\K32W061DK6\middleware\wireless\openthread\openthread\output\k32w061\bin
DK6Programmer.exe -V5 -s COM2 -p ot-rcp.bin
Running OpenThread BorderRouter
You have connected your Udoo Neo board to an Ethernet cable, just open a new terminal to be sure that you have a connection. You could type the ping 8.8.8.8 command.
If you do not have the IPV4, you could access connection your board to your computer and use the USB IP. After that, you could open a browser and enter to the Udoo Neo page using the USB IP. You could use the different address for creating a SSH connection.
Install Docker
Copy the Docker image and Bash scripts to the Udoo Board;
Install docker;
curl -sSl https://get.docker.com | sh;
The command will take some time
Verify the Docker images was successfully loaded
Launch a Docker container
In this case, the UDOO NEO Extended doesn't have an Ethernet port, so, there is a USB converter to Ethernet. The OpenThread Example requires an IPV6 address
sudo ./run_br_container.sh;
Note: You have to have Ethernet Connection because the OpenThread requires IPV6.
Be sure that the file has the execute permissions.
The image below shows the process of the container.
You cannot use this terminal, as this is a running Docker instance. It will output logs from the wpantund while it’s running.
Open a new terminal and look at for the container ID
After that, open a browser and search the IPV4 of your UDOO Neo, and you will find an OpenThread web page.
On the left side, select the option form, and a new page will be displayed for the network creation.
Then you can ask for the wpanctl status, it will show all the Thread information, the address, the channel of the network, etc.
sudo wpanctl status
sudo wpanctl getprop Thread:OnMeshPrefixes
Node A
In the same UDOO terminal, start the border router internal commissioner and allow that a Thread node with the preshared key could join in this network.
sudo wpanctl commissioner start;
sudo wpanctl commissioner joiner-add “*” 120 J01NME;
Node B
Flash another JN5189/K32W using the REED example and type the next command for enabling and join to a Thread Network.
\K32W061DK6\boards\k32w061dk6\wireless_examples\openthread\reed
ifconfig up
joiner start J01NME
After the joining process is complete, type the next command to attach to the border router.
thread start
Look at the image below, you will notice the Node B Commands.
Ping the external internet 64:ff9b::808:808 to be sure that you have access to the internet.
For a better reference please look at the OpenThread Demo Applications User Guide included in your SDK documentation. "\K32W061DK6\docs\wireless\OpenThread"
11 Chapter Running Border Router Application Scenarios
Regards,
Mario
View full article