I opened this issue earlier: https://github.com/evothings/cordova-ble/issues/64
I guess my final question on that page isn't related to the bug which is why it didn't receive a response.
If iOS devices aren't using the MAC addresses, and instead generating their own UUID per beacon, how can I associate with this randomly generated address an object in my remote DB? Or rather, with cordova-ble, what's the proper way to associate a device with the information you want to present? It doesn't seem like `device.address` is a reliable way to identify a device. My beacons are are using the TICC2541, and I'm not seeing the UUID anywhere in the device object within the evothings.ble.startScan callback.
This would be a huge help if someone could give me some guidance here. Thanks for the great library and community!
How to associate data with a beacon? (cordova-ble)
Re: How to associate data with a beacon? (cordova-ble)
I've commented on the issue. I'll give a slightly different answer here.
Apple has blocked iBeacon information from appearing in their CoreBluetooth API. That means the cordova-ble plugin cannot access it.
We have another plugin, cordova-plugin-ibeacon, that should be more helpful in your case.
iBeacons work like this: Each beacon has a Manufacturer UUID (128 bits), a Major ID (16 bits) and a Minor ID (16 bits). The Manufacturer UUID(s) must be hard-coded into your app. The app will then detect only beacons with those UUIDs.
Major ID is intended to identify a location, like a store or warehouse. Minor ID is intended to identify a point within that location, like a shelf or a movable object. However, you may repurpose these IDs as you see fit.
Anyway, this Major/Minor ID is how you associate an iBeacon with a database entry.
Apple has blocked iBeacon information from appearing in their CoreBluetooth API. That means the cordova-ble plugin cannot access it.
We have another plugin, cordova-plugin-ibeacon, that should be more helpful in your case.
iBeacons work like this: Each beacon has a Manufacturer UUID (128 bits), a Major ID (16 bits) and a Minor ID (16 bits). The Manufacturer UUID(s) must be hard-coded into your app. The app will then detect only beacons with those UUIDs.
Major ID is intended to identify a location, like a store or warehouse. Minor ID is intended to identify a point within that location, like a shelf or a movable object. However, you may repurpose these IDs as you see fit.
Anyway, this Major/Minor ID is how you associate an iBeacon with a database entry.
Re: How to associate data with a beacon? (cordova-ble)
Hi Fredrik, thanks for your response. I actually wasn't intending on using the estimotes, I ordered some beacons from a manufacturer on Alibaba, but the Service ID seems to be changed by Apple on every device. I can't really hard code that into the app. However, I noticed that the advertisement data for estimotes was consistent across devices. I've been using phonegap-estimotebeacons for ios devices and i'm using cordova-ble for android devices. i've been using cordova-ble and have an app written around this, but ios has been giving me troubles, and i finally determined what it was yesterday.
Thank you for everything Fredrik!
Thank you for everything Fredrik!
Return to “Questions and answers”
Who is online
Users browsing this forum: No registered users and 22 guests