sandeepmistry / node-bleacon

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

Is node-bleacon always passive? (node-bleacon battery life implications?) #56

Closed T-X closed 8 years ago

T-X commented 8 years ago

Hi,

Sorry, I'm relatively new to how Bluetooth LE works. But since I saw lines like "state = disconnected" in the source code and as there is an option to passively or actively scan for BLE devices via "hcitool lescan", I thought I'd ask.

Does node-bleacon not only receive, but also send packets via BLE? Are there any active connections or handshakes with BLE devices?

We are currently having many estimote stickers dying one after another way before the one year period, without much sticker movement involved. I was just wondering whether something like this could potentially be caused via software bugs in node-bleacon. Or whether a bug in the estimote sticker firmware or a hardware issue is more likely.

sandeepmistry commented 8 years ago

Hi @T-X,

noble (which node-bleacon) uses always does an active scan. However, estimote stickers do not respond , they only support passive scanning. I would definitely say it's on the Estimote sticker side, my stickers have died as well.

T-X commented 8 years ago

Hi @sandeepmistry. Thanks for your response again! Can you tell me how often noble performs active scans?

I'll also ask the Estimote support, regarding the firmware and active scans. I'm wondering whether even though a sticker does not respond, whether this still could prevent the chip to go into sleep mode or something like this.

sandeepmistry commented 8 years ago

Hi @T-X,

noble scan parameters can be found here: https://github.com/sandeepmistry/noble/blob/master/lib/hci-socket/hci.js#L227-L246

I'm wondering whether even though a sticker does not respond, whether this still could prevent the chip to go into sleep mode or something like this.

I would not expect this to have any impact.