Using the NRF52840 Zephyr applications with Renode

Hi, I am currently evaluating the NRF52840 for our applications which will be deployed in underground mines across South Africa.

I see that Nordic has a good relationship with Zephyr and Renode as shown in the post below:

     https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/developing-and-testing-ble-products-on-nrf52840-in-renode-and-zephyr 

My goal at this stage is to evaluate the Openthread protocol with the NRF52840 however when I compile the Zephyr Echo_Server/Client with the openthread overlay or the ieee802.15.4 overlay, I notice that no packets are being sent to the NRF52840 radio as shown by Wireshark on Renode.

If you have any insights as to why this is, or any suggestions on configuring the Zephyr application (Echo_Server/Client) to work on Renode (with 802.15.4 / Openthread), please advise me.

I tested the Zephyr application on 2 physical nrf52840dk devices and that was successful, i.e. Two-way communication was established using openthread or regular 802.15.4.

I need to test on Renode as this will enable me to test a large number of devices which will be required for our application.

My Zephyr Echo_Server prj.conf is as follows:

# Generic networking options
CONFIG_NETWORKING=y
CONFIG_NET_UDP=y
CONFIG_NET_TCP=n
CONFIG_NET_IPV6=y
CONFIG_NET_IPV4=n
CONFIG_NET_CONFIG_NEED_IPV4=n
CONFIG_NET_CONFIG_NEED_IPV6=y
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_POSIX_NAMES=y
CONFIG_POSIX_MAX_FDS=6
CONFIG_NET_CONNECTION_MANAGER=y
CONFIG_NET_CONNECTION_MANAGER_LOG_LEVEL_INF=y

# Kernel options
CONFIG_MAIN_STACK_SIZE=12288
CONFIG_ENTROPY_GENERATOR=y
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_INIT_STACKS=y

# Logging
CONFIG_NET_LOG=y
CONFIG_LOG=y
CONFIG_NET_STATISTICS=y
CONFIG_PRINTK=y
CONFIG_NET_MGMT_EVENT_LOG_LEVEL_DBG=y
CONFIG_NET_CONNECTION_MANAGER_LOG_LEVEL_DBG=y
# Network buffers
CONFIG_NET_PKT_RX_COUNT=16
CONFIG_NET_PKT_TX_COUNT=16
CONFIG_NET_BUF_RX_COUNT=64
CONFIG_NET_BUF_TX_COUNT=64
CONFIG_NET_CONTEXT_NET_PKT_POOL=y

# IP address options
CONFIG_NET_IF_UNICAST_IPV6_ADDR_COUNT=6
CONFIG_NET_IF_MCAST_IPV6_ADDR_COUNT=4
CONFIG_NET_MAX_CONTEXTS=10

# Network shell
CONFIG_NET_SHELL=y
CONFIG_SHELL=y

# Network application options and configuration
CONFIG_NET_CONFIG_SETTINGS=y

CONFIG_NET_CONFIG_MY_IPV6_ADDR="fdde:ad00:beef::2"
CONFIG_NET_CONFIG_PEER_IPV6_ADDR="fdde:ad00:beef::1"


# Number of socket descriptors might need adjusting
# if there are more than 1 handlers defined.
CONFIG_POSIX_MAX_FDS=10

# How many client can connect to echo-server simultaneously
CONFIG_NET_SAMPLE_NUM_HANDLERS=2


CONFIG_FLASH=n
CONFIG_OPENTHREAD_SETTINGS_RAM=y
#~ CONFIG_OPENTHREAD_FULL_LOGS=y
CONFIG_NEWLIB_LIBC=y
CONFIG_NET_IPV6_NBR_CACHE=n
CONFIG_NET_IPV6_MLD=n
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
# Enable OpenThread shell
CONFIG_SHELL=y
CONFIG_OPENTHREAD_SHELL=y
CONFIG_SHELL_STACK_SIZE=4096
CONFIG_NET_L2_OPENTHREAD=y
CONFIG_OPENTHREAD_DEBUG=y
CONFIG_OPENTHREAD_L2_DEBUG=y
CONFIG_OPENTHREAD_L2_LOG_LEVEL_INF=y
CONFIG_OPENTHREAD_CHANNEL=26
CONFIG_OPENTHREAD_NETWORKKEY="00:11:22:33:44:55:66:77:88:99:aa:bb:cc:dd:ee:ff"



Regards

Brenton

Parents
  • Hi there,


    I am having similar requirements and troubles while trying to set up a reusable CI development container based on snippets from nrf-docker, zephyr-docker and renode-docker.

    What I could figure out so far:
    Building the BLE heartrate sample
    * (z) produces printk-uart output in renode with setup west init --mr "v3.1.0"
    * (n) but does not when having setup west init -m github.com/.../sdk-nrf --mr "v2.1.0" (or v2.0.2)

    Furthermore, simply building the hello_world sample produces printk output with both setups (z) and (n). But as soon as you set prj.conf -> CONFIG_BT=y then the simulated image build with (n) has no more output.

    When comparing the build outputs we get
    * (z) Zephyr version: 3.1.0-rc1 (/zephyrdev/zephyr) and
    * (n) Zephyr version: v3.1.99-ncs1 (/zephyrdev/zephyr) respectively

    So I am assuming that there might be some nRF-specific customization to the Zephyr source code which creates BLE-incompatibilities in renode.

    I'll keep you posted if I can figure out some more.

    Cheers,

    Chris

Reply
  • Hi there,


    I am having similar requirements and troubles while trying to set up a reusable CI development container based on snippets from nrf-docker, zephyr-docker and renode-docker.

    What I could figure out so far:
    Building the BLE heartrate sample
    * (z) produces printk-uart output in renode with setup west init --mr "v3.1.0"
    * (n) but does not when having setup west init -m github.com/.../sdk-nrf --mr "v2.1.0" (or v2.0.2)

    Furthermore, simply building the hello_world sample produces printk output with both setups (z) and (n). But as soon as you set prj.conf -> CONFIG_BT=y then the simulated image build with (n) has no more output.

    When comparing the build outputs we get
    * (z) Zephyr version: 3.1.0-rc1 (/zephyrdev/zephyr) and
    * (n) Zephyr version: v3.1.99-ncs1 (/zephyrdev/zephyr) respectively

    So I am assuming that there might be some nRF-specific customization to the Zephyr source code which creates BLE-incompatibilities in renode.

    I'll keep you posted if I can figure out some more.

    Cheers,

    Chris

Children
Related