OTBR 코드 가져오기
Raspberry Pi:
git을 설치합니다.
sudo apt install git
GitHub에서
ot-br-posix
를 클론합니다.git clone --depth=1 https://github.com/openthread/ot-br-posix
OTBR 빌드 및 설치
OTBR에는 스레드 보더 라우터를 부트스트랩하고 설정하는 두 가지 스크립트가 있습니다.
cd ot-br-posix
./script/bootstrap
INFRA_IF_NAME=wlan0 ./script/setup
OTBR은 Thread 인터페이스와 INFRA_IF_NAME
로 지정된 인프라 네트워크 인터페이스 (예: Wi-Fi/이더넷)에서 모두 작동합니다. Thread 인터페이스는 OTBR 자체에서 만들며 기본적으로 이름은 wpan0
입니다. INFRA_IF_NAME
가 명시적으로 지정되지 않은 경우 인프라 인터페이스의 기본값은 wlan0
입니다. Raspberry Pi가 이더넷 케이블로 연결된 경우 이더넷 인터페이스 이름 (예: eth0
)을 지정합니다.
INFRA_IF_NAME=eth0 ./script/setup
otbr-agent
서비스가 활성 상태인지 확인합니다.
sudo service otbr-agent status
● otbr-agent.service - Border Router Agent
Loaded: loaded (/lib/systemd/system/otbr-agent.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2021-03-01 05:46:26 GMT; 2s ago
Main PID: 2997 (otbr-agent)
Tasks: 1 (limit: 4915)
CGroup: /system.slice/otbr-agent.service
└─2997 /usr/sbin/otbr-agent -I wpan0 -B wlan0 spinel+hdlc+uart:///dev/ttyACM0
Mar 01 05:46:26 raspberrypi otbr-agent[2997]: Stop publishing service
Mar 01 05:46:26 raspberrypi otbr-agent[2997]: [adproxy] Stopped
Mar 01 05:46:26 raspberrypi otbr-agent[2997]: PSKc is not initialized
Mar 01 05:46:26 raspberrypi otbr-agent[2997]: Check if PSKc is initialized: OK
Mar 01 05:46:26 raspberrypi otbr-agent[2997]: Initialize OpenThread Border Router Agent: OK
Mar 01 05:46:26 raspberrypi otbr-agent[2997]: Border router agent started.
Mar 01 05:46:26 raspberrypi otbr-agent[2997]: [INFO]-CORE----: Notifier: StateChanged (0x00038200) [NetData PanId NetName ExtPanId]
Mar 01 05:46:26 raspberrypi otbr-agent[2997]: [INFO]-PLAT----: Host netif is down