sandeepmistry / node-bleacon

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

Bleacon - Estimote Sticker beacons not dicovered unless in motion #60

Closed pratsing1985 closed 8 years ago

pratsing1985 commented 8 years ago

Hi Sandeep,

I have just started to play around with beacons on raspi. I am using estimote beacons and Bleacon.

I have tried test.js in "node-bleacon/estimote-sticker/" to scan the estimote stickers, but the "discover" event is called only when stickers are in motion. All my estimote sticker are configured to broadcast even if not in motion.

I have checked with Estimotes's SDK, and it can detect the sticker without motion.

Am I missing something? Please do let me know if you need any further information from my side.

Thanks for your help and great work with node-beacon libs.

Thanks, Prateek

Pyons commented 8 years ago

Hey Prateek,

I had the same problem. Scrolling through the other issues i found this one Memoryleak with EstimoteSticker?

_"Btw., interestingly I had to add "NOBLE_REPORT_ALL_HCIEVENTS=1" to actually get those beacons with a random MAC into the discover event of EstimoteSticker. And the only way to get reliable, periodic discover events for non-moving stickers at all."

Starting my app like this $ NOBLE_REPORT_ALL_HCI_EVENTS=1 node test.js solved it for me.

Good Luck, Steffen

sandeepmistry commented 8 years ago

Hi @pratsing1985 @Bengel15,

That makes sense since the stickers don't use scan responses. Maybe we can set the env. var in the JS side of estimote-sticker.js. Would either of you have time to submit a pull request for this change?

Pyons commented 8 years ago

Hey @sandeepmistry,

i submitted a pull request.

sandeepmistry commented 8 years ago

I'm closing this now that #61 has been merged.

You can try it out via npm install sandeepmistry/node-bleacon until a new release is published to npm.

Please give your feedback here, if things look good I can publish :)