Bluez: pairing issue with iOS

Viewed 778

I have a peripheral application running on embedded device and using Bluez 5.48. I set my service as non-pairable. When I try to connect to the service from Android device, everything works smoothly, but when 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)

Please advise how to re-configure either application or rebuild Bluez to disable pairing. All characteristics are non-protected.

1 Answers

Try to reconfigure application to disable classic Bluetooth and bonding like this:-

btmgmt power off
btmgmt bredr off
btmgmt bonding off
btmgmt io-cap 0
btmgmt power on

Note that io-cap 0 sets your IO capabilities to "DisplayOnly". If this doesn't work, try to set the io-cap to 3 (NoInputNoOutput) to see if you get a different result.

Also make sure that you are forgetting the device from iOS settings on iOS device as this may have some implications.

Related