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

Set Autocommissioning false in nrfConnect SDK

In nRF_SDK_for _Tread_and_Zigbee, we used to set autocommissioning as false in the "thread_configuration_t" configuration and then start joined so that my thread node used to get commission on my thread network.

Now I want to implement similar functionality in nRF_Connect_SDK. Please guide me on how can I disable auto commissioning in nRF_Connect_SDK and commission my coap_client_node on my existing thread network.

Parents
  • Hi Bhumika

    Use CONFIG_OPENTHREAD_MANUAL_START.

    For more information on Thread configurations see Configuring Thread in nRF Connect SDK.

    Regards,
    Sigurd Hellesvik

  • There is a crash I am seeing when the node is trying to attach to my existing thread network.

    Also, I have increased the CONFIG_SHELL_STACK_SIZE to 3168. and enabled CONFIG_OPENTHREAD_JOINER to y and also enabled CONFIG_OPENTHREAD_JOINER_AUTOSTART

    [00:00:00.114,898] <inf> net_l2_openthread: OpenThread version: OPENTHREAD/69eb7030c-dirty; Zephyr; Jan  4 2022 15:43:19
    [00:00:00.115,509] <inf> net_l2_openthread: Starting OpenThread join procedure.
    [00:00:00.116,149] <inf> net_l2_openthread: State changed! Flags: 0x0900900b Current role: 0
    [00:00:05.045,654] <inf> net_l2_openthread: State changed! Flags: 0x0800c00b Current role: 0
    [00:00:05.745,635] <err> os: ***** MPU FAULT *****
    [00:00:05.745,635] <err> os:   Stacking error (context area might be not valid)
    [00:00:05.745,635] <err> os: r0/a1:  0xaaaaaaaa  r1/a2:  0xaaaaaaaa  r2/a3:  0xaaaaaaaa
    [00:00:05.745,666] <err> os: r3/a4:  0xaaaaaaaa r12/ip:  0xaaaaaaaa r14/lr:  0xaaaaaaaa
    [00:00:05.745,666] <err> os:  xpsr:  0xaaaaaa00
    [00:00:05.745,666] <err> os: s[ 0]:  0x00000000  s[ 1]:  0x00000000  s[ 2]:  0x00000000  s[ 3]:  0x00000000
    [00:00:05.745,697] <err> os: s[ 4]:  0x00000000  s[ 5]:  0x00000000  s[ 6]:  0x00000000  s[ 7]:  0x00000000
    [00:00:05.745,697] <err> os: s[ 8]:  0x00000000  s[ 9]:  0x00000000  s[10]:  0x00000000  s[11]:  0x00000000
    [00:00:05.745,697] <err> os: s[12]:  0x00000000  s[13]:  0x00000000  s[14]:  0x00000000  s[15]:  0x00000000
    [00:00:05.745,727] <err> os: fpscr:  0x00000000
    [00:00:05.745,727] <err> os: Faulting instruction address (r15/pc): 0xaaaaaaaa
    [00:00:05.745,758] <err> os: >>> ZEPHYR FATAL ERROR 2: Stack overflow on CPU 0
    [00:00:05.745,758] <err> os: Current thread: 0x20001d70 (openthread)
    [00:00:06.321,624] <err> fatal_error: Resetting system
    [00:00:00.003,601] <inf> ieee802154_nrf5: nRF5 802154 radio initialized
    [00:00:00.109,161] <inf> fs_nvs: 8 Sectors of 4096 bytes
    [00:00:00.109,191] <inf> fs_nvs: alloc wra: 0, fe8
    [00:00:00.109,191] <inf> fs_nvs: data wra: 0, 0
    [00:00:00.110,107] <inf> net_l2_openthread: State changed! Flags: 0x00038200 Current role: 0

  • Hi

    I misunderstood your question first, the configurations you mentions are indeed the correct ones.

    I took the zephyr hello world sample and added some configurations to make it an OpenThread automatic joiner.
    It seems to work for me.
    You of course will have to set up the commissioner yourself, for example with the openthread/cli sample:

    ot ifconfig up
    ot thread start
    ot commissioner start
    ot commissioner joiner add * TESTTESTTEST

    The joiner is added as a zip below, or if you only want the prj.conf:

    # Network shell
    CONFIG_SHELL=y
    CONFIG_OPENTHREAD_SHELL=y
    CONFIG_SHELL_ARGC_MAX=26
    CONFIG_SHELL_CMD_BUFF_SIZE=416
    
    # Generic networking options
    CONFIG_NETWORKING=y
    CONFIG_NET_L2_OPENTHREAD=y
    
    # Enable OpenThread features set
    CONFIG_OPENTHREAD_NORDIC_LIBRARY_MASTER=y
    
    CONFIG_OPENTHREAD_NETWORKKEY="00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff"
    CONFIG_OPENTHREAD_PANID=1234
    
    CONFIG_OPENTHREAD_MANUAL_START=n
    CONFIG_OPENTHREAD_JOINER=y
    CONFIG_OPENTHREAD_JOINER_AUTOSTART=y
    CONFIG_OPENTHREAD_JOINER_PSKD="TESTTEST"
    CONFIG_SHELL_STACK_SIZE=3168
    
    

    openthread_automatic_joiner.zip

    Does this work for you?

    Regards,
    Sigurd Hellesvik

Reply
  • Hi

    I misunderstood your question first, the configurations you mentions are indeed the correct ones.

    I took the zephyr hello world sample and added some configurations to make it an OpenThread automatic joiner.
    It seems to work for me.
    You of course will have to set up the commissioner yourself, for example with the openthread/cli sample:

    ot ifconfig up
    ot thread start
    ot commissioner start
    ot commissioner joiner add * TESTTESTTEST

    The joiner is added as a zip below, or if you only want the prj.conf:

    # Network shell
    CONFIG_SHELL=y
    CONFIG_OPENTHREAD_SHELL=y
    CONFIG_SHELL_ARGC_MAX=26
    CONFIG_SHELL_CMD_BUFF_SIZE=416
    
    # Generic networking options
    CONFIG_NETWORKING=y
    CONFIG_NET_L2_OPENTHREAD=y
    
    # Enable OpenThread features set
    CONFIG_OPENTHREAD_NORDIC_LIBRARY_MASTER=y
    
    CONFIG_OPENTHREAD_NETWORKKEY="00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff"
    CONFIG_OPENTHREAD_PANID=1234
    
    CONFIG_OPENTHREAD_MANUAL_START=n
    CONFIG_OPENTHREAD_JOINER=y
    CONFIG_OPENTHREAD_JOINER_AUTOSTART=y
    CONFIG_OPENTHREAD_JOINER_PSKD="TESTTEST"
    CONFIG_SHELL_STACK_SIZE=3168
    
    

    openthread_automatic_joiner.zip

    Does this work for you?

    Regards,
    Sigurd Hellesvik

Children
No Data
Related