Description
Hey BLE-Contributors,
thank you all for the hard work you did with this plugin! Its awesome that this is so well maintained and working pretty great!
After I've stepped up on my app to not just connect one single ble, rather multiple once, I've encountered some issues.
Some context to this: I'm developing a coffee app, where you can connect bluetooth scales, bluetooth pressure gauges, aswell as temperature devices and soon also a bluetooth refractometer and coffee particel analyser.
All these devices are connected inside the settings, and the device-id is stored in a database, so when the app starts up again, the app connects to all known devices.
What I've encountered:
- On iOS I have the "issue" that I need to startScan and wait until i've found all device-ids I've stored, before I can ble.autoconnect to them.
The issue with this is, that the users start up the app, and after that maybe just the bluetooth scale, so basically I wait for about 60 seconds to find all devices - but thats not a great and proper solution.
-> Would there maybe be the possibility to add the search solution to ble.autoConnect for iOS, that it searches internal the device, before it connects?
- On Android the connection to the pressure-sensor takes about 5-6 seconds, which means ble.autoConnect fires the "success"-method.
Whats really strange is that on iOS the connection is about 0-1 second - so much much faster.
2.1. Also I've encountered when I stored the device id, and I autoConnect to the pressure device it sometimes never connects, and I need to disconnect (forget the id), restart the app and start searching again.
2.2 Also I've encountered, when I search the device, connect to it on Android, disconnect and connect again, the device sometimes is not found anymore. (Funny that on iOS this works like without no issues)
On Android I also scanWithOptions
reportDuplicates: true,
legacy: false,
matchMode: 'aggressive',
scanMode: 'lowLatency',
I've made some progress with it, but still not fluent & good, and far away from the iOS performance.
Also I've disconnected normal connected Bluetooth-Devices like a watch or bluetooth airpods, which also did some improvement in connectivity.
I'm using the latest release 1.6.3, and tried with Pixel 2XL Android 11, and Pixel 4a 5g Android 13.
Same issues on both devices.
The bluetooth scales, are connecting directly, so its real just the pressure sensor which is doing strange.
BUT with the original app of the manufacturer, which is written in flutter, it has no issues at all :<.
The connected smart-scale devices sends about one request each 100ms, the connected pressure sensor, also would send between 20-100ms one request. (so faster then the smart scale)
My setup is Ionic 6, with Cordova,
<preference name="android-minSdkVersion" value="22" />
<preference name="android-targetSdkVersion" value="31" />
Platform:
android 10.1.2
ios 6.3.0
I'm also using ble.withPromises... solution.
Thanks for your help, hope. the information are enough, else I'm happy to provide more information!
Lars