Lock/unlock your machine using your phone
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



  • Go
  • rfcomm
  • hcitools


go get github.com/satran/autolock

If you want to compile in your phone's address, then you can do it with

go build -ldflags '-X main.addr the:addr' github.com/satran/autolock

If you don't do this, you'll have to add the address for each invocation of autolock.

Enabling Bluetooth

You can use rfkill to enable your bluetooth device if it is blocked: sudo rfkill list to list the devices, and sudo rfkill unblock hci0 tu unblock.

If hciconfig says DOWN in the third line, the device can be started with sudo hciconfig hci0 up. After this hcitool dev shall list the device.

Getting phone's bluetooth address

Use ``hcitool scan` AFTER you've enabled scanning on your phone.


Can't open RFCOMM control socket: Protocol not supported: sudo modprobe -v rfcomm