Thread Joiner cannot find commissioner network

Hi all,

I have one program that starts and sets up a commissioner and another that starts a joiner and tries to join the commissioner's network. However, after starting the commissioner and calling otJoinerStart through Openthread's API, the joiner gives error 23 (not found) indicating that it can't find the network. 

I have set the network key, PAN ID, extPAN ID, and channel so I'm not sure where I went wrong.

Here are some basic logs of this error occurring.

On commissioner: 

<info> app: Device joined the Thread network.
<info> app: Commissioner state: Petitioning
<info> app: Commissioner started successfully.
<info> app: Commissioner state: Active
<info> app: Joiner added successfully, awaiting joiner devices.
<info> app: State changed! Flags: 0x00800201 Current role: 4


On Joiner:

<info> app: State changed! 0
<info> app: Joiner failed to join: 23
<info> app: State changed! Flags: 0x0800000B Current role: 0

Please not that the joiner device is not yet attached to a network and will do so after discovering the existing network started by the commissioner.

Thanks,
Glen

Parents
  • Hi Glen,

    Have you added the Joiner entry with the device-specific pre-shared key (PSKd) on the commissioner? You can do so using otCommissionerAddJoiner() or otCommissionerAddJoinerWithDiscerner().
    OpenThread CLI - Commissioning shows how to commission using joiner with CLI commands. You can find implementations of the CLI commands and, therefore, which functions are used and how they are used in modules/lib/openthread/src/cli/cli_commissioner.cpp and modules/lib/openthread/src/cli/cli_joiner.cpp. You can also find more information about the commissioning process in our documentation OpenThread commissioning.

    Best regards,
    Marte

  • Hi Marte,

    Yes I have assigned the same PSKd for both devices when starting the commissioner and starting the Joiner device. I must add that I am not using the eui64 of the joiner devices when starting the commissioner and that I allow any joiner device to join by using the wildcard.

    Thanks,
    Glen

  • Also here's some logs I manage to get from the nrf sniffer. I'm not sure what data I should be looking at so I just put everything in this file. 

    Commissioner logs..pcapng

  • Hi,

    The packets in the sniffer log are Bluetooth LE packets, not 802.15.4 and Thread. Please use the nRF Sniffer for 802.15.4 and not the nRF Sniffer for Bluetooth Le. Can you capture a new log using the 802.15.4 sniffer?

    Can you share the thread_configuration you use in thread_init() on the joiner and where you define your PSKd (my_pskd)?

    Glenyz said:
    Additionally the commissioner calls OtThreadSetEnabled() to attach to a thread network before calling otCommissionerStart().

    Can you try calling otCommissionerStart() only after the commissioner has become a leader?

    Best regards,
    Marte

  • Hi Glen,

    You can also take a look at the OpenThread commissioner and joiner examples here: https://github.com/martelmy/NCS_examples/tree/main/openthread. They are based on the nRF Connect SDK, so there will be some differences compared to the nRF5 SDK, but many of the OpenThread-related parts are very similar.

    Please note that these are not official examples and should be considered provided “as-is”.

    Best regards,
    Marte

  • Hi Marte,

    Thanks for the feedback, I'm currently having trouble getting the sniffer for 802.15.4 running as it isn't showinig up on Wireshark after following the steps on the guide.

    Can you share the thread_configuration you use in thread_init() on the joiner and where you define your PSKd (my_pskd)?

    Here's the code for this:

    #define JOINER_PSKD "J01NME" 
    #define JOINER_TIMEOUT 300
    
    ////
    
    
    void thread_instance_init(void)
    {
        thread_configuration_t thread_configuration =
        {
            .radio_mode        = THREAD_RADIO_MODE_RX_ON_WHEN_IDLE, //THREAD_RADIO_MODE_RX_OFF_WHEN_IDLE, //THREAD_RADIO_MODE_RX_ON_WHEN_IDLE,
            .autocommissioning = true, //false, //true,
            .autostart_disable = true, //true, //false,
            .poll_period = 1500,
            .default_child_timeout = 240000,
        };
    
        thread_init(&thread_configuration);
        thread_state_changed_callback_set(thread_state_changed_callback);
    }


    The thread_init() function is used as is from thread_utils.c


    I've changed the commissioner to only start when it is in the leader state, but the same issue persists. The problem is that the commissioner seems to be starting just fine but the joiner cannot find the network. 

    I will try to get back to you with the sniffer logs asap if I can get it working.

    Thanks for the help.

    Best,
    Glen

  • Hi Glen,

    Glenyz said:
    I'm currently having trouble getting the sniffer for 802.15.4 running as it isn't showinig up on Wireshark after following the steps on the guide.

    Please share the output you get when checking the available interfaces with the sniffer tool. Inside the Wireshark extcap folder where you placed the nrf802154_sniffer.py file, run the following command:

    On Windows:

    nrf802154_sniffer.bat --extcap-interfaces

    On Linux or macOS:

    nrf802154_sniffer.py --extcap-interfaces

    Glenyz said:
    Here's the code for this:

    Can you try changing .autocommissioning to false? When set to true, it will use pre-commissioned data to join the Thread network, which might cause issues with the joiner role.

    Best regards,
    Marte

Reply
  • Hi Glen,

    Glenyz said:
    I'm currently having trouble getting the sniffer for 802.15.4 running as it isn't showinig up on Wireshark after following the steps on the guide.

    Please share the output you get when checking the available interfaces with the sniffer tool. Inside the Wireshark extcap folder where you placed the nrf802154_sniffer.py file, run the following command:

    On Windows:

    nrf802154_sniffer.bat --extcap-interfaces

    On Linux or macOS:

    nrf802154_sniffer.py --extcap-interfaces

    Glenyz said:
    Here's the code for this:

    Can you try changing .autocommissioning to false? When set to true, it will use pre-commissioned data to join the Thread network, which might cause issues with the joiner role.

    Best regards,
    Marte

Children
Related