Thanks Etan, David, William. Your responses are very helpful.
Etan, I'm trying to learn more about UI-less YesNo pairing but can't find discussion of it in the Core Bluetooth documentation. Can you provide a pointer? In my case, the peripheral is an iOS device so how would it indicate itself as a display/button-less device?
If this can be made to work, would I be right to assume that such a peripheral would be spoofable? I.e. without encryption one can see how the pairing works and mimic it with a different device.
Regarding the identifier changing every 15 minutes, from my logs:
2013-11-19 21:24:55.005 CardsMac[40233:303] Discovered peripheral NameTag (<CBPeripheral: 0x6080000ad800 identifier = F3C38468-F250-4067-BACB-37A7D8DEF71A, Name = "NameTag", state = disconnected>) with RSSI -44 and advertisementData {
kCBAdvDataLocalName = NameTag;
kCBAdvDataServiceUUIDs = (
"Unknown (<0f4266cc 6ec44798 9fe087b3 5b7e8d1c>)"
);
}
<... intervening connect/cancelPeripheralConnection and stop/startScans removed ...>
2013-11-19 21:39:34.617 CardsMac[40233:303] Discovered peripheral NameTag (<CBPeripheral: 0x6180000aed00 identifier = B2E8A6AB-C9AC-4FA3-A35E-63FC92B3189B, Name = "NameTag", state = disconnected>) with RSSI -50 and advertisementData {
kCBAdvDataLocalName = NameTag;
kCBAdvDataServiceUUIDs = (
"Unknown (<0f4266cc 6ec44798 9fe087b3 5b7e8d1c>)"
);
}
Another thing I'm looking into is that when this rediscovery happens and I attempt to connect to the 'new' peripheral (note that I am not maintaining a connection to the original CBPeripheral), my connection attempt hangs, i.e. no did*Connect callbacks are received. I'll have to figure that out for any of the connection-dependent solutions to this problem to be viable.