1
votes

We are developing an app which needs to scan for beacons in the background. This requires us for iOS to specify a service UUID while scanning. See Apple documentation:

Apps that have specified the bluetooth-central background mode are allowed to scan while in the background. That said, they must explicitly scan for one or more services by specifying them in the serviceUUIDs parameter. The CBCentralManagerOptionShowPowerAlertKey scan option is ignored while scanning in the background.

We are using a Raspberry Pi with a bluetooth adapter to send a beacon signal (conforming the AltBeacon spec). Unfortunately we are not able to find out how the service UUID should be set in the BLE Advertising PDU, is it part of the Bluetooth specification or part of the Manufacturer specific data structure? We did find examples for setting the service UUID for when you use an iOS device as beacon, but since we are using a generic bluetooth adapter we cannot use that. Could anyone clarify us how and where the service UUID should be set in the beacon transmission?

1
Do you mean the where the UUID is in the iBeacon frame format or how to select a UUID? - Paulw11
I meant where to put the UUID in the iBeacon or (preferable) AltBeacon format, I've updated the question to make that more clear. - Hugo
The first hit on Google for "altbeacon format" - github.com/AltBeacon/spec. iOS can't detect altBeacon in the background though, so you will need to advertise iBeacon format for that - Paulw11
We are using CoreBluetooth for scanning the beacon, I was under the impression that CoreBluetooth will detect all beacons expect for iBeacons. I've updated the question again to make this more clear. Thank you again for your comment, I think the question is getting better and more clear this way. - Hugo

1 Answers

0
votes

is it part of the Bluetooth specification or part of the Manufacturer specific data structure?

the later.

generally when you setting the advertising parameters, you can set the UUID(or name, tx power, etc) to it.