Nowadays, someone asked me to create app of hand gesture PC controls on bluetooth.
I firstly look at bluez dbus api,
but I can't get what advertisement
, service
, characterisitics
, descriptors
means.
Fortunately This post clalified me these words and I decided to try modifying test service
in example-gatt-server.
On the other hand, we should be familiar with bluetoothctl
beforehand to avoid struggle to use dbus-python api.
To see gatt server works, you can use GattBrowser(android/ios) except for HID services.
Specifically, ios won't let you get HID services directlly, it may be restricted by secutiry terms.
After you fully understand gatt, read the HID examples in References
- video
- Linux
- bluez5.x
- python3.x
Please Check /etc/bluetooth/main.conf
and set ControllerMode
to le
.
- Bluez HID Over GATT
- Base implementation in this repo derives from the page in gist.
- MicroPythonBLEHID
- I used report description from this page for relative/absolute mouse simulation.
- Mouse move to absolute coordinates
- I refered to the url for abosolute mouse simulation.
- Capacitive Touch Screen Emulation
- I also tried touch screen emulation based on disscussion thread.