This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2652R: Bluetooth Mesh send message error due to AESECB_oneStepEncrypt() function error

Part Number: CC2652R
Other Parts Discussed in Thread: LAUNCHXL-CC26X2R1

We are working in a Bluetooth mesh network with a vendor model. One of the nodes, which actually is a LAUNCHXL-CC26X2R1 kit, is sending messages periodically to 5 other nodes. At a certain point and with no apparent reason, the sending function starts to returns error any time is called. By placing some breakpoints I have figured out that this is actually caused by the function AESECB_oneStepEncrypt, that suddenly returns -1.

By now I could not find a way to restore the communications, other than resetting the device.

Does anyone knows why could this appears to happen after some minuts working properly? 

Could this be related to a memory leak? How could this be monitored with CCS?

  • Hello Marc,

    Thanks for reaching out.

    To further assist you, please help me with the following questions:

    1. What SDK version you are using?
    2. Are you using an out of the box example as main reference?
    3. Are you modifying the handle or operation parameters?
    4. What value does the function returns (AESECB_STATUS_SUCCESS, AESECB_STATUS_ERROR, AESECB_STATUS_RESOURCE_UNAVAILABLE, AESECB_STATUS_UNALIGNED_IO_NOT_SUPPORTED)?

    BR,

    David.

  • Hello David,

    Thanks for your suport.

    I think I made a mistake with the prioriries. Now I have the BLE task at the highest priority and it works. However, there are a lot of messages that are being lost. So, I send them but the call back on destination is not triggered.

    For your understanding, I have one (sort of ) gateway node that sends a message to 5 field nodes to request their status and then they response with another message sent on the gateway's message callback. With this setup, at this moment I am sending a request to node 1 inside an specific task, then sleeping the task, then sending request to node 2, then sleep and so on. In this configuration, leaving intervals of 100 ms between messages it fails a lot, to the point that sometimes coms are lost like for 5 to 10 seconds for some nodes. However, with 200 ms it works prettty well.

    With this numbers, do you think there is somethin wrong with the code? It feels like 200 ms is an eternity but I am not familiar with mesh networks neither with this microcontroller.

  • Hello Marc,

    Good to hear that the communications are working.

    I would suggest to debug the RF operations to understand better why the requests are failing, please check Debugging RF Output.

    Do you have a Bluetooth sniffer at hand to gather the logs and understand as well what is happening over the air?

    BR,

    David.

  • Thanks David for your support.

    We will follow the tutorial.

    Kind regards,

    Marc