Thread CoAP Client with Joiner Role Active

I was trying to create a thread client that can be Commisioned by a border router (Raspberry) through its GUI.

I'm using in the prj.conf those commands for enabling joiner mode:

#Enable OpenThread FTD features set
CONFIG_OPENTHREAD_NORDIC_LIBRARY_FTD=y
#L2 OpenThread enabling
CONFIG_NET_L2_OPENTHREAD=y
#Generic networking options
CONFIG_NETWORKING=y



#Network parameter/OpenThread
CONFIG_OPENTHREAD_MANUAL_START=n
CONFIG_OPENTHREAD_COAP=y
CONFIG_OPENTHREAD_JOINER=y
CONFIG_OPENTHREAD_JOINER_AUTOSTART=y
CONFIG_OPENTHREAD_JOINER_PSKD="J01NUS"

# Network sockets
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_POSIX_NAMES=y
CONFIG_NET_SOCKETS_POLL_MAX=4

#Network shell
CONFIG_SHELL=y
CONFIG_OPENTHREAD_SHELL=y
CONFIG_SHELL_ARGC_MAX=26
CONFIG_SHELL_CMD_BUFF_SIZE=416

#Additional parameter
CONFIG_MBEDTLS_SHA1_C=y
CONFIG_FPU=y
CONFIG_MBEDTLS_HEAP_SIZE=20000
When i try to commision the device through the border router GUI it shows success but the device doesn't appesr in the topology.

Is this the right way to use these commands?

Should i use the joiner.h library, for example otJoinerStart ecc...?


Parents
  • Hi,

    If you have enabled CONFIG_OPENTHREAD_JOINER_AUTOSTART, you should not need to call otJoinerStart manually in the application, this is handled by the library. However, note that this will only be started if no commissioned dataset is present. Have you erased the device before programming your application, to make sure no old dataset is stored in flash?

    If the commissioning process succeeds, there is likely some other problem that is preventing the device from attaching to the network.

    Can you provide logs from device, sniffer log from the commissioning process, and logs from commissioner on the Raspberry?

    Best regards,
    Jørgen

Reply
  • Hi,

    If you have enabled CONFIG_OPENTHREAD_JOINER_AUTOSTART, you should not need to call otJoinerStart manually in the application, this is handled by the library. However, note that this will only be started if no commissioned dataset is present. Have you erased the device before programming your application, to make sure no old dataset is stored in flash?

    If the commissioning process succeeds, there is likely some other problem that is preventing the device from attaching to the network.

    Can you provide logs from device, sniffer log from the commissioning process, and logs from commissioner on the Raspberry?

    Best regards,
    Jørgen

Children
Related