Re: R: Designing a communication protocol
In one of my apps that involved ble, I had designed a very simple protocol: - only one characteristic used - write - the central writes n bytes on this characteristic- with start byte and end byte - the sender puts all the packets in a queue (so I didn't need sequence number) - the receiver will assemble the packet back - again putting all the fragments in a queue and then re-assembling once an end byte is encountered It worked perfectly in my case. :) Sent from my iPhone
On Jan 29, 2016, at 10:09 AM, Richard A. Smith <smith@whoop.com> wrote:
On 01/29/2016 12:24 PM, Gabriele Filosofi wrote:
d) A sequence number in each message. How could I effectively exploit such a feature ?
If you can have out of order messages and need re-assembly then you use the sequence number.
In some fully asynchronous protocols I've done there are multiple commands outstanding the sequence number is used to link the command response back to the original command.
But the main use for me has been while doing protocol debugging. Gaps in the sequence numbers indicate bad things.
-- Richard A. Smith smith@whoop.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Bluetooth-dev mailing list (Bluetooth-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/bluetooth-dev/virendra%40skully.com
This email sent to virendra@skully.com
_______________________________________________ Do not post admin requests to the list. They will be ignored. Bluetooth-dev mailing list (Bluetooth-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/bluetooth-dev/site_archiver%40lists.... This email sent to site_archiver@lists.apple.com
participants (1)
-
Virendra Shakya