Bluez:与iOS配对的问题 [英] Bluez: pairing issue with iOS
问题描述
我有一个在嵌入式设备上运行并使用Bluez 5.48的外围应用程序.我将服务设置为不可配对.当我尝试从Android设备连接到该服务时,一切正常,但是当使用iOS时,连接会在一段时间后丢失,并且在btmon工具中有以下日志:
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)
请告知如何重新配置应用程序或重建Bluez以禁用配对.所有特征均不受保护.
Please advise how to re-configure either application or rebuild Bluez to disable pairing. All characteristics are non-protected.
推荐答案
尝试重新配置应用程序以禁用经典蓝牙和绑定,如下所示:-
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
请注意, io-cap 0
将您的IO功能设置为"DisplayOnly".如果这不起作用,请尝试将io-cap设置为3(NoInputNoOutput),以查看是否得到不同的结果.
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.
还要确保您从iOS设备上的iOS设置中忘记了该设备,因为这可能会带来一些影响.
Also make sure that you are forgetting the device from iOS settings on iOS device as this may have some implications.
这篇关于Bluez:与iOS配对的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!