Get the code from gihub: https://github.com/sandeepmistry/node-sensortag
Change USE_READ = 1 rather than true
Install python2+,nodejs,npm
Run all the command in sudo mode
Chek out: https://github.com/nodejs/node-gyp#installation https://github.com/noble/noble#prerequisites
Install node-gyp: "npm install -g node-gyp"
python (v2.7 recommended, v3.x.x is not supported) make A proper C/C++ compiler toolchain, like GCC
"node-gyp --python /path/to/python2.7" "npm config set python /path/to/executable/python2.7"
Linux Kernel version 3.6 or above libbluetooth-dev
Install noble: "sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev"
then "sudo ln -s /usr/bin/nodejs /usr/bin/node"
"sudo pkg install gmake"
"npm install noble"
"sudo setcap cap_net_raw+eip $(eval readlink -f which node
)"
"sudo apt-get install libcap2-bin"
"npm install noble-device"
Run the command "npm install sensortag"
sudo node test.js