Re: BLE latency on iOS
Re: BLE latency on iOS
- Subject: Re: BLE latency on iOS
- From: Mark Palatucci <email@hidden>
- Date: Wed, 18 Jul 2012 10:34:50 -0700
I just looked at our code again - basically we:
1) have the peripheral advertise using the fastest interval (20ms)
2) after the iphone connects, the default connection speed is 105ms
3) we wait for the pipe setup to occur, this means we do the service/characteristic discovery at the default of 105ms
4) after our peripheral radio informs us that the pipes are available, meaning we could send data through notifications, only then do we request a change from the iphone. Specially we ask the iphone for: min_latency = 20ms, max_latency = 40ms, slave_latency=0, timeout=0xFC (252)(which becomes about 3 seconds).
After 4-5 seconds, we get a connection change notification from the radio (on the peripheral) indicating we got a new interval of 37.5ms. We don't usually send data until we get the new connection interval confirmation, but I'm pretty sure it should work even if you do send data during those 4-5 seconds. Just to be sure though, try it using the steps above without sending data.
good luck,
-M
On Wed, Jul 18, 2012 at 1:37 AM, Petar Minev
<email@hidden> wrote:
Hi Mark,
Thanks a lot for the quick reply. We followed the guidelines, but unfortunately we couldn’t get it to go down to 37.5ms even after waiting 4-5 seconds. I will give it another try and make sure I don’t do anything wrong. I also have some more questions: 1) During these 4-5 seconds should I stop sending notifications so the changes can take effect? 2) Is this interval somehow related to the advertising interval in the current implementation of the stack and should I try and change that as well? Thank you!
Best Regards,
Petar
If you follow the guidelines, you'll be able to get the iphone to change to 37.5ms. However, because of a bug in the current stack, it takes 4-5 seconds for the change to actually occur.
On Mon, Jul 16, 2012 at 9:08 AM, Rafik Jallad <email@hidden> wrote:
Hi all,
We’re trying to transfer short data packets with the minimum latency to an iOS device with Bluetooth Low energy. We are setting the parameters as requested by the iOS device but the latency is still at 100ms while it should be around 20ms. (Page 18 of the Bluetooth design guidelines copied below specifies how to set the parameters). Any help on this would be great. Thank you.
Rafik
Details:
Connection parameters (page 18 of Bluetooth design guidlines)
The accesory should request connection parameters appropriate for its use case by sending an L2CAP Connection Parameter Update Request at the appropriate time.
The connection parameter might be rejected if it does nto comply with these rules:
Interval Max * (Slabe Latency + 1) <=2 seconds
Interval min >=20ms
Interval Min + 20ms <=Interval Max
Slave Latency <=4
connSupervisionTimeout<=6s
IntervalMax * (Slave Latency + 1) * 3 < connSupervision Timeout
_______________________________________________
Do not post admin requests to the list. They will be ignored.
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