【发布时间】:2022-01-08 06:05:38
【问题描述】:
我正在尝试为 mac 构建一个可以将 mac 模拟到蓝牙键盘的应用程序。
在阅读了《HID over GATT Profile 1.0》 和其他Bluetooth document 之后,我尝试使用Apple 的Core Bluetooth 框架来做到这一点。但打电话后
myPeripheralManager.add(hid_service)我收到一条错误消息:
Error Domain=CBErrorDomain Code=8 "The specified UUID is not allowed for this operation." UserInfo={NSLocalizedDescription=The specified UUID is not allowed for this operation.}
服务的 UUID 是:
- 隐藏服务:0x1812
- 设备信息服务:0x180A
- 电池服务:0x180F
Apple 似乎确实阻止 HID 服务在作为外围设备的 Mac 上运行。
但是像 Key Pad 这样的一些应用实际上可以在 mac 上做到这一点。
有什么办法可以绕过苹果的限制?
【问题讨论】:
标签: macos keyboard bluetooth-lowenergy core-bluetooth hid