[Interest] BT LE (Android, iOS) pairing/bonding
ekke at ekkes-corner.org
Fri Jul 8 10:26:26 CEST 2022
finally it was a hardware problem of this BED - BLE Dongle.
Had to made a hard reset and now the popup to pair the device comes up
on Android and iOS devices - so Qt works as expected :)
BTW: the possibility to make a hard reset of course was not mentioned in
the BLE Dongle docs.
so I can confirm now that Qt BLE is working well if BLE peripheral needs
Am 05.07.22 um 13:23 schrieb ekke:
> 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
> 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 ?
> Interest mailing list
> Interest at qt-project.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Interest