macos - MacOs BLE“不支持的描述符”
问题描述
我正在使用 macOS Big Sur 11.1 的 Mac mini 上使用 Qt 5.15.2 clang 64bit 为 MacO 开发应用程序。
我正在尝试运行心率服务器示例(示例页面的链接),但我遇到了一些问题。当我使用调试器运行应用程序时,我得到以下应用程序输出:
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 to early,我应该等待powered状态实际上是on,但我目前没有找到等待这个状态的方法。有人有想法吗?
Ps:我在Info.plist文件中设置了“Privacy - Bluetooth Always Usage Description”。
提前致谢。
解决方案
推荐阅读
- angular - Angular mat-divider 不是已知元素
- flutter - Flutter:我将使用哪些小部件来创建这个屏幕?
- java - 我不能在 Cucumber Spring Boot 测试中通过两个步骤定义 @Spy 对象
- python - 根据列中的条件将 Pandas 数据帧拆分为多个数据帧
- javascript - 如何在前一个 div 滑出并隐藏后滑入一个 div,然后用新的 div 重复而不制作幻灯片?
- javascript - 我有一个固定的 div,我使用 jquery 在滚动时淡出。它工作正常,但如果我半途而废并引用 div 显示的页面
- azure - Terraform 模块输出无法解析其他模块中的输入变量
- c++ - 添加到文件而不删除里面的内容
- c# - 有没有办法正确使用 AutoMapper 来实现带判别器的继承?
- go - html/template 类型的 Golang 全局变量未在其他包中定义