data loss when trying to transfer large data with BLE
data loss when trying to transfer large data with BLE
- Subject: data loss when trying to transfer large data with BLE
- From: Rene Limberger <email@hidden>
- Date: Mon, 08 Apr 2013 07:42:53 -0700
I have a use case that needs to exchange data packets of ~60bytes between an iOS device and a peripheral at as high of a data rate as possible. I understand that BLE is not designed to do that but i would like to evaluate what speeds we could get.
To give some background, i am using a BLE112 module from Bluegiga in BGApi mode. For testing, the module is connected to a mac with a usb-to-serial adapter. The interface is 9600 baud with hardware flow control (RTS/CTS). I wrote a mac application that, using the BGAPI calls, controls the BLE stack on the module. I have also written a iOS app that scans for the peripheral, connects to it, find the services and characteristics. This all "sort of works" but when im trying to write to the attributes at a very high rate, eventually, data is lost, the module locks up and the connection is lost.
Im trying to understand where the issue is, in iOS, the module, or both and what i can do about it. Specifically, i have read previous discussions on this list that talk about high data rates and understand that others have run into this. It would be interesting to hear how you solved this.
One thing i have read repeatedly is that "the writes on iOS should be sync'd to the connection interval"? From my limited understanding of BLE, i gather than there is only a limited amount of data that can be exchanged per connection event. If so, how much data is that and how do i sync my writes to that on iOS? Is there a way when a connection interval occurs and how much data it transferred so i can write the next data?
As mentioned above, my data packets are ~60bytes, so given the max length of an attribute of 20b, i created 3 attributes, with 20b each and another attribute which indicates he length (as my private protocol packets are variable length). When writing these 3 20b values and the 1b length, the initial 20 or so writes come thru to the peripheral just fine. but then things start to slow down and eventually all data is lost and the connection drops.
As others have mentioned, the writes should be throttled, but im just not clear on what they should be throttled to?
Thanks in advance,
-r
_______________________________________________
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