sandeepmistry / node-bleacon

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

RadBeaconTag #63

Closed neosource closed 7 years ago

neosource commented 8 years ago

Unable to use RadBeaconTag code. When I run the test-radbeacon-tag.js, i don't see it detecting anything.

sandeepmistry commented 8 years ago

@neosource maybe they changed something in the firmware?

Please add some logging statements here: https://github.com/sandeepmistry/node-bleacon/blob/master/radbeacon/radbeacon-tag.js#L28-L32 and see if it needs to be changed ...

neosource commented 8 years ago

I tried detecting using bleacon and it detect the beacon. But when I try using RadBeaconTag it does not detect the UUID at all. I have one program listed on bleacon.png which is able to detect the beacon. radbeacon-tag_logging.png shows the changes made to radbeacon-tag.js to log some data to the console (as recommended). detect_radbeacontag.png is a program that tries to detect the radbeacon. It keeps showing uuid for some devices that I am not sure are even present near me. But it does not detect the radbeacon that was detected in bleacon.png.

bleacon detect_radbeacontag radbeacon-tag_logging

neosource commented 8 years ago

would really appreciate if someone can guide me here.

sandeepmistry commented 7 years ago

@neosource please try adding console.log(peripheral.advertisement);.

Also, text logs are preferred over screenshots as they are also searchable.

neosource commented 7 years ago

i have added the log statement as advised. Please find attached the updated radbeacon-tag.js file named as radbeacon-tag.js.txt file. The output is from running the detectRadBeaconTag.js named as detectRadBeaconTag.js.txt . Surprisingly, the RadBeacon never gets detected by the program but it is detecting some beacons, that I am sure i don't even have.

But when I use the generic bleacon module as in main.js.txt, the RadBeacon is detected properly. My core objective is to use the RadBeaconTag API to get the battery level of the beacon that is detected.

I am using the 'Locate' App on iPhone from Radius Networks. It simulates a RadBeaconTag from the App.

main.js.txt detectRadBeaconTag.js.txt

radbeacon-tag.js.txt output.txt

sandeepmistry commented 7 years ago
{"manufacturerData":{"type":"Buffer","data":[93,1,1,23,116,81,99,56,149,218,237,4,133,226,145,53,1,2,192,163,0,116]},"serviceData":[],"serviceUuids":["180f"]}

I think this is a RadBeacon in whatever f/w you are using on the device. So you can filter on if the manufacturing data is "iBeacon" format and the service UUID "180f" is present.

sandeepmistry commented 7 years ago

Closing this for now due to lack of activity, please submit a pull request if my previous suggestion works.