This application generates a bluetooth service that allows the Cleveland Drivers mobile app to communicate with a Liquid Controls LCR-II meter via usb-serial. The mobile app uses the phones bluetooth to connect to this service.
Note: macOS / Mac OS X, Linux, FreeBSD and Windows are currently are supported, but the instructions below are for a Raspberry Pi.
- install nodejs
- The following are installed during the
npm install
command:- install bleno
- install serialport
- Kernel version 3.6 or above
libbluetooth-dev
bluetoothd
disabled, if BlueZ 5.14 or later is installed. Usesudo hciconfig hci0 up
to power Bluetooth adapter up after stopping or disablingbluetoothd
.System V
:sudo service bluetooth stop
(once)sudo update-rc.d bluetooth remove
(persist on reboot)
systemd
sudo systemctl stop bluetooth
(once)sudo systemctl disable bluetooth
(persist on reboot)
sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev
Make sure node
is on your path, if it's not, some options:
- symlink
nodejs
tonode
:sudo ln -s /usr/bin/nodejs /usr/bin/node
- install Node.js using the NodeSource package
Note: You must be logged in as root before performing the following.
- Clone the repository:
git clone https://github.com/mdunham/cl-lcr-daemon.git /root/
- Change to the cl-lcr-daemon directory:
cd /root/cl-lcr-daemon/
- Install dependencies:
npm install --unsafe-perm
- Note: Since you're installing as root you must use the
--unsafe-perm
flag
- Note: Since you're installing as root you must use the
- Start the daemon:
npm start
- Make the CLI executable:
chmod +x /root/cl-lcr-daemon/bin/cl-lcr-cli
- Also, the Boot script:
chmod +x /root/cl-lcr-daemon/bin/boot
- Run the register command:
/root/cl-lcr-cli/bin/cl-lcr-cli register
- Start the daemon:
service cl-lcr-daemon start
Log Output: Main log located at /var/log/cl-lcr-daemon.log
and errors are logged to /var/log/cl-lcr-daemon.err
- To run the daemon
service cl-lcr-daemon start
- To stop the daemon
service cl-lcr-daemon stop
This application is maintained by Matthew Dunham at Hot Coffey Design.