1. Склонировать репозитории git clone https://github.com/openthread/ot-nrf528xx.git cd openthread/ git clone https://github.com/openthread/openthread.git 2. Выполнить настройку пакетов ``` cd .. ./script/bootstrap ``` 3. Поменять порты для UART ``` root@app:~/iot/ot-nrf528xx# git diff src/nrf52840/transport-config.h diff --git a/src/nrf52840/transport-config.h b/src/nrf52840/transport-config.h index d408302..35350a3 100644 --- a/src/nrf52840/transport-config.h +++ b/src/nrf52840/transport-config.h @@ -74,7 +74,7 @@ * */ #ifndef UART_HWFC_ENABLED -#define UART_HWFC_ENABLED 1 +#define UART_HWFC_ENABLED 0 #endif /** @@ -142,7 +142,7 @@ * */ #ifndef UART_PIN_TX -#define UART_PIN_TX 6 +#define UART_PIN_TX 20 #endif /** @@ -152,7 +152,7 @@ * */ #ifndef UART_PIN_RX -#define UART_PIN_RX 8 +#define UART_PIN_RX 19 #endif /** ``` 3. Запустить сборку ``` ./script/build nrf52840 USB_trans arm-none-eabi-objcopy -O ihex build/bin/ot-cli-ftd ot-cli-ftd.hex ``` 4. Прошить ``` pyocd flash -t nrf52 ot-cli-ftd.hex ``` 5. Добавить child ``` > dataset networkkey 00112233445566778899aabbccddeeff Done > dataset commit active Done > state child Done > rloc16 4801 Done > ipaddr fd11:22:0:0:4488:3677:514a:7843 fd11:1111:1122:0:0:ff:fe00:4801 fd11:1111:1122:0:45df:e2dd:5b4b:7eed fe80:0:0:0:c32:6fcf:281e:3285 Done ``` 6. Остановка ``` thread stop factoryreset ``` https://openthread.io/codelabs/openthread-hardware#4