[Interest] BT LE (Android, iOS) pairing/bonding

ekke ekke at ekkes-corner.org
Tue Jul 5 13:23:17 CEST 2022


Qt 5.15.7

did many Qt apps for BT LE (for Barcode Scanners) with custom services / 
characteristic.
all works well

Now a project to control Beds with some motors for slatted frame (Lattoflex)
This BT LE device must be paired/bonded (just works)

The device was found from BLE device discovering, the services and 
characteristics can be discovered.
At first I’m collecting all needed Services.
Then for one of the Services I want to create a Characteristic to read a 
value from. From Bed-API docs this is the recommended way to get a 
dialog to pair the device first time and to do the bonding.

But I’m getting an LE Controller Connection Error and no dialog to pair 
the device comes up.
BTW: a QtBluetoothGatt warning was logged: “Looks like the peripheral 
does NOT act in accordance to Bluetooth 4.x spec” (Only reported on 
Android, not iOS)Found a workaround for Android:
 From Android Device BT Settings: Connected devices, pair new device the 
BED was found and can be added.
Then the app works without any problems, can READ,WRITE, get NOTIFICATION.

On iOS the BED device is not listed as a device and so cannot be paired 
from BT Settings.

Tried on many different iOS phones / iPads. Also tried many BT LE Apps 
from AppStore, tapped on services, characteristics, read/write values 
etc to see if there’s an app available to pair/bond the BED.

Suddenly I noticed, that one of my iPhones listed the BED as one of ‘My 
Devices’. Tried my app on this iPhone and the app is working. 
Unfortunately I have no idea what I did to add the BED as device. Tried 
some hours but cannot reproduce on another iPhone.
So the good news: as soon as the BED is listed as a known device on 
Android or iOS, my app is working and can control the motors.
On Android I can live with the workflow to add the BED first time from 
Android Settings.any ideas, what I can do, to initiate the pairing from 
my Qt app - esp on iOS ?
anyone knows an iOS app on App Store where I can pair a custom BLE device ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20220705/3e0881f1/attachment.htm>


More information about the Interest mailing list