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

ASSERTION FAIL [net_buf_simple_tailroom(buf) >= len] @ WEST_TOPDIR/zephyr/subsys/net/buf.c:800

Hi everybody, i get this error on a nrf53 with hr_coded on network coded, and UART example modified with multilink and coded_phy, tested by me on an nrf52.

The issue is, later of add the Kconfig necessary (copying the same as nrf52840 of my last project) i get this error when the code enter on filter_match.

This is the line 800 of buf.c

Debugging output is this:

Searching that line 46 on my assert.c:

What i can do to solve it??

Thank you,

regards.

Parents
  • Hi 

    A common problem with the nRF5340 is to forget to configure the network core correctly, since the Bluetooth stack is split between the application and network cores. 

    Can you share the config files you use for the application and network cores?
    Normally the network core configuration is stored in the child_image/hci_rpmsg.conf file. 

    Also, could you share the zephyr.map file with me?
    These kind of fatal errors are often caused by a stack overflow in a thread, and the map file should show which thread the error is related to. 

    Best regards
    Torbjørn

  • Hi, I am not sure of what is the way to configure network core properly, i use child image of hr_coded because of that supports long range. Could you share a link of tutorial for how to custom this child image?

    And for configure other parameters i am used to use Kconfig. But i am desiring learn whats is the correct way to do it

    I will update the files that you ask for on a couple of days.

    Thank you for the support,

    regards.

Reply
  • Hi, I am not sure of what is the way to configure network core properly, i use child image of hr_coded because of that supports long range. Could you share a link of tutorial for how to custom this child image?

    And for configure other parameters i am used to use Kconfig. But i am desiring learn whats is the correct way to do it

    I will update the files that you ask for on a couple of days.

    Thank you for the support,

    regards.

Children
  • Hi 

    If you already used the hr_coded example as a starting point it is true that the child_image/hci_rpmsg.conf file should already be set correctly. 

    This could possibly be caused by a stack overflow in the Bluetooth thread on the app core. 

    Could you try to increase the BT_RX_STACK_SIZE parameter in the app core?

    To do this in the prj.conf file, simply add the following line:

    CONFIG_BT_RX_STACK_SIZE=1024

    I am not sure we have a good tutorial on how to set up the child image for the network core in the nRF5340. I will have to ask around and get back to you. 

    Best regards
    Torbjørn

  • Hi,

    CONFIG_BT_RX_STACK_SIZE=2200 

    And the error keeps.

    The error isn't appear on a connection, so really i don't know if it could have something related with bluetooth.

    The error happens when main finish, and theoretically start to scan. The error can't be reproduce when uses default config on board (no coded).

    I have doubts when u ask me about prj.conf, all configurations that i add are on Kconfig, this is the Kconfig of my application core:

    And this my config of the network core (hr_coded child image):

    On prj.conf is the default one:

    #
    # Copyright (c) 2018 Nordic Semiconductor
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    
    # Enable the UART driver
    CONFIG_UART_ASYNC_API=y
    CONFIG_NRFX_UARTE0=y
    CONFIG_SERIAL=y
    CONFIG_CONSOLE=y
    CONFIG_UART_CONSOLE=y
    
    # Enable the BLE stack with GATT Client configuration
    CONFIG_BT=y
    CONFIG_BT_CENTRAL=y
    CONFIG_BT_SMP=y
    CONFIG_BT_GATT_CLIENT=y
    
    # Enable the BLE modules from NCS
    CONFIG_BT_NUS_CLIENT=y
    CONFIG_BT_SCAN=y
    CONFIG_BT_SCAN_FILTER_ENABLE=y
    CONFIG_BT_SCAN_UUID_CNT=1
    CONFIG_BT_GATT_DM=y
    CONFIG_HEAP_MEM_POOL_SIZE=2048
    
    # This example requires more workqueue stack
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=2048
    
    # Enable bonding
    CONFIG_BT_SETTINGS=y
    CONFIG_FLASH=y
    CONFIG_FLASH_PAGE_LAYOUT=y
    CONFIG_FLASH_MAP=y
    CONFIG_NVS=y
    CONFIG_SETTINGS=y
    
    # Config logger
    CONFIG_LOG=y
    CONFIG_USE_SEGGER_RTT=y
    CONFIG_LOG_BACKEND_RTT=y
    CONFIG_LOG_BACKEND_UART=n
    
    CONFIG_ASSERT=y
    

    Really i have doubts of where and how is the correct way to apply this configuration. I think that no have sense that on app core I configure things of BT_...

    I wish follow clear steps to succed with this device.

    Another note about, the same configuration on nrf53 but working as peripheral is working properly.

    Thank you for the interest and support,

    regards.

  • Another note about, the same configuration on nrf53 but working as peripheral is working properly.

    In my peripheral project, the nrf53 is working transmiting 200bytes/100ms on coded_s8 properly, so in my opinion the problem could have something related with the scan procedure/config.

  • Debugging central project, the scanning doesn't fail until an peripheral starts to advertising, but don't arrive to trigger filter_match, before that happens the crash.

    regards.

  • Hi

    If I understand you correctly you have modified the central_uart example to use coded phy?

    I tried to do a quick modification of this example myself in order to reproduce the error, but I haven't been able to see the same error yet. 

    Which changes did you make to the main.c file in order to enable coded phy?
    Maybe you can share the main.c file with me?

    Best regards
    Torbjørn

Related