This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Thread node defaults to child, unable to change into router node

Hello there,

I've set up 1.RaspberryPi with an otbr docker container.

Thanks to Sigurd I have set up 2.nRF21540DK running CoProcessor firmware built with nRF Connect SDK 1.7.1

Device 3.ot-cli-ftd, I have connected this device to the thread network and it always joins as a Child. I would like to change it into a router, but I am unable to change the state into router using "state router"

The firmware for device 3.ot-cli-ftd is running on a bmd-341(nRF52840) built with the ot-nrf528xx repository(commit 856c280bed73ba8846ded933ab4cf758e9af2dae).

Output of commands run on device 3.ot-cli-ftd:

> thread stop
Done
> dataset init new
Done
> dataset panid 0x1234
Done
> dataset channel 15
Done
> dataset networkkey 00112233445566778899aabbccddeeff
Done
> dataset networkname OpenThreadDemo
Done
> dataset commit active
Done
> ifconfig up
Done
> thread start
Done
> state
detached
Done
> state
child
Done
> scan
| J | Network Name     | Extended PAN     | PAN  | MAC Address      | Ch | dBm | LQI |
+---+------------------+------------------+------+------------------+----+-----+-----+
| 0 | OpenThreadDemo   | 12a6e0c91b69d217 | 1234 | 9edd723f5b2e6928 | 15 | -79 |  60 |
Done
> version
OPENTHREAD/thread-reference-20200818-1453-g7a1c843ff; NRF52840; Jan 18 2022 15:24:00
Done
> version api
183
Done

Also when I scan on device 3.ot-cli-ftd the rssi from the 2.nRF21540DK is very low(-79dBm). When I scan from 2.nRF21540DK the RSSI of device 3.ot-cli-ftd seems normal(-47dBm).

Output of commands run on device 2.nRF21540DK:

root@44002931789c:/app# ot-ctl
> state
leader
Done
> neighbor table
| Role | RLOC16 | Age | Avg RSSI | Last RSSI |R|D|N| Extended MAC     |
+------+--------+-----+----------+-----------+-+-+-+------------------+
|   C  | 0x4801 |  85 |      -49 |       -49 |1|1|1| 9ec763b364ebdab9 |

Done
> extpanid
12a6e0c91b69d217
Done
> scan
| J | Network Name     | Extended PAN     | PAN  | MAC Address      | Ch | dBm | LQI |
+---+------------------+------------------+------+------------------+----+-----+-----+
> | 0 | OpenThreadDemo   | c10610524d6090c8 | 1234 | 9ec763b364ebdab9 | 15 | -47 | 188 |
Done
childip
Done
> version
OPENTHREAD/a193a6f; POSIX; Sep  2 2021 10:19:05
Done
> version api
158
Done

Parents
  • Hi Frank

    Thanks to Sigurd

    I'm happy to help : )

    Are you still running the  BMD-341 as a Thread Sleeping end device?

    From Device Types:
    A SED is a MTD. And a MTD is always a End device.

    You need to make the device a Full Thread Device (FTD) for it to be a router.

    Also when I scan on the ot-cli device, the rssi from the nRF21540DK is very low(-79dBm). When I scan from the nRF21540DK the RSSI seems normal(-47dBm).

    I do not think I understand the difference between the two different scenarios. Could you explain in a bit more detail?
    Is there different firmware running on the nRF21540DK for each?

    Regards,
    Sigurd Hellesvik

Reply
  • Hi Frank

    Thanks to Sigurd

    I'm happy to help : )

    Are you still running the  BMD-341 as a Thread Sleeping end device?

    From Device Types:
    A SED is a MTD. And a MTD is always a End device.

    You need to make the device a Full Thread Device (FTD) for it to be a router.

    Also when I scan on the ot-cli device, the rssi from the nRF21540DK is very low(-79dBm). When I scan from the nRF21540DK the RSSI seems normal(-47dBm).

    I do not think I understand the difference between the two different scenarios. Could you explain in a bit more detail?
    Is there different firmware running on the nRF21540DK for each?

    Regards,
    Sigurd Hellesvik

Children
  • Hi Sigurd,

    I have multiple BMD-341 devices, this one is running the ot-cli-ftd firmware.

    Situation 1:

    1. RPi running otbr docker

    2. nRF21540DK running the coprocessor firmware built with nRF Connect SDK

    3. A BMD-341 running ot-cli-ftd firmware built with the ot-nrf528xx repository

    - When I scan with 3. ot-cli-ftd, it sees 2. nRF21540DK with a RSSI of -79

    - When I scan with 2. nRF21540DK, It sees 3. ot-cli-ftd with a RSSI of -49

    - The state of 3. ot-cli-ftd is Child, I want this device in the Router-role. When I issue the command "state router" nothing happens. I dont know how to get this device into a Router-role. This device is capable of being a leader/router. I have had two ot-cli-ftd devices in a network, with one leader and one child.

    What I want to achieve is a Thread network bridged to the internet. 3 Devices in the Thread network, the leader, a router and a SED. Then I want to see what the range/coverage is and what the delay to a SED device is one hop away.

  • Hi

    For the RSSI, I would guess that it is somehow due to different methods for calculating RSSI.
    See this post for some earlier discussion on Thread RSSI.

    I will have to look a bit more into how we calculate RSSI to confirm this though, and will return in a couple days with my findings.

    fhfs said:
    The state of 3. ot-cli-ftd is Child, I want this device in the Router-role. When I issue the command "state router" nothing happens. I dont know how to get this device into a Router-role. This device is capable of being a leader/router. I have had two ot-cli-ftd devices in a network, with one leader and one child.

    When I program two different nRF52840DK with the ot-nrf528xx sample and the nRF Connect SDK nrf/samples/openthread/cli, I am able to change the ot-nrf528xx sample from child to router and back using "state router" and "state child".

    I know it should not matter, but try again with the OTBR not connected to the network. Do you still experience the same issue?

    Regards,
    Sigurd Hellesvik

  • For the RSSI, I would guess that it is somehow due to different methods for calculating RSSI.
    See this post for some earlier discussion on Thread RSSI.

    I will have to look a bit more into how we calculate RSSI to confirm this though, and will return in a couple days with my findings.

    I will try to test the range between 2.nRF21540DK and 3.ot-cli-ftd to test if the signal strength is actually low or not.

    When I program two different nRF52840DK with the ot-nrf528xx sample and the nRF Connect SDK nrf/samples/openthread/cli, I am able to change the ot-nrf528xx sample from child to router and back using "state router" and "state child".

    I know it should not matter, but try again with the OTBR not connected to the network. Do you still experience the same issue?

    I just did a test with two ot-cli-ftd and I am unable to switch from child to router.

    ot-cli-1 (leader):

    > version
    OPENTHREAD/thread-reference-20200818-1453-g7a1c843ff; NRF52840; Jan 18 2022 15:24:00
    Done
    > thread stop
    Done
    > dataset init new
    Done
    > dataset panid 0x1234
    Done
    > dataset channel 15
    Done
    > dataset networkkey 00112233445566778899aabbccddeeff
    Done
    > dataset networkname OpenThreadDemo
    Done
    > dataset commit active
    Done
    > ifconfig up
    Done
    > thread start
    Done
    > state
    leader
    Done
    > scan
    | J | Network Name     | Extended PAN     | PAN  | MAC Address      | Ch | dBm | LQI |
    +---+------------------+------------------+------+------------------+----+-----+-----+
    Done
    > scan
    | J | Network Name     | Extended PAN     | PAN  | MAC Address      | Ch | dBm | LQI |
    +---+------------------+------------------+------+------------------+----+-----+-----+
    Done
    > scan
    | J | Network Name     | Extended PAN     | PAN  | MAC Address      | Ch | dBm | LQI |
    +---+------------------+------------------+------+------------------+----+-----+-----+
    | 0 | OpenThreadDemo   | 7811aac4cffb7eda | 1234 | 4630ed485f8001eb | 15 | -38 | 220 |
    Done
    > neighbor table
    | Role | RLOC16 | Age | Avg RSSI | Last RSSI |R|D|N| Extended MAC     |
    +------+--------+-----+----------+-----------+-+-+-+------------------+
    |   C  | 0xcc01 | 168 |      -39 |       -39 |1|1|1| 4630ed485f8001eb |
    Done
    > childip
    Done
    > child table
    | ID  | RLOC16 | Timeout    | Age        | LQ In | C_VN |R|D|N|Ver|CSL|QMsgCnt| Extended MAC     |
    +-----+--------+------------+------------+-------+------+-+-+-+---+---+-------+------------------+
    |   1 | 0xcc01 |        240 |         33 |     3 |  169 |1|1|1|  3| 0 |     0 | 4630ed485f8001eb |

    ot-cli-2 (child):

    > version
    OPENTHREAD/thread-reference-20200818-1453-g7a1c843ff; NRF52840; Jan 18 2022 15:24:00
    Done
    > thread stop
    Done
    > dataset init new
    Done
    > dataset panid 0x1234
    Done
    > dataset channel 15
    Done
    > dataset networkkey 00112233445566778899aabbccddeeff
    Done
    > dataset networkname OpenThreadDemo
    Done
    > dataset commit active
    Done
    > ifconfig up
    Done
    > thread start
    Done
    > state
    child
    Done
    > scan
    | J | Network Name     | Extended PAN     | PAN  | MAC Address      | Ch | dBm | LQI |
    +---+------------------+------------------+------+------------------+----+-----+-----+
    | 0 | OpenThreadDemo   | ca7f411f5f286a0b | 1234 | 8ede70bd2822a30c | 15 | -38 | 224 |
    Done
    > state
    child
    Done
    > state router
    Done
    > state
    child
    Done
    > state
    child
    Done
    > neighbor table
    | Role | RLOC16 | Age | Avg RSSI | Last RSSI |R|D|N| Extended MAC     |
    +------+--------+-----+----------+-----------+-+-+-+------------------+
    
    Done
    > routereligible
    Enabled
    Done
    > routerdowngradethreshold
    23
    Done
    > routerselectionjitter
    120
    Done
    > routerupgradethreshold
    16
    Done

  • Hi

    I am able to reproduce the error when I copy your commands. Both with our nRF Connect CLI and the ot-cli-ftd samples.

    The error seems to be related to the thread dataset functionality.

    If I create a thread network without using dataset, I see no issues:

    uart:~$ ot state
    disabled
    Done
    uart:~$ ot panid 0x1234
    Done
    uart:~$ ot networkkey
    f270265bf69d40ef1bdb959e0a4aa4d6
    Done
    uart:~$ ot networkkey 00112233445566778899aabbccddeeff
    Done
    uart:~$ ot ifconfig up
    Done
    uart:~$ ot thread start
    Done
    uart:~$ ot state
    child
    Done
    uart:~$ ot state
    child
    Done
    uart:~$ ot state router
    Done
    uart:~$ ot state
    router
    Done
    uart:~$ 
    

    I have tried changing the securitypolicy, but it did not help the issue.
    I will continue to investigate further into the dataset functionality.

    Regards,
    Sigurd Hellesvik

  • Wow, indeed. I can confirm that manually setting the channel/panid/networkkey does allow the state to be changed into router. How strange that it wont change to router when using the dataset.

    I will try to test the range between 2.nRF21540DK and 3.ot-cli-ftd to test if the signal strength is actually low or not.

    Within 1m range everything works fine, but when I put the device ~2m apart it was out of range.

Related