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

Duplicate messages received by mesh server

Hello,

I am developing an application in which mesh client in some cases needs to send consecutive messages to the mesh server. I use a modified version of Simple On/Off model and reliable transfers. 

The problem is that client tries to send second reliable message too quickly after the first. For example, client needs to send some command, receive status from server and then send some data (commands and data are one-packet messages). Mostly it works alright, but once in a while the client tries to send the command again before receiving status from server. Thus, server receives the command, expects to receive data next but in fact it receives the same command again and the message sequence is broken.

I tried unreliable transfer, but too often some messages get lost. Combining unreliable messages with sending them again at a timeout may give the same result (client can send again the message while server is responding to the previous one).

Could you please suggest a proved, trustworthy solution?

Parents Reply Children
Related