微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

MacOs BLE“不支持的描述符”

如何解决MacOs BLE“不支持的描述符”

我正在使用 macOS Big Sur 11.1 的 Mac mini 上使用 Qt 5.15.2 clang 64 位为 MacO 开发应用程序。

我正在尝试运行心率服务器示例 (link to the page of the example),但遇到了一些问题。当我使用调试器运行应用程序时,我得到以下应用程序输出

2021-07-22 16:22:03.774769+0200 heartrate-server[43797:13434312] [qt.bluetooth.osx] unsupported descriptor "{00002902-0000-1000-8000-00805f9b34fb}"
2021-07-22 16:22:03.775480+0200 heartrate-server[43797:13434385] [CoreBluetooth] WARNING: <CBPeripheralManager: 0x100a17a80> has no restore identifier but the delegate implements the peripheralManager:willRestoreState: method. Restoring will not be supported
2021-07-22 16:22:04.831350+0200 heartrate-server[43797:13434385] [CoreBluetooth] API MISUSE: <CBPeripheralManager: 0x100a17a80> can only accept this command while in the powered on state

我应该怎么做才能修复不支持的描述符错误?我应该怎么做才能删除“只能在通电状态下接受此命令”?我发现这第二句话的问题是我提前调用了startAdvertising,我应该等待power state实际开启,但我目前没有找到等待这个状态的方法。有人有想法吗?

P.s:我在 Info.plist 文件中设置了“隐私 - 蓝牙始终使用说明”。

提前致谢。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。