네이티브 설치

GitHub에서 소스 보기

OTBR 코드 가져오기

Raspberry Pi에서 다음을 실행합니다.

  1. git을 설치합니다.

    sudo apt install git
    

  2. 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은 INFRA_IF_NAME로 지정된 스레드 인터페이스와 인프라 네트워크 인터페이스 (예: Wi-Fi/이더넷) 모두에서 작동합니다. 스레드 인터페이스는 OTBR 자체에서 생성되며 기본적으로 wpan0로 이름이 지정되고 인프라 인터페이스의 기본값은 INFRA_IF_NAME가 명시적으로 지정되지 않은 경우 wlan0입니다. 이더넷 케이블로 Raspberry Pi를 연결한 경우 이더넷 인터페이스 이름 (예: eth0)을 지정합니다.

INFRA_IF_NAME=eth0 ./script/setup

이제 otbr-agent 서비스가 사용 설정되었으며 재부팅 시 시작됩니다. 재부팅하지 않고 즉시 서비스를 시작하려면 server 스크립트를 사용하세요.

./script/server

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