This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
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

Zephyr and OpenThread join support

While attempting to join a network formed by the OpenThread border router reference implementation and an external commissioner using the Android app, my zephyr end device (based on the lwm2m client sample) ends up failing an assertion:

assertion "awaited_property == AWAITED_PROPERTY_NONE" failed: file "WEST_TOPDIR/zephyr/modules/hal_nordic/nrf_802154/serialization/platform/nrf_802154_spinel_response_notifier.c", line 63, function: nrf_802154_spinel_response_notifier_lock_before_request

I'm not sure I'm doing this properly. CONFIG_OPENTHREAD_CUSTOM_PARAMETERS has to be set in order to be able to link the binary which I think is a little suspicious and not documented as far as I know:

CONFIG_OPENTHREAD_JOINER=y
CONFIG_OPENTHREAD_CUSTOM_PARAMETERS="OPENTHREAD_CONFIG_JOINER_ENABLE=1"
CONFIG_OPENTHREAD_JOINER_AUTOSTART=y
CONFIG_OPENTHREAD_JOINER_PSKD="J01NU5"
CONFIG_MBEDTLS_HEAP_SIZE=10240

Parents
  • Hello, Louis!

    Are you using Zephyr standalone or the nRF Connect SDK, based on Zephyr? In the latter we provide a OpenThread configuration guide and samples that should be more straightforward to setup with our devices. 

    I will ask the developers about the issue you're seeing here.

    Best regards,
    Carl Richard

  • Thanks,

    I'm using the nRF SDK. I tried to add join support to the cli sample. Configuring the application with OPENTHREAD_JOINER_AUTOSTART didin't do anything (no failed assertion but no join either). So I added a "join button" (project here) and ended up with the same failed assertion.

  • Hello again!

    Apologies for the delayed answer. Your sample functions when I compile it here, and looking at your autoconf.h it seems like some key configurations are missing somehow. Most notable CONFIG_NRF_802154_SOURCE_NRFXLIB. Could you share your build log from building the cli sample?

    And just to make sure, you have not changed <zephyr_base>/nrf/samples/openthread/common/overlay-ot-defaults.conf right?

    Best regards,
    Carl Richard

  • Hi Carl,

    I confirm that nothing from the zephyr base was changed. Here's the output of the log: 

    -- west build: generating a build system
    Including boilerplate (Zephyr base): /home/theia/zephyr/cmake/app/boilerplate.cmake
    -- Application: /home/project/cli
    -- Zephyr version: 2.5.99 (/home/theia/zephyr)
    -- Found Python3: /usr/bin/python3.6 (found suitable exact version "3.6.9") found components: Interpreter 
    -- Found west (found suitable version "0.10.1", minimum required is "0.7.1")
    -- Board: nrf5340dk_nrf5340_cpuapp
    -- Cache files will be written to: /home/theia/.cache/zephyr
    -- Found toolchain: gnuarmemb (/opt/gcc-arm-none-eabi/gcc-arm-none-eabi-10-2020-q4-major)
    -- Found BOARD.dts: /home/theia/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp.dts
    -- Generated zephyr.dts: /home/project/cli/build/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: /home/project/cli/build/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: /home/project/cli/build/zephyr/include/generated/device_extern.h
    
    warning: SHELL_STACK_SIZE (defined at subsys/shell/Kconfig:28) was assigned the value '2048' but got
    the value ''. Check these unsatisfied dependencies: SHELL (=n). See
    http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_SHELL_STACK_SIZE.html and/or look up
    SHELL_STACK_SIZE in the menuconfig/guiconfig interface. The Application Development Primer, Setting
    Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful
    too.
    
    
    warning: SHELL_CMD_BUFF_SIZE (defined at subsys/shell/Kconfig:44) was assigned the value '416' but
    got the value ''. Check these unsatisfied dependencies: SHELL (=n). See
    http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_SHELL_CMD_BUFF_SIZE.html and/or look
    up SHELL_CMD_BUFF_SIZE in the menuconfig/guiconfig interface. The Application Development Primer,
    Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be
    helpful too.
    
    
    warning: SHELL_ARGC_MAX (defined at subsys/shell/Kconfig:70) was Parsing /home/project/cli/Kconfig
    Loaded configuration '/home/theia/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp_defconfig'
    Merged configuration '/home/project/cli/prj_nrf5340dk_nrf5340_cpuapp.conf'
    Merged configuration '/home/theia/zephyr/../nrf/samples/openthread/common/overlay-ot-defaults.conf'
    Configuration saved to '/home/project/cli/build/zephyr/.config'
    Kconfig header saved to '/home/project/cli/build/zephyr/include/generated/autoconf.h'
    assigned the value '26' but got the
    value ''. Check these unsatisfied dependencies: SHELL (=n). See
    http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_SHELL_ARGC_MAX.html and/or look up
    SHELL_ARGC_MAX in the menuconfig/guiconfig interface. The Application Development Primer, Setting
    Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful
    too.
    
    -- The C compiler identification is GNU 10.2.1
    -- The CXX compiler identification is GNU 10.2.1
    -- The ASM compiler identification is GNU
    -- Found assembler: /opt/gcc-arm-none-eabi/gcc-arm-none-eabi-10-2020-q4-major/bin/arm-none-eabi-gcc
    Adding '802154_rpmsg' firmware as child image since CONFIG_NRF_802154_SER_HOST is set to y
    
    === child image 802154_rpmsg - CPUNET begin ===
    Including boilerplate (Zephyr base): /home/theia/zephyr/cmake/app/boilerplate.cmake
    -- Application: /home/theia/zephyr/samples/boards/nrf/ieee802154/802154_rpmsg
    -- Zephyr version: 2.5.99 (/home/theia/zephyr)
    -- Found Python3: /usr/bin/python3.6 (found suitable exact version "3.6.9") found components: Interpreter 
    -- Found west (found suitable version "0.10.1", minimum required is "0.7.1")
    -- Board: nrf5340dk_nrf5340_cpunet
    -- Cache files will be written to: /home/theia/.cache/zephyr
    -- Found toolchain: gnuarmemb (/opt/gcc-arm-none-eabi/gcc-arm-none-eabi-10-2020-q4-major)
    -- Found BOARD.dts: /home/theia/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpunet.dts
    -- Generated zephyr.dts: /home/project/cli/build/802154_rpmsg/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: /home/project/cli/build/802154_rpmsg/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: /home/project/cli/build/802154_rpmsg/zephyr/include/generated/device_extern.h
    Parsing /home/theia/zephyr/Kconfig
    Loaded configuration '/home/theia/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpunet_defconfig'
    Merged configuration '/home/theia/zephyr/samples/boards/nrf/ieee802154/802154_rpmsg/prj.conf'
    Merged configuration '/home/theia/nrf/subsys/partition_manager/partition_manager_enabled.conf'
    Merged configuration '/home/project/cli/child_image/802154_rpmsg.conf'
    Configuration saved to '/home/project/cli/build/802154_rpmsg/zephyr/.config'
    Kconfig header saved to '/home/project/cli/build/802154_rpmsg/zephyr/include/generated/autoconf.h'
    -- The C compiler identification is GNU 10.2.1
    -- The CXX compiler identification is GNU 10.2.1
    -- The ASM compiler identification is GNU
    -- Found assembler: /opt/gcc-arm-none-eabi/gcc-arm-none-eabi-10-2020-q4-major/bin/arm-none-eabi-gcc
    -- Build type:  
    -- Host:    Linux/x86_64
    -- Target:  Generic/arm
    -- Machine: cortexm
    -- Looking for include file stdatomic.h
    -- Looking for include file stdatomic.h - found
    -- Host:    Linux/x86_64
    -- Target:  Generic/arm
    -- Machine: cortexm
    -- C_FLAGS :  -Wall -Wextra
    -- Looking for include file fcntl.h
    -- Looking for include file fcntl.h - found
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/project/cli/build/802154_rpmsg
    === child image 802154_rpmsg - CPUNET end ===
    
    -- Build type:  
    -- Host:    Linux/x86_64
    -- Target:  Generic/arm
    -- Machine: cortexm
    -- Looking for include file stdatomic.h
    -- Looking for include file stdatomic.h - found
    -- Host:    Linux/x86_64
    -- Target:  Generic/arm
    -- Machine: cortexm
    -- C_FLAGS :  -Wall -Wextra
    -- Looking for include file fcntl.h
    -- Looking for include file fcntl.h - found
    -- Check if the system is big endian
    -- Searching 16 bit integer
    -- Looking for sys/types.h
    -- Looking for sys/types.h - found
    -- Looking for stdint.h
    -- Looking for stdint.h - found
    -- Looking for stddef.h
    -- Looking for stddef.h - found
    -- Check size of unsigned short
    -- Check size of unsigned short - done
    -- Searching 16 bit integer - Using unsigned short
    -- Check if the system is big endian - little endian
    -- CMake build type: Debug
    -- Version: gfd27fc3a7
    CMake Warning at /home/theia/zephyr/CMakeLists.txt:1434 (message):
      
    
            The CMake build type was set to 'Debug', but the optimization flag was set to '-Os'.
            This may be intentional and the warning can be turned off by setting the CMake variable 'NO_BUILD_TYPE_WARNING'
    
    
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/project/cli/build
    -- west build: building application
    [3/521] Preparing syscall dependency handling
    
    [13/521] Performing build step for '802154_rpmsg_subimage'
    [1/241] Preparing syscall dependency handling
    
    [232/241] Linking C executable zephyr/zephyr_prebuilt.elf
    
    [239/241] Linking C executable zephyr/zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:       84348 B       256 KB     32.18%
                SRAM:       28416 B        64 KB     43.36%
            IDT_LIST:          0 GB         2 KB      0.00%
    
    [241/241] Generating zephyr/merged_CPUNET.hex
    [16/521] cd /home/project/cli/build/modules/openthread/build && /home/theia/.local/lib/python3.6/site-packages/cmake/data/bin/cmake -DLIST="OPENTHREAD_CONFIG_ASSERT_ENABLE=1;OPENTHREAD_CONFIG_BACKBONE_ROUTER_DUA_NDPROXYING_ENABLE=0;OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE=0;OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE=1;OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE=1;OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS=0;OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS_MANAGEMENT=0;OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE=1;OPENTHREAD_CONFIG_COAP_API_ENABLE=1;OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE=1;OPENTHREAD_CONFIG_COMMISSIONER_ENABLE=1;OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE=1;OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE=1;OPENTHREAD_CONFIG_DIAG_ENABLE=1;OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE=1;OPENTHREAD_CONFIG_ECDSA_ENABLE=1;OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE=1;OPENTHREAD_CONFIG_IP6_FRAGMENTATION_ENABLE=1;OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE=1;OPENTHREAD_CONFIG_JOINER_ENABLE=1;OPENTHREAD_CONFIG_LINK_RAW_ENABLE=1;OPENTHREAD_CONFIG_MAC_FILTER_ENABLE=1;OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE=1;OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE=1;OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE=1;OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE=1;OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE=1;OPENTHREAD_SPINEL_CONFIG_RCP_RESTORATION_MAX_COUNT=0;PACKAGE_NAME="OPENTHREAD";PACKAGE_VERSION="gfd27fc3a7";OPENTHREAD_CONFIG_THREAD_VERSION=OT_THREAD_VERSION_1_1;OPENTHREAD_CONFIG_NCP_UART_ENABLE=1;KERNEL;__ZEPHYR__=1;_FORTIFY_SOURCE=2;BUILD_VERSION=v2.4.99-ncs1-1818-g54dea0b2b530;__LINUX_ERRNO_EXTENSIONS__;USE_PARTITION_MANAGER=1;__PROGRAM_START;NRF5340_XXAA_APPLICATION;MBEDTLS_CONFIG_FILE="nrf-config.h"" -P /home/theia/modules/lib/openthread/etc/cmake/print.cmake
    OPENTHREAD_CONFIG_ASSERT_ENABLE=1
    OPENTHREAD_CONFIG_BACKBONE_ROUTER_DUA_NDPROXYING_ENABLE=0
    OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE=0
    OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE=1
    OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE=1
    OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS=0
    OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS_MANAGEMENT=0
    OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE=1
    OPENTHREAD_CONFIG_COAP_API_ENABLE=1
    OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE=1
    OPENTHREAD_CONFIG_COMMISSIONER_ENABLE=1
    OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE=1
    OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE=1
    OPENTHREAD_CONFIG_DIAG_ENABLE=1
    OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE=1
    OPENTHREAD_CONFIG_ECDSA_ENABLE=1
    OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE=1
    OPENTHREAD_CONFIG_IP6_FRAGMENTATION_ENABLE=1
    OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE=1
    OPENTHREAD_CONFIG_JOINER_ENABLE=1
    OPENTHREAD_CONFIG_LINK_RAW_ENABLE=1
    OPENTHREAD_CONFIG_MAC_FILTER_ENABLE=1
    OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE=1
    OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE=1
    OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE=1
    OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE=1
    OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE=1
    OPENTHREAD_SPINEL_CONFIG_RCP_RESTORATION_MAX_COUNT=0
    PACKAGE_NAME=OPENTHREAD
    PACKAGE_VERSION=gfd27fc3a7
    OPENTHREAD_CONFIG_THREAD_VERSION=OT_THREAD_VERSION_1_1
    OPENTHREAD_CONFIG_NCP_UART_ENABLE=1
    KERNEL
    __ZEPHYR__=1
    _FORTIFY_SOURCE=2
    BUILD_VERSION=v2.4.99-ncs1-1818-g54dea0b2b530
    __LINUX_ERRNO_EXTENSIONS__
    USE_PARTITION_MANAGER=1
    __PROGRAM_START
    NRF5340_XXAA_APPLICATION
    MBEDTLS_CONFIG_FILE=nrf-config.h
    [512/521] Linking CXX executable zephyr/zephyr_prebuilt.elf
    
    [519/521] Linking CXX executable zephyr/zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:      333684 B      1016 KB     32.07%
                SRAM:       87128 B       512 KB     16.62%
            IDT_LIST:          0 GB         2 KB      0.00%
    
    [521/521] Generating zephyr/merged_domains.hex

  • Hi again!

    Thanks. This seems to may be an issue with the build environment, as the configuration is incomplete. Could you do the following before building again and see if that makes any difference:

    cd <ncs_root>/nrf
    git pull
    west update

    I.e. moving to the newest master and updating the whole SDK. There have been some changes to various thread related components lately, so I want to make sure that they are there. Please report back if you see any errors/warnings during the updating process.

    Best regards,
    Carl Richard

  • Just got back from the developers that the issue could be related to an issue fixed by this pull request. Could you try to see if applying it as a patch makes any difference?

    Best regards,
    Carl Richard

  • Unfortunately still the same result with the latest version. Note that nrf is at the same level as $ZEPHYR_BASE on my install, not under it which seems consistent with what I see here.

Reply Children
Related