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 (将#修改为@)