This tutorial shows you how to build and run OpenThread Border Router for NXP i.MX6ULL with Silicon Labs EFR32 as RCP.
1. Setup build environment and build OpenThread Border Router for NXP i.MX6ULL EVK.
- 1.1 Download and setup VirtualBox and Ubuntu 20.04.03 LTS.
- 1.2 Install necessary tools:
- 1.3 Setup Yocto build environment.
curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
export PATH=${PATH}:~/bin
sudo update-ca-certificates
mkdir yocto-otbr
cd yocto-otbr
git config --global user.email "youremail@email.com"
git config --global user.name "yourname"
repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-hardknott -m imx-5.10.35-2.0.0.xml
repo sync
- 1.4 Integrate the meta-matter recipe into the Yocto code base
git clone https://github.com/NXPmicro/meta-matter.git
- 1.5 Install necessary package to build the Yocto Project.
- 1.6 Download 0001-Add-TUN-device-support-for-arm.patch into yocto-otbr/sources/meta-imx folder and run the following git command to patch it (This will build /dev/net/tun on i.MX6ULL system for otbr-agent).
- 1.7 Generate the Yocto image with OpenThread Border Router support.
- 1.8 After previous two commands are excuted successfully, the Yocto image imx-image-multimedia-imx6ullevk.wic.bz2 will be generated under yocto-otbr/bld-xwayland/tmp/deploy/images/imx6ullevk/. imx-image-multimedia-imx6ullevk.wic.bz2 should be unzip to imx-image-multimedia-imx6ullevk.wic.
- 1.9 Use "ls /dev/sd*" to check the sd card name. In my , it's "sdb" Use dd command
to program imx-image-multimedia-imx6ullevk.wic.bz2 to a microSD.
- 1.10 After previous step is done, the microSD card can be used to boot i.MX6ULL EVK with OpenThread Border Router capability.
2. Download OT-RCP into Silicon Labs BRD4161A (EFR32 radio board) using Simplicity Studio v5.
- 2.1 Instead of building OT-RCP for Silicon Labs BRD4161A by myself, I install Simplicity Studio v5 and Gecko SDK Suite v3.2.3 with OpenThread 1.2.3.0
- 2.2 Download prebuilt OT-RCP into Silicon Labs BRD4161A directly.
3. Connect NXP i.MX6ULL EVK with Silicon Labs EFR32 as RCP to test OpenThread Border Router.
- 3.1 Connect Silicon Labs BRD4161A+BRD4001A to i.MX6ULL EVK with USB cable and put the the microSD (built in step 1) to power on i.MX6ULL EVK.
- 3.2 Use root to login i.MX6ULL EVK debug console and run the following command to start otbr-agent
- 3.3 Run ot-ctl, which is a command line utility provided with OTBR. It is used to communicate with the Thread PAN interface (default is wpan0) that otbr-agent is bound to in the RCP design, to start test everything.
- 3.4 You can refer to step 5, 6, and 7 in this post to test OTBR and an OT-CLI-FTD node.
P.S. Thanks Elven Wang @NXP and Jonathan Hui @Google for their great help to make all of these work together. The followings are reference links of previous works that help me lots.
























