> HCI Event: Disconn Complete (0x05) plen 4
status 0x00 handle 64 reason 0x08
Reason: Connection Timeout
function notifyMe() {
tag.setAccelerometerPeriod(1000);
tag.notifyAccelerometer(listenForAcc);
}
function listenForAcc() {
tag.on('accelerometerChange', (x, y, z) => {
let data = [x.toFixed(2), y.toFixed(2), z.toFixed(2)];
detectFace(data);
});
}`
node test.js
and node test-discover.js
that only SensorTags that have recently powered on will be detected.
hello sandeep.. i wud like to compliment on ur hard work.. great project.. im using ur project to learn about node js.. i have installed all node packages in my raspberry pie.. when i try to run test.js using "node test.js" i get the following error.. pi@dex:~/node_modules/sensortag $ node test.js
module.js:339
throw err;
^
Error: Cannot find module 'async'
at Function.Module._resolveFilename (module.js:337:15)
at Function.Module._load (module.js:287:25)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (/home/pi/node_modules/sensortag/test.js:3:13)
at Module._compile (module.js:425:26)
at Object.Module._extensions..js (module.js:432:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Function.Module.runMain (module.js:457:10)
abhatikar@abhatikar-mac:~$ gatttool -I -b 24:XX:89:XX:XX:XX
[24:XX:89:XX:XX:XX][LE]> connect
Attempting to connect to 24:XX:89:XX:XX:XX
Connection successful
[24:XX:89:XX:XX:XX][LE]> char-read-uuid f000aa82-0451-4000-b000-000000000000
handle: 0x003f value: 00 02
[24:XX:89:XX:XX:XX][LE]> char-write-req 0x3f 007f
Characteristic value was written successfully
Notification handle = 0x003c value: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[24:XX:89:XX:XX:XX][LE]> char-read-uuid f000aa81-0451-4000-b000-000000000000
handle: 0x003c value: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[24:XX:89:XX:XX:XX][LE]>
noble-device
code, it seems that once a device is connected, discovery is turned off. Is this correct? If so, why?