| .. | ||
| README.md | ||
OpenThread Border Router on OpenWRT
Build
This is for local development.
1. Add OpenThread feed
Assuming OPENWRT_TOP_SRCDIR is the root of openwrt sources.
echo src-link openthread "$(pwd)/etc/openwrt" >> ${OPENWRT_TOP_SRCDIR}/feeds.conf
cd "${OPENWRT_TOP_SRCDIR}"
./scripts/feeds update openthread
./scripts/feeds install openthread-br
2. Enable OpenThread Border Router
OpenThread is not selected by default, so use menuconfig to select openthread-br (OpenThread Border Router).
make menuconfig
In the configure window, use the Up and Down keys to move the cursor and the Left and Right keys to choose an action.
- Select Network to enter its submenu.
- Enable openthread-br by moving the cursor to it and pressing Y.
- Select Exit to exit.
3. Build OpenThread Border Router
make package/openthread-br/compile
or to do a verbose make for debugging:
make -j1 V=sc package/openthread-br/compile
4. Install
Copy the generated ipk file into OpenWRT, and install with opkg.
opkg install openthread-br-1.0*.ipk
Usage
Start
Start otbr-agent manually:
# Assuming that ttyUSB0 is a RCP with baudrate 115200.
/usr/sbin/otbr-agent 'spinel+hdlc+uart:///dev/ttyUSB0?uart-baudrate=115200'
Edit the service file /etc/init.d/otbr-agent if RCP device is not /dev/ttyUSB0 and then start with:
service otbr-agent start
Test
Enter the OpenWRT web GUI. There will be a new item Thread under Network. Scan or create network here.