Re: [BTLE] Sending (a lot of) data to a Peripheral
Re: [BTLE] Sending (a lot of) data to a Peripheral
- Subject: Re: [BTLE] Sending (a lot of) data to a Peripheral
- From: Anders Grunnet-Jepsen <email@hidden>
- Date: Fri, 04 Jan 2013 19:30:24 -0800
What we do is insert delays between sends. So between every packet we would insert delays so that the effective maximum rate would not exceed that which the system supports (20x4 bytes per connection interval). As a check that we don't lose data packet we would assign the very first byte to be an incrementing index. Note that you can't just insert a sleep command but you should program it as a timer so the iOS actually exits the runtime thread and waits between sends.
Why did we go to all this trouble? We found that if we sent data with the flag set for guaranteed transmission, then the data rate would go down to an unacceptable rate. If we sent it without delays then we would start losing packets.
Anders
On Jan 4, 2013, at 11:58 AM, Mark Palatucci < email@hidden> wrote: Are you using iOS 5 or iOS 6?
On iOS 5, calling writeValue will cause a write failure after about 30 writes (of 20 bytes each) unless you add a delay and allow the device to catch up and deliver the packets to the device.
On iOS 6, the internal iOS buffer seems a lot bigger. It appears you can queue up about 200 writes before getting a write failure. On Sat, Nov 24, 2012 at 10:06 AM, Christian Giordano <email@hidden> wrote:
Took 17.3 seconds to send 28757 bytes. this can be speed up reducing the latency though. _______________________________________________
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