sandeepmistry / node-bleacon

A Node.js library for creating, discovering, and configuring iBeacons
MIT License
497 stars 88 forks source link

Problem with receiving stickers data. #67

Closed mathil closed 7 years ago

mathil commented 7 years ago

Hi. I have a problem wich receiving data from estimote stickers. At the beginning everything is working properly, but after some time beacons do not report. I launched the application in debug mode, and after a few minutes I got the information:

gap advertisement = {"manufacturerData":{"type":"Buffer","data":[93,1,1,168,46,37,178,195,124,52,104,4,131,136,209,52,255,255,255,197,8,115]},"serviceData":[],"serviceUuids":["180f"]} +0ms hci onSocketData: 043e2b02010301458e3ef63ffa1f02010403030f1817ff5d0101a82e25b2c37c3468040188a1adffffffc50853b8 +320ms hci event type = 4 +1ms hci sub event type = 62 +0ms hci LE meta event type = 2 +0ms hci LE meta event status = 1 +0ms hci LE meta event data = 0301458e3ef63ffa1f02010403030f1817ff5d0101a82e25b2c37c3468040188a1adffffffc50853b8 +0ms hci onSocketData: 043e2b02010301458e3ef63ffa1f02010403030f1817ff5d0101a82e25b2c37c3468040188a1adffffffc50853b8 +0ms hci event type = 4 +0ms hci sub event type = 62 +0ms hci LE meta event type = 2 +0ms hci LE meta event status = 1 +0ms hci LE meta event data = 0301458e3ef63ffa1f02010403030f1817ff5d0101a82e25b2c37c3468040188a1adffffffc50853b8 +0ms hci type = 3 +0ms hci address = fa:3f:f6:3e:8e:45 +0ms hci address type = random +0ms hci eir = 02010403030f1817ff5d0101a82e25b2c37c3468040188a1adffffffc50853 +0ms hci rssi = -72 +0ms gap advertisement = {"manufacturerData":{"type":"Buffer","data":[93,1,1,168,46,37,178,195,124,52,104,4,1,136,161,173,255,255,255,197,8,83]},"serviceData":[],"serviceUuids":["180f"]} +1ms mgmt on data ->070000000300000000 +149ms mgmt on data ->060000000400d0020000 +1ms mgmt on data ->050000000000 +0ms noble stateChange poweredOff +64ms bleno stateChange poweredOff +1ms mgmt on data ->040000000000 +417ms mgmt on data ->060000000400c1000000 +4ms mgmt on data ->060000000400c1020000 +2ms mgmt on data ->060000000400d1020000 +1ms hci setting filter to: 1600000020c10000000000400000 +577ms hci set event mask - writing: 01010c08fffffbff07f8bf3d +1ms hci onSocketError: File descriptor in bad state +0ms hci set le event mask - writing: 010120081f00000000000000 +1ms hci onSocketError: File descriptor in bad state +0ms hci read local version - writing: 01011000 +0ms hci onSocketError: File descriptor in bad state +0ms hci write LE host supported - writing: 016d0c020100 +1ms hci onSocketError: File descriptor in bad state +0ms hci read LE host supported - writing: 016c0c00 +0ms hci onSocketError: File descriptor in bad state +0ms hci read bd addr - writing: 01091000 +0ms hci onSocketError: File descriptor in bad state +0ms hci setting filter to: 1400000020c10000000000400000 +1ms hci set event mask - writing: 01010c08fffffbff07f8bf3d +0ms hci onSocketError: File descriptor in bad state +1ms hci set le event mask - writing: 010120081f00000000000000 +0ms hci onSocketError: File descriptor in bad state +0ms hci read local version - writing: 01011000 +0ms hci onSocketError: File descriptor in bad state +0ms hci read bd addr - writing: 01091000 +1ms hci onSocketError: File descriptor in bad state +1ms.

I use Debian 8.4 on Gigabyte Brix GB BACE-3000.

Second question: some of my stickers doesn't pass IF condition in estimote-sticker.js onDiscover() function - what it does mean? Low baterry?

sandeepmistry commented 7 years ago
noble stateChange poweredOff +64ms
bleno stateChange poweredOff +1ms

Your adapter is powering off for some reason, this is outside the scope of noble/bleno and controlled by the kernel. sudo hciconfig hci0 up which power it back up.

Second question: some of my stickers doesn't pass IF condition in estimote-sticker.js onDiscover() function - what it does mean? Low battery?

It might be another BLE device in range.