A lock that unlocks/locks from proximity of a bluetooth device typically a phone. Designed for Raspberry Pi 3.
-
Install bluetooth library: $ sudo apt-get install libbluetooth-dev
-
Install wiringPi: http://wiringpi.com/download-and-install/
-
Connect your phone to your Raspberry Pi bluetooth
-
Change Bluetooth Unique ID phone[19] to the unique ID of your bluetooth device in detectBT.c.
-
In order for detectBT.c to write log and control files, permission needs to be added. In terminal do: $ sudo chmod -R 777 ./
-
Compile detectBTServer.c: $ gcc -o detectBTServer detectBTServer.c
-
Compile and execute detectBT.c: $ gcc -o detectBT detectBT.c -lwiringPi -lbluetooth
$ sudo ./detectBT -
Compile and execute detectBTClient.c: $ gcc -o detectBTClient detectBTClient.c
$ sudo ./detectBTClient