I follow this sample project BeaconEmitter under OSX to generate samples iBeacons for develop an application on iPhone. BeaconEmitter application is based on the tutorial from Matthew Robinson, and until Apple decide to introduce iBeacon support on Core Location for OSX, the only chance to generate a iBeacon is to build the advertisement packet from scratch with IO Bluetooth Framework.
BUT...that doesn't work!
I tried of course also the AirLocate tutorial code from Apple on iOS, and yes between to iOS devices that work fine. But if you try to generate an iBeacon with OSX (BeaconEmitter) and receive it with iOS device (AirLocate) that doesn't work.
I have a BLE RF Sniffer based on CC2540 TI chip, and with TI sniffer software on Windows. So I observe that the iBeacons packet generate from AirLocate and from BeaconEmitter was a little bit different.
That is iBeacon generated with AirLocate:
Thah is ibeacon generated with BeaconEmitter:
Following the reverse engineer made in this post (because Apple have not released iBeacons Specifications yet), is possible to see that Adv PDU Header is different from two cases. In OSX the Type = 2 and TxAdd = 0, in iOS the Type = 0 and TxAdd = 1.
Why this difference ?
In witch way is possible to force the OSX to send the same Adv PDU Header of iOS ?
Seems that also in the first 5 bytes of the AdvData the two packets aren't equals:
OSX: 02 01 06 1A FF
iOS: 02 01 1A 1A FF
The rest of AdvData payload is according with the reverse engineer post linked above.
Again, why this bytes are different ?
I not found from what part of code in the OSX sample this depend on.
UPDATE: IT WORKS
The major reason because the iBeacon generated from BeaconEmitter was not recognized by AirLocate is a my fault. I not understood that AirLocate filters some specific example of UUID i.e.: E2C56DB5-DFFB-48D2-B060-D0F5A71096E0 or 5A4BCFCE-174E-4BAC-A814-092E77F6B7E5 or 74278BDA-B644-4520-8F0C-720EAF059935 not every UUID value.
So the random UUID generated from BeaconEmitter for sure not match with pre-written UUID in AirLocate.
If you can "force" the UUID from BeaconEmitter with a good value, the AirLocate can recognize it:
So this is the successful test in iOS AirLocate sample app:
Remains the differences of the same bytes described above... that only the sniffer can see :).