IOS iBeacon: How to get all proximityUUID programmatically?

I want to see the proximityUUID ad package software package. Some articles say that on iOS is not possible, but Android is possible. But I canโ€™t believe it because I found a fantastic application "BLExplr". I need to implement a function in my application. Does anyone know how to do this or good examples? Any help would be appreciated.

(UPDATE 2014/1/17)

I believe @ davidgyoung's answer is right. The proximityUUID rating beacon is โ€œB9407F30-F5F8-466E-AFF9-25556B57FE6D,โ€ but the displayed UIDID of the rating beacon in the BLExplr app is another identifier.

enter image description hereenter image description here

+8
ios ibeacon
source share
3 answers

Unfortunately, you cannot do this in iOS. When you say that BLExplr and LightBlue can do this, you confuse the UUID of the Bluetooth service with the iUeon Proximity UUID. These are two different things.

The UUID of the Bluetooth service is visible for iOS, but has nothing to do with iBeacon identifiers and is useless for working with iBeacons. The service UUID is generated by iOS each time a bluetooth device is displayed, and remains unchanged only for the time that the Bluetooth device is in range. If you remove the Bluetooth device and return it later, it will have a different service UUID.

IBeacon identifiers (ProximityUUID, Major, Minor) are built into the body of the Bluetooth advertisement. The problem on iOS devices is that the Apple CoreBluetooth API prohibits access to the text of the source body, so a third-party application cannot read these identifiers. Apple only allows access to these identifiers using the iBeacon CoreLocation special APIs, but these APIs require you to know the UUID Proximity in front.

Sorry, I know this is not the answer you want to hear! (I apologize for this too!) What it costs, you can do it on Android, on OSX Mavericks and Linux.

More details here .

+23
source share

davidgyoung is partially mistaken in not being able to receive iBeacon information. In fact, you can get proximity UUIDs from OS X , but not iOS .

In CBPeripheral advertisingData must be a key named kCBAdvDataManufacturerData ; This is NSData representing iBeacon advertising information. This key is available only on OS X.

Make sure the second byte is 0x02 , the first two bytes are 0x004c ( 76 in decimal), and the fourth byte (in decimal) + 4 is the data length (should be 25).

NSRanges (sorry for Mac syntax)
UUID Proximity: NSMakeRange(4, 16)
Major: NSMakeRange(20,2)
Minor: NSMakeRange(22,2)

To make sure you are doing this correctly, you can register the values โ€‹โ€‹as hex (use the %x format string) and make sure they match the description NSData where they came from.

+8
source share
 NSRange uuidRange = NSMakeRange(4, 16); NSRange majorRange = NSMakeRange(20, 2); NSRange minorRange = NSMakeRange(22, 2); NSRange powerRange = NSMakeRange(24, 1); Byte uuidBytes[16]; [data getBytes:&uuidBytes range:uuidRange]; NSUUID *uuid = [[NSUUID alloc] initWithUUIDBytes:uuidBytes]; int16_t majorBytes; [data getBytes:&majorBytes range:majorRange]; int16_t majorBytesBig = (majorBytes >> 8) | (majorBytes << 8); int16_t minorBytes; [data getBytes:&minorBytes range:minorRange]; int16_t minorBytesBig = (minorBytes >> 8) | (minorBytes << 8); int8_t powerByte; [data getBytes:&powerByte range:powerRange]; return @{ @"uuid" : uuid, @"major" : @(majorBytesBig), @"minor" : @(minorBytesBig), @"power" : @(powerByte) }; 

but uuid is DeviceUUID, not ProximityUUID

0
source share

All Articles