【发布时间】:2021-02-12 19:50:40
【问题描述】:
我今天尝试使用 Qt 宣传 BluetoothLE 服务。我首先测试了Bluetooth Low Energy Heart Rate Server Example,它在我的安卓手机上运行良好。不过,在我的 Ubuntu 18.04 笔记本电脑上,我无法让它工作。
当我以 root 身份运行示例时,我收到错误 qt.bluetooth.bluez: received advertising error。
启用调试消息后,我得到了这个日志:
qt.bluetooth: Using BlueZ kernel ATT interface
qt.bluetooth.bluez: Bluez 5 detected.
qt.bluetooth.bluez: Starting to advertise
qt.bluetooth.bluez: sending command; ogf: 8 ocf: 7
qt.bluetooth.bluez: command sent successfully
qt.bluetooth.bluez: HCI event triggered, type: e
qt.bluetooth.bluez: command 7 failed with status 12
qt.bluetooth.bluez: reading power level failed, leaving it out of the advertising data
qt.bluetooth.bluez: advertising parameters: "000800080000000000000000000700"
qt.bluetooth.bluez: advertising data: "18020106100948656172745261746553657276657203030d1800000000000000"
qt.bluetooth.bluez: scan response data: "15100948656172745261746553657276657203030d1800000000000000000000"
qt.bluetooth.bluez: sending command; ogf: 8 ocf: 10
qt.bluetooth.bluez: command sent successfully
qt.bluetooth.bluez: HCI event triggered, type: e
qt.bluetooth.bluez: command 10 failed with status 12
qt.bluetooth.bluez: Advertising disable failed, ignoring
qt.bluetooth.bluez: sending command; ogf: 8 ocf: 6
qt.bluetooth.bluez: command sent successfully
qt.bluetooth.bluez: HCI event triggered, type: e
qt.bluetooth.bluez: command 6 failed with status 12
qt.bluetooth.bluez: received advertising error
有人知道所有这些错误消息的含义吗?
感谢您的帮助!
【问题讨论】:
标签: linux qt bluetooth-lowenergy bluez qtbluetooth