Quantcast
Channel: Embarcadero Community - Embarcadero Community
Viewing all articles
Browse latest Browse all 3212

BLE: unexplained delay while WriteCharacteristic (XE8)

$
0
0

Hello, 

 

in an App for Andriod an iOS i use TBluetoothLEManager to communicate between mobile and a BLE-Device. 

To send data to the BLE-device, i use the code-sequence:       

 

CR_GattService:=FBLEDevice.GetService(CR_SERVICE);

CR_GattCharact:=CR_GattService.GetCharacteristic(CR_CHARACTERISTIC);  

CR_GattCharact.SetValue(sOutBuffer);   

sTime:=Now;    

TabbedForm.mDevOut.Lines.Add(SecondOf(sTime).ToString');

FBLEDevice.WriteCharacteristic(CR_GattCharact); 

sTime:=Now;    

TabbedForm.mDevOut.Lines.Add(SecondOf(sTime).ToString'); 

 

 

If I send a single command to the BLE-Device, the time between CR_GattCharact.

SetValue and FBLEDevice.WriteCharacteristic is about 200ms.  

When I send two command on behind the other, the time to write chracteristics is 3s?? 

 

Has anybody an explanation for that?(Android 4.4.2, on iOS this delay do not exist)  

 

Best Markus


Viewing all articles
Browse latest Browse all 3212

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>