Bluebutton
Simple daemon that allows you to execute action when bluetooth button shutter pressed. So you can control your PC by low energy button device and few scripts.
Usage
$ bluebutton -d="Shutter3"
With config
$ cat /home/.config/bluebutton
keyup=echo UP
keydown=echo down; echo DOWN
longup=echo LONG UP
longdown=echo LONG DOWN
$ bluebutton -d="Shutter3" -c /home/.config/bluebutton
Installation
REQUIREMENTS
-
Ruby >= 2.0
-
Kernel config
-
BlueZ
Install the gem:
$ gem install bluebutton
Bluetooth button manual installation
You must setup bluetooth stack manually.
$ bluetoothctl
[bluetooth]$ power on
[bluetooth]$ scan on
- Enable Buetooth Button and wait while it will be found:
[NEW] Device FF:FF:1D:14:79:80 AB Shutter3
- Now you can pair Bluetooth Button and trust to it:
[bluetooth]$ pair FF:FF:1D:14:79:80
[CHG] Device FF:FF:1D:14:79:80 Paired: yes
Pairing successful
[AB Shutter3 ]$ trust FF:FF:1D:14:79:80
[CHG] Device FF:FF:1D:14:79:80 Trusted: yes
[AB Shutter3 ]$ quit