This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Mesh assert error in m_packet.bearer_bitmap events

Hello,

I'm using mesh 2.0.1 to test message sending between 2 nRF52840 DK boards.

I'm using a task from FreeRTOS kernel to send messages from the node to the provisionner.

I get an assert because of m_packet.bearer_bitmap is set after sending few messages ( 70, 111 or 200...etc). messages are sent each 2 seconds

I have setup the mesh irq priority to NRF_MESH_IRQ_PRIORITY_LOWEST.

I'm using uint32_t access_model_publish(access_model_handle_t handle, const access_message_tx_t * p_message) to send the messages.

The stack shows that the core_tx_packet_alloc() when the assert happens is call from the QDEC_IRQHandler

I tried to check m_packet.bearer_bitmap before sending data but this didn't help ?

 

Is there a solution to avoid this kind of issue ?

Thank you

  • Hi, 

    Please let us know, if you simply use a default example, and use NRF_MESH_IRQ_PRIORITY_THREAD and modify the mainloop as suggested in the guide. Do you have any problem with the example ? 
    I have tried here and has no problem with flash. 

  • Hi Hang,

    I have a custom application that I customized from the light switch example and yes, I use NRF_MESH_IRQ_PRIORITY_THREAD.

    I have merged the provisioner, server and client in the same project and seems that I did something wrong yet it works fine with a timer and in interrupt mode using NRF_MESH_IRQ_PRIORITY_LOWEST.

    I'll try to make the changes in the example directly.

  • Hi hang,

    I modified the provisioner project in mesh v2.0.1 but the I seems that the provisioning is failing each time.

    Below is the modification that I did on the main.c

    And the logs are

    <t: 0>, main.c, 566, ----- BLE Mesh Light Switch Provisioner Demo -----
    <t: 0>, mesh_softdevice_init.c, 112, Initializing SoftDevice...
    <t: 0>, mesh_softdevice_init.c, 77, Enabling BLE...
    <t: 2>, mesh_softdevice_init.c, 88, Ram base: 0x200032C8
    <t: 560>, main.c, 500, Initializing and adding models
    <t: 570>, main.c, 547, Setup defaults: Adding keys, addresses, and bindings
    <t: 720>, provisioner_helper.c, 329, netkey_handle: 0
    <t: 732>, main.c, 594, <start>
    <t: 27205>, main.c, 129, Flash write complete
    <t: 27208>, main.c, 581, Starting application ...
    <t: 27210>, main.c, 583, Provisoned Nodes: 0, Configured Nodes: 0 Next Address: 0x0100
    <t: 27214>, main.c, 584, Dev key : 35A036F769E2896240ED2DFAE216F5A8
    <t: 27217>, main.c, 585, Net key : FC5B3D636BE4A960B567DA161EB85C7C
    <t: 27220>, main.c, 586, App key : 79731ACEAF43B9AC4896DED172E41468
    <t: 27222>, main.c, 587, Press Button 1 to start provisioning and configuration process.
    <t: 459089>, main.c, 460, Button 1 pressed
    <t: 459091>, main.c, 373, Waiting for Client node to be provisioned ...
    <t: 463852>, provisioner_helper.c, 282, Scanning For Unprovisioned Devices
    <t: 466038>, provisioner_helper.c, 144, UUID seen: 0059ABCDEFABCDEFACCDEFABCDEFABCD
    <t: 466041>, provisioner_helper.c, 95, UUID filter matched
    <t: 485700>, provisioner_helper.c, 259, Provisioning link established
    <t: 1457139>, provisioner_helper.c, 254, Static authentication data provided
    <t: 3536410>, provisioner_helper.c, 155, Local provisioning link closed: prov_state: 3 remaining retries: 2
    <t: 3536414>, provisioner_helper.c, 160, Provisioning failed. Retrying...
    <t: 3546240>, provisioner_helper.c, 144, UUID seen: 0059FFFF000000003BB9C2FB51AFB723
    <t: 3605223>, provisioner_helper.c, 144, UUID seen: 0059ABCDEFABCDEFACCDEFABCDEFABCD
    <t: 3605226>, provisioner_helper.c, 95, UUID filter matched
    <t: 3631437>, provisioner_helper.c, 259, Provisioning link established
    <t: 4992820>, provisioner_helper.c, 254, Static authentication data provided
    <t: 7068812>, provisioner_helper.c, 155, Local provisioning link closed: prov_state: 3 remaining retries: 1
    <t: 7068816>, provisioner_helper.c, 160, Provisioning failed. Retrying...
    <t: 7288357>, provisioner_helper.c, 144, UUID seen: 0059FFFF000000003BB9C2FB51AFB723
    <t: 8644957>, provisioner_helper.c, 144, UUID seen: 0059ABCDEFABCDEFACCDEFABCDEFABCD
    <t: 8644960>, provisioner_helper.c, 95, UUID filter matched
    <t: 8674448>, provisioner_helper.c, 259, Provisioning link established
    <t: 9983396>, provisioner_helper.c, 254, Static authentication data provided
    <t: 11000985>, provisioner_helper.c, 155, Local provisioning link closed: prov_state: 3 remaining retries: 0
    <t: 11000989>, provisioner_helper.c, 167, Provisioning Failed. Code: 1, Could not assign node addr: 0x0100
    <t: 11000993>, main.c, 302, Provisioning failed. Press Button 1 to retry.

    Can you please check the modification I did and tell me if I'm missing something ?

    Thank you

    Chaabane

  • Hi Chaabane,

    Sorry for the delayed response. It seems the failure code you are receiving is due to an invalid provisioning PDU (protocol data unit). See nrf_mesh_prov_types.h for more info: NRF_MESH_PROV_FAILURE_CODE_INVALID_PDU.

    What happens if you add the if loop like shown at this link here:

    Kind Regards,

    Bjørn

1 2