Fa.*_*uri 5 bluetooth iphone-privateapi ios
我需要实现一个自蓝牙应用程序,以连接所有蓝牙设备到iPhone.我知道CoreBluetooth框架是不可能的.
我使用私有API并将DeviceManager和BluetoothManager的头文件添加到私有框架,并从此处下载BeeTee Project
这个应用程序运行并找到我附近的所有蓝牙设备,但当我尝试通过此代码连接到设备时:
[self.bluetoothManager connectDevice:bluetoothDevice];
Run Code Online (Sandbox Code Playgroud)
还有这个
[bluetoothDevice connect];
Run Code Online (Sandbox Code Playgroud)
选择单元格时,上述两个代码都会请求连接,但BTM会返回此消息:
BeeTee [5473:60b] BTM:设备"Nokia 500"上的服务0xffffffff连接F4:xx:xx:xx:xx:xx失败,错误109
什么是错误109?哪个会设置服务号码?
我想我应该在连接之前配对设备,但我该怎么办呢?
我只是猜测,但我认为问题是它是为Apple 的外部配件程序BluetoothManager.framework制作的。这允许(除其他外)SPP 蓝牙连接到经过认证的设备。但有一个问题:你需要有一个内置身份验证芯片的设备。
我不知道 Apple 在哪个级别/层上实现了身份验证,但我担心 BeeTee 正在使用的私有框架下的一层。
更新:也许这对您有帮助:
BluetoothManager *bluetoothManager = //...
[bluetoothManager setDevicePairingEnabled:YES];
[bluetoothManager connectDevice:bluetoothDevice withServices:0x00002000];
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
994 次 |
| 最近记录: |