Skip to contentSkip to conversation

issue since bluez 48 with ios pairing only

DISCUSSION Arthur LAMBERT 3 participants 4 messages Mar 20, 2018 1 message not in the archive Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

We used bluez in a firmware on a device used as peripheral with custom services and characteristics. We are able to connect to this device with ios/android mobile app application and homemade linux client

We have an issue since bluez 48 and also on bluez 49 concerning pairing process with IOS.

After the pairing process, a pop up appears on IOS :

<<<<
Bluetooth Pairing Request
"XXXX" would like to pair with your Iphone

Cancel Pair

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

Before bluez 48, we did not see this pop up. Users have to click on Pair button to finish the pairing process; Then in IOS side, a Disconnect trigger in code is no more able to disconnect properly the device.

Are we doing something wrong to get this issue on bluez 48 ?

Current way to init our hci device :

btmgmt -i hci0 power off
btmgmt -i hci0 le on
btmgmt -i hci0 connectable on
btmgmt -i hci0 bredr off
btmgmt -i hci0 name XXXX
btmgmt -i hci0 advertising on
btmgmt -i hci0 power on

# btmgmt -i hci0 info
hci0:   Primary controller
addr XX:XX:XX:XX:XX:XX version 6 manufacturer 15 class 0x000000
supported settings: powered connectable fast-connectable discoverable bondable link-security ssp br/edr hs le advertising secure-conn debug-keys privacy static-addr
current settings: powered connectable bondable le advertising secure-conn
name TESTBENCH-V2
short name

I tried to play with other settings with btmgmt without be able to fix our issue.

Thanks,
Arthur.

#1 lore raw

Hi Arthur,

Quoted 11 lines · Arthur LAMBERT

We used bluez in a firmware on a device used as peripheral with custom services and characteristics. We are able to connect to this device with ios/android mobile app application and homemade linux client

We have an issue since bluez 48 and also on bluez 49 concerning pairing process with IOS.

After the pairing process, a pop up appears on IOS :

<<<<
Bluetooth Pairing Request
"XXXX" would like to pair with your Iphone

Quoted 6 lines

Cancel Pair

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

Before bluez 48, we did not see this pop up. Users have to click on Pair button to finish the pairing process; Then in IOS side, a Disconnect trigger in code is no more able to disconnect properly the device.

Id expect a dialog to always be shown when pairing, are you sure this was not some update on iOS side? I don't recall any change in this regard since a long time, or perhaps this is because of agent capabilities? What paring agent capabilities are you using? The sentence about the Disconnect I could not comprehend, is iOS unable to disconnect after pairing?

Quoted 20 lines

Are we doing something wrong to get this issue on bluez 48 ?

Current way to init our hci device :

btmgmt -i hci0 power off
btmgmt -i hci0 le on
btmgmt -i hci0 connectable on
btmgmt -i hci0 bredr off
btmgmt -i hci0 name XXXX
btmgmt -i hci0 advertising on
btmgmt -i hci0 power on

# btmgmt -i hci0 info
hci0:   Primary controller
addr XX:XX:XX:XX:XX:XX version 6 manufacturer 15 class 0x000000
supported settings: powered connectable fast-connectable discoverable bondable link-security ssp br/edr hs le advertising secure-conn debug-keys privacy static-addr
current settings: powered connectable bondable le advertising secure-conn
name TESTBENCH-V2
short name
Quoted 1 line

I tried to play with other settings with btmgmt without be able to fix our issue.

If you running with bluetoothd you should be using bluetoothctl instead of btmgmt, and in case you are not using bluetoothd then the BlueZ version don't really matter and what you should check is the kernels changes.

Signature · 1 line
Luiz Augusto von Dentz

A message that is not in the archive (sent off-list or not yet received): CAOVXOEb9kzkYQP1YF5QMS2DBN=FWL0-PkENne8dOVcvbLFta2w@mail.gmail.com

#3 lore raw

Hi Arthur,

we had the same issue, it was related to the new "Bluetooth LE Battery service", when we built bluez without this module the problem was gone.
I think the problem is that iPhones are advertising the battery service but require pairing for it and this module tries to read the services values as soon as the iPhone is connected.

Regards,
Michael

2018-03-20 12:53 GMT+01:00 Michael Simon <[email protected]>:

Quoted 71 lines

Hi Arthur,

we had the same issue, it was related to the new "Bluetooth LE Battery service", when we built bluez without this module the problem was gone. I think the problem is that iPhones are advertising the battery service but require pairing for it and this module tries to read the services values as soon as the iPhone is connected.

Regards,
Michael

2018-03-20 12:27 GMT+01:00 Arthur LAMBERT <[email protected]>:

Quoted 56 lines

We used bluez in a firmware on a device used as peripheral with custom services and characteristics.
We are able to connect to this device with ios/android mobile app application and homemade linux client

We have an issue since bluez 48 and also on bluez 49 concerning pairing process with IOS.

After the pairing process, a pop up appears on IOS :

<<<<
Bluetooth Pairing Request
"XXXX" would like to pair with your Iphone

Cancel Pair

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

Before bluez 48, we did not see this pop up. Users have to click on Pair button to finish
the pairing process; Then in IOS side, a Disconnect trigger in code is no more able
to disconnect properly the device.

Are we doing something wrong to get this issue on bluez 48 ?

Current way to init our hci device :

btmgmt -i hci0 power off
btmgmt -i hci0 le on
btmgmt -i hci0 connectable on
btmgmt -i hci0 bredr off
btmgmt -i hci0 name XXXX
btmgmt -i hci0 advertising on
btmgmt -i hci0 power on

# btmgmt -i hci0 info
hci0:   Primary controller
addr XX:XX:XX:XX:XX:XX version 6 manufacturer 15 class 0x000000
supported settings: powered connectable fast-connectable discoverable
bondable link-security ssp br/edr hs le advertising secure-conn debug-keys
privacy static-addr
current settings: powered connectable bondable le advertising secure-conn
name TESTBENCH-V2
short name

I tried to play with other settings with btmgmt without be able to fix our issue.

Thanks,
Arthur.
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw
In reply to a message not in the archive
Quoted 8 lines · Michael Simon

Hi Arthur,
we had the same issue, it was related to the new "Bluetooth LE Battery service", when we built bluez without this module the problem was gone. I think the problem is that iPhones are advertising the battery service but require pairing for it and this module tries to read the services values as soon as the iPhone is connected.
Regards,
Michael

Thank you very much for your quick and good answer Michael. Its works perfecly now ! I will integrate bluez 49 in my firmware for testing thanks to you !

Quoted 4 lines · Luiz Augusto von Dentz

If you running with bluetoothd you should be using bluetoothctl instead of btmgmt, and in case you are not using bluetoothd then the BlueZ version don't really matter and what you should check is the kernels changes.

We are using bluetoothd and dbus api to declare our custom services. We choosed to use btmgmt because all the options provide by btmgmt was not present in bluetoothctl one year ago. I will try to look at this tool this week

Regards,
Arthur.