Giter Site home page Giter Site logo

mdunham / iot-nodejs-daemon Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 201 KB

This is a bluetooth server that facilitates communications between the mobile-delivery-app and a LC/LCR-II meter via serial comm port.

Shell 9.34% JavaScript 77.31% Python 13.36%

iot-nodejs-daemon's Introduction

Bluetooth to Serial Communications Daemon

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.

Prerequisites

  • install nodejs
  • The following are installed during the npm install command:

Bleno on Linux

  • Kernel version 3.6 or above
  • libbluetooth-dev
  • bluetoothd disabled, if BlueZ 5.14 or later is installed. Use sudo hciconfig hci0 up to power Bluetooth adapter up after stopping or disabling bluetoothd.
    • 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)

Ubuntu/Debian/Raspbian

sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev

Make sure node is on your path, if it's not, some options:

Installation

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
  • Start the daemon: npm start

Register Daemon to Run on Boot

  • 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

Development

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.

iot-nodejs-daemon's People

Stargazers

 avatar

Watchers

Matthew Dunham avatar James Cloos avatar M Frakes avatar

iot-nodejs-daemon's Issues

xamarin android version

Hi i need create a app android that communicate with the LCR-II , i found you project like example.. could you send some references that can help me?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.