- Raspberry Pi B+
- BLE USB dongle
- Raspbian 8.0+
- node.js 4.3+
- noble
- date-utils
Assumes that Raspbian 8.0 is installed.
-
Install the Bluetooth library and tools, development tools.
$ sudo apt install -y git bluez bluez-tools libbluetooth-dev libudev-dev
-
Install the node.js.
$ tar xJf node-v4.3.1-linux-armv6l.tar.xz
$ cd node-v4.3.1-linux-armv6l/
$ sudo cp -R * /usr/local
- Clone the scripts. "WORKDIR" to be replaced with your working directory.
$ cd WORKDIR
$ git clone https://github.com/cerevo/BLECentralScripts4RPi.git
- Install the node.js packages.
$ cd BLECentralScripts4RPi
$ npm install noble date-utils
$ sudo hciconfig hci0 up
$ sudo node beacon_detect.js
9axis.js
, pwm.js
also performs in the sam way.