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

NRF_ERROR_INVALID_STATE when calling access_model_publish() using simple_message_model (nRF52 DK)

Hello,

Using nRF52 DK boards, I'm trying the simple_message_model by modifying the light switch example.

With the client, I simple send a 12 bytes unreliable message by pressing a button.

When I press the button with around 1 second interval, about 2/3 of the access_model_publish() calling reported NRF_ERROR_INVALID_STATE.

How can I send several messages every second? Is it possible?

Mesh SDK version: 3.10

Parents
  • Hi,

    When you send packets that are longer than 11 bytes, they will be sent as segmented packets. NRF_ERROR_INVALID_STATE means that there's already a segmented packet to this destination in progress. You have to wait for it to finish before sending new segmented packets. A solution is to wait for the NRF_MESH_EVT_TX_COMPLETE event before sending a new packet.

Reply
  • Hi,

    When you send packets that are longer than 11 bytes, they will be sent as segmented packets. NRF_ERROR_INVALID_STATE means that there's already a segmented packet to this destination in progress. You have to wait for it to finish before sending new segmented packets. A solution is to wait for the NRF_MESH_EVT_TX_COMPLETE event before sending a new packet.

Children
Related