Re: R: Designing a communication protocol
Re: R: Designing a communication protocol
- Subject: Re: R: Designing a communication protocol
- From: Virendra Shakya <email@hidden>
- Date: Fri, 29 Jan 2016 12:01:18 -0800
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 <email@hidden> 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
> email@hidden
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Bluetooth-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Bluetooth-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden