RedBearLab/iOS

Writing too fast to BLEMini module from Arduino results in lost data when reading from iOS

Opened this issue · 1 comments

I've done a test where I send 215 bytes from Arduino to the BLEMini (wired). When i use the BLEMini library in iOS and I use the didReceiveData:length: method, some of the data is apparently lost. When I slightly delay (with delay(1)) the data being sent from Arduino, I get all the data and it matches exactly, byte for byte. It seems like there's some buffer on the BLEMini hardware device that maybe gets filled up too quickly in my scenario and overflows or gets overwritten if I write too it too fast from Arduino vs slowing down the Arduino writing to it and letting it get emptied at a more reasonable rate. Can you please confirm that this is expected or what the max data I can write to the module is or the max rate at which I should be writing to it?

Would it be a valid solution to write a byte not more often than 5ms?

Thanks!

Hi,

The connection interval for iOS is at least 25ms.