I have an application running on an embedded device, using Bluez 5.X and DBus.
My application sets an agent with the capability "NoInputNoOutput" and an adapter as not pairable (I don't want pairing).
My embedded device do not initiate connection (GAP peripheral) and broadcast advertising (GATT server).
With BlueZ 5.48 (and 5.52), when I try to connect to my embedded device from Android device, everything works smoothly, but when I try with iOS, the connection gets lost after some time and in btmon tool there are the following logs:
> ACL Data RX: Handle 68 flags 0x02 dlen 9 #1050 [hci0] 398.940027
ATT: Error Response (0x01) len 4
Read Request (0x0a)
Handle: 0x0016
Error: Insufficient Authentication (0x05)
< ACL Data TX: Handle 68 flags 0x00 dlen 7 #1051 [hci0] 398.940268
ATT: Read Request (0x0a) len 2
Handle: 0x0016
> ACL Data RX: Handle 68 flags 0x02 dlen 9 #1052 [hci0] 398.991500
ATT: Error Response (0x01) len 4
Read Request (0x0a)
Handle: 0x0016
Error: Insufficient Authentication (0x05)
If my application sets the adapter as pairable (but I don't want), I got a popup on the iPhone (not on androïd), in order to authorize the pairing
Infos:
- I do not have this issue with BlueZ 5.47
- I do not see my embedded device in the iPhone's regular Bluetooth "Devices" list.
- I have the issue even if my application does not setup any characteristics
I didn't found (in the ChangeLog & git) the change since BlueZ 5.47, that would cause this problem. Any Ideas ?
I think that there is a GATT server on the iPhone because I can see many object which are registered on DBus on connection. I do not have this issue with androïd, even when I setup a GATT server with a characteristic with "Read encrypted" permissions (nRF Connect)
My analyse:
On the Iphone, I launch the connection with my embedded device
My embedded device try to Read something (a characteristic protected ?) on the iPhone (NOK!! Why ?)
The iPhone refuse "Insufficient encryption" (?)
My embedded device send a "Security Request"
The Iphone send a "Pairing Request"
My embedded refuse "Reason Pairing Not Supported"
Edit: The popup appears with the commit "client: Rename set-filter-uuids to uuids" (e1021f7e486ebd6c0618673a758fa2c50d81109c) (between Bluez 5.47 and 5.48)