More than one device with a leader role in the same thread network.

Hi!!

I am facing an issue wherein more than one device is acquiring the leader role in a same thread network.

In my setup, I have a total of 4 devices. Three of them are nfr52833_dk and one is nfr52840_dk. I am using the NCS v1.6.1 SDK version to build the projects. On three of the nfr52833_dk, I flashed coap_server open-thread sample and one nfr52840_dk I flashed coap_client open-thread sample.

When I turned on all the nfr52833_dk (running coap_server) I can see one of the devices acquire leader roles and the other two devices acquire router and child roles respectively which is correct.

But once I turn on the nfr52840_dk (running coap_client), I can see it also acquire a leader role.

After few seconds the devices with router and child role change to the leader role. Thus resulting in multiple leaders role devices in the same thread network.

I haven't done any changes to the sample program. Am I missing anything here?
Another thing is I verified the panid, master key, channel set on all devices. It's the same on all devices.

  • Hi Mohinish,

    This sounds weird. I suppose this should not be related to hardware so I tested with 3 nrf52840DK boards, one for coap_client and two as coap_severs, all connected with putty to monitor their state. Here are my testing steps.

    1. Power on two coap_servcers first. Run "ot state" command show one become a leader and another become router.

    2. Power on coap_client, it becomes a router.

    3. Press button 2 of coap_client, coap_server devices LED2 can be toggled.

    When programming the firmware I use "west flash --erase" to clean up potential former OT settings.

    I suspect the coap_client did not really join the existing OT network, so it created a new one and self-assigned as a leader

    Please pay attention to the above bold content and try to repeat the test to see if the problem still exists.

    Best regards,

    Charlie

  • Hi Charlie,

    Can you try reproducing the issue with 2 nrf52833DK and 1 nrf52840DK board in your setup?

    As I get this issue whenever I run the samples on dissimilar DK.

  • Hi Mohinish,

    Sorry for the late reply, I finally get two nRF52833DKs to do the test. Now I have two nRF52833DKs as coap_severs and one nRF52840DK as a coap_client. They have the same result as my former experiment. Again, I suspect your coap_client does not join the coap_servers' network, Is step3 work as expected on your setup? 

    Best regards,

    Charlie

  • Hi Charlie,

    As per Step 3 on button 2 press of coap client device, LED 2 of coap server device do not toggle.

    I suppose you tried this exercise with the NCS v1.6.1 SDK sample.

  • Yes, I test with the original NCS v1.6.1 SDK samples. 

    According to the symptom, your coap_client does not join the coap_servers' network. It is either its hardware or firmware that has problems. 

    Please reinstall NCS v1.6.1 to get a clean-build coap_client firmware and program it to another DK board to try. 

    Best regards,

    Charlie

Related