Simple client and server using to communicate with each other Bluetooth Low Energy.
Client connects to the server, sends status messages and listens on command to execute. Server handles connections, receives status messages and sends commands to execute.
Client was tested on macOs Mojave, server on Raspberry Pi 3 B+.
sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev
bluetoothd
disabled, if BlueZ 5.14 or later is installed. Usesudo hciconfig hci0 up
to power Bluetooth adapter up after stopping or disablingbluetoothd
.npm install
(in cloned raspblue directory)sudo node src/server/main.js
sudo cp ./raspblue.service /lib/systemd/system/
sudo systemctl daemon-reload
sudo systemctl start raspblue
sudo systemctl status raspblue
Raspblue logs can be found in journalctl: sudo journalctl -u raspblue
npm install
(in cloned raspblue directory)node_modules/.bin/forever src/client/main.js