cordova-plugin-bluetoothle
cordova-plugin-bluetoothle copied to clipboard
performance questions
My App scans then needs to read characteristics from each detected device with my UUID. for 6 devices (started overlapping) this takes 6.5 seconds.. seems a lot of that time is in discover, which appears to be required for each device after connect.
is there any capability to reuse the received discover info to avoid the performance impact of this step? my devices will not change characteristics from the last read. or any other suggestion I will post ms timings when I am booted back to linux
scan
then loop thru discovered(scanned) devices (submitted in parallel)
connect
discover
read characteristic
(maybe 2, submitted in parallel)
disconnect
close
this is Ionic/Vue on IOS (15.1)
so, it doesn't look like discover is THE culprit (altho it adds 3/4 second to each device cycle)
charts of the processing for each device

in this whole process covered by the charts above I scan/process for some cycles... stop and repeat , for some cyles, stop and repeat again for some cycles. stop,
I haven't been able to get a good stacked bar chart, green line is total elapsed for each full process cycle.. scan/connect/discover/read/disconnect/close
scan starts a 1/2 second timer, and its reset on each new discovered device, firing after the last device , which does stopscan
then we process to get info from each device.. connect/discover/read/disconnect/close
What's the advertising interval you're using on those devices? You have some high values for connect and this could help you reduce the average time your cycle takes to run.
@NunoSav the devices are advertising at 100ms interval.
100ms is short enough. I can't see how you can improve your cycle time any other way, if you find a way to do so please share it :)
yeh, I think there is a problem in IOS locationservices with concurrent connects.
I haven't tried to build this on android.