I'm using core bluetooth with a programmable BLE device (CC2541). I'm trying to scan for peripherals using a specific service like this:
CBUUID* serviceID = [CBUUID UUIDWithString: @"adabfb00-6e7d-4601-bda2-bffaa68956ba"];
[self.manager scanForPeripheralsWithServices:@[serviceID] options:nil];
I'm coming up empty but if I set 'scanForPeripheralsWithServices:' to nil then I get all my BLE devices to come up. So I know the BLE is sending out ads.
Here is what I get when I log advertisementData
from centralManager:didDiscoverPeripheral:advertisementData:RSSI:
AdvData: {
kCBAdvDataChannel = 38;
kCBAdvDataIsConnectable = 1;
kCBAdvDataLocalName = "JhBC_ZDHTMDRNg";
kCBAdvDataTxPowerLevel = 0;
}
I'm expecting kCBAdvDataServiceUUIDs to come up like my other BLE devices but the CC2541 doesn't seem to advertise this value.
kCBAdvDataServiceUUIDs = (
"Unknown (<adabfb00 6e7d4601 bda2bffa a68956ba>)"
);
How do I get CC2541 to advertise the custom UUID?