ओटीबीआर कोड पाना
Raspberry Pi पर:
git इंस्टॉल करें:
sudo apt install git
GitHub से
ot-br-posix
का क्लोन बनाएं:git clone --depth=1 https://github.com/openthread/ot-br-posix
OTBR बनाना और इंस्टॉल करना
OTBR में दो स्क्रिप्ट होती हैं, जो Thread बॉर्डर राऊटर को बूटस्ट्रॉप और सेट अप करती हैं:
cd ot-br-posix
./script/bootstrap
INFRA_IF_NAME=wlan0 ./script/setup
OTBR, Thread इंटरफ़ेस और इन्फ़्रास्ट्रक्चर नेटवर्क इंटरफ़ेस, दोनों पर काम करता है. जैसे, INFRA_IF_NAME
के साथ बताए गए वाई-फ़ाई/इथरनेट. थ्रेड इंटरफ़ेस को 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