python3 BLE 的 root 权限
python3 root-privileges for BLE
为什么 this python2-BLE-application need sudo-rights whereas gatt-python 没有?
通过两者,您可以与 microcontroller-board. (I've tested this with a BLE-Extansion-board 进行通信。)
gatt-python
使用 DBus 与 bluetoothd
通信,这本身就是 运行 提升的权限。 OTOH,BlueST SDK 使用 bluepy, which contains a small helper application,它使用 HCI 协议直接与蓝牙适配器对话,这需要 root 权限(实际上不再推荐,因为它会干扰 bluetoothd
)。
为什么 this python2-BLE-application need sudo-rights whereas gatt-python 没有?
通过两者,您可以与 microcontroller-board. (I've tested this with a BLE-Extansion-board 进行通信。)
gatt-python
使用 DBus 与 bluetoothd
通信,这本身就是 运行 提升的权限。 OTOH,BlueST SDK 使用 bluepy, which contains a small helper application,它使用 HCI 协议直接与蓝牙适配器对话,这需要 root 权限(实际上不再推荐,因为它会干扰 bluetoothd
)。