Skip to content

Latest commit

 

History

History
68 lines (51 loc) · 1.41 KB

README.md

File metadata and controls

68 lines (51 loc) · 1.41 KB

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.

Bluetooth Remote Shutter

Usage

$ bluebutton -d="Shutter3" # sudo as necessary

With config

$ cat /home/.config/bluebutton
keyup=echo UP
keydown=echo down; echo DOWN
longup=echo LONG UP
longdown=echo LONG DOWN
pushandroid=echo PUSH android
pushios=echo PUSH ios
$ bluebutton -d="Shutter3" -c /home/.config/bluebutton # sudo as necessary

Installation

REQUIREMENTS

  • Ruby >= 2.0

  • Kernel config Kernel config

  • BlueZ

Install the gem:

$ gem install bluebutton # sudo as necessary

Bluetooth button manual installation

You must setup bluetooth stack manually.

  • Start scanning mode:
$ 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