简体   繁体   中英

Python using gattlib for BLE Scanning on Windows 10

I want to create a BLE Connection between my Laptop (Windows 10) and a BLE Device which will be the Master. I installed Bluez and I can detect Bluetooth devices like my Smartphone but no device that only supports BLE. I want to download gattlib with pip install gattlib but I got an OSError: Not supported OS which brings me to the conclusion that I can't do it this way on Windows 10. Is there any other possibility than installing Linux on my Laptop?

gattlib is controlling bluez via dbus, bluez is linux only, so gattlib can't be used on windows. gattlib is basically wrapper for the dbus api of bluez in python.
use vm instead and mount your bt adapter to the vm in order to control it with bluez. wsl isn't supporting bluez right now Windows 11 and Android - BluetoothAdapter return null

The operating you are using is not compatible. Gattlib only work with linux due to it relying on bluez whcih work on linux only. What you can do is using WSL on windows.

As far as I know, gattlib is designed for linux and debian system so you can use another one. Another side, if you are using a Python version greater than 3.9, you can directly Bluetooth RFCOMM Support for Windows 10.

I think you can find a solution by using "vmware" or "virtualbox" programs. i tested for you enter image description here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM