gpt4 book ai didi

ios - 通过 BeeTee 应用程序连接到其他蓝牙设备

转载 作者:可可西里 更新时间:2023-11-01 04:44:00 24 4
gpt4 key购买 nike

我需要实现一个自蓝牙应用程序以将所有蓝牙设备连接到 iPhone。我知道使用 CoreBluetooth 框架是不可能的。

我使用私有(private) API 并将 DeviceManager 和 BluetoothManager 的头文件添加到私有(private)框架,并从 here 下载了 BeeTee 项目

此应用程序运行并找到我附近的所有蓝牙设备,但是当我尝试通过此代码连接到设备时:

[self.bluetoothManager connectDevice:bluetoothDevice];

还有这个

[bluetoothDevice connect];

当一个单元格被选中时,上面的两个代码都请求连接但是 BTM 返回这个信息:

BeeTee[5473:60b] BTM: connection to service 0xffffffff on device "Nokia 500" F4:xx:xx:xx:xx:xx failed with error 109

什么是错误 109?设置哪个服务号?

我想我应该在连接之前对设备进行配对,但我该怎么做呢?

最佳答案

我只是在猜测,但我认为问题在于 BluetoothManager.framework 是为 External Accessory Program by Apple 制作的.这允许(除其他外)SPP 蓝牙连接到认证设备。但是有一个问题:你需要有一个内置认证芯片的设备。

我不知道 Apple 在哪个级别/层实现了身份验证,但我担心它是在 BeeTee 使用的私有(private)框架下的一层实现的。

更新:也许这对你有帮助:

BluetoothManager *bluetoothManager = //...
[bluetoothManager setDevicePairingEnabled:YES];
[bluetoothManager connectDevice:bluetoothDevice withServices:0x00002000];

Credits

关于ios - 通过 BeeTee 应用程序连接到其他蓝牙设备,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23579226/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com