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

Client 2/3 Cannot Send Error yet message is sent

Hi,

I have modified the light switch demo so that all messages from the client are sent to all servers. I have done this by subscribing all servers to GROUP_ADDRESS_ODD in node_setup.c. Now when I send using button 2/3 (unacked) I get the message Client 2(/3) cannot send, I have found that this is because status == NRF_ERROR_INVALID_STATE. However, it still sends, the servers receive the message and even tell the client. Is it safe to ignore this message?

Parents Reply
  • Hi, 

    If you have a look at the code you can find that on Button 0 and 1 we cancel the previous reliable message before doing the next when on Button 2 and 3 we dont. 

    As I mentioned only one segmented message at a time. On button 2 and 3 if you press and hold the button for more than 400ms (which I assume you do) the stack will try to send the unreliable segmented again and will receive a NRF_ERROR_INVALID_STATE because the last one has not been finished. 

    My suggestion is to try changing the HAL_BUTTON_PRESS_FREQUENCY time (button debouncing) to say 1 second and check if you still have the issue. 

    How big is your data ? have you tried to test with sending one single byte ? 

Children
Related