ibeacon specifications says:
the uuid, major , minor values provide identifying information ibeacon.
major , minor values used distinguish products or elements within region. apple documentation quiet clear on how , store example quiet good.
however works only when there 1 element category per region (or sub-region) doesn't work if want app able distinguish among elements same minor , major within same region.
is there some other unique identifier associated ibeacon can monitored/detected can distinguish ibeacons same minor , major value?
edit: additional information
to test have created 2 ibeacons same uuid , same major , minor value , started monitoring ibeacons within uuid specified.
the callback code have implemented ibeacons ranged in regions following:
-(void)locationmanager:(cllocationmanager *)manager didrangebeacons:(nsarray *)beacons inregion:(clbeaconregion *)region { nslog(@"did range %lu beacon in region %@", (unsigned long)[beacons count], region.identifier); (int i=0; i<[beacons count]; i++) { clbeacon *beacon = [beacons objectatindex:i]; // <- breakpoint! nsstring *_cnt = [[nsstring alloc] initwithformat:@"number of beacons : %lu , current 1 %i %f away %@",(unsigned long)[beacons count], i, beacon.accuracy, beacon.description]; } } when add breakpoint beacon line see both clbeacon objects detected have same information:
clbeacon (uuid:<__nsconcreteuuid 0x17003d8e0> 74278bda-b644-4520-8f0c-720eaf059935, major:20, minor:0, proximity:1 +/- 0.17m, rssi:-42) clbeacon (uuid:<__nsconcreteuuid 0x17003e840> 74278bda-b644-4520-8f0c-720eaf059935, major:20, minor:0, proximity:2 +/- 0.28m, rssi:-47) so of unable distinguish among them unless specify major , minor value.
here screenshot of app using configure ibeacons (there no other fields can configure):

i wonder if within blue tooth signal there sort of unique identifier identifies each hardware.
this common problem, , difficult solve. while best practices different beacons should not share same proximityuuid/major/minor, there legitimate edge cases multiple beacons transmitting same identifiers in same place. (at radius networks, example, put default identifiers our beacons, if order 2 of them have identical identifiers until change them.)
using corelocation apis, 2 different beacons same identifiers show 2 beacons in didrangebeacons:inregion: callback. because internally, ios maintains uniqueness using hardware address. unfortunately, corelocation not expose hardware mac address or other indication of beacon same identifier which.
using corebluetooth apis in foreground, can callbacks each ibeacon seen. , while cannot hardware mac address, ios assign unique identifier each of them (probably based on hash of mac address) can tell them apart. unfortunately, ios not let read contents of advertisement using corebluetooth can't read ibeacon identifiers. can count how many different bluetooth le around might or might not ibeacons.
it possible hacky tricks try , correlate information corebluetooth , corelocation using timestamps of when devices appeared , rssi readings. these tricks not extremely reliable , prone failure when many beacons around.
Comments
Post a Comment