Thanks, although it appears that every time I restart my central app and reach didConnectPeripheral, the peripheral UUID is different...even without restarting my iPhone-running-as-peripheral app, and with just a few seconds elapsed time. So I'm still not convinced that the peripheral's UUID I'm seeing at the central is an actual UUID from the peripheral, and not some "made-up" UUID that is generated by the central. I don't have a HW peripheral working right now that I can test this properly with...
Apple guys: This is cumbersome behaviour. Regardless of how/why the UUID keeps changing, this makes for a terrible testing platform for writing a central app and testing it with an iOS device+app that simulates the peripheral. This is supposed to be a key usecase for CBPeripheralManager, CBMutableService, CBMutableCharacteristic. But if UUIDs are always changing, this fouls-up testcases in which I'm recognizing either a new or a familiar device, and posting some of the characteristic data along with the device UUID as a database key, along with a user identity.
Is there another unique (and static) identifier for BT peripherals that I can access in CB classes?
- John
On Feb 16, 2013, at 3:54 PM, Darren Jones wrote: I believe using the iPhone as a Peripheral it will change its UUID every 5 minutes.
Using a hardware peripheral device will have a static UUID
Sent from my iPhone 5 (I researched a couple other treads but didn't get much of an answer on this issue)
In didDiscoverPeripheral: I have been counting on property CBPeripheral::UUID to uniquely identify a peripheral (and CBPeripheral::name to provide some accompanying description). This corresponds nicely with info from a BTLE text I have. But this isn't what I see -- ::name is nil, and ::UUID is different each time I discover the peripheral device.
For now, most of my testing has been iPhone4S (central) to iPhone4S (peripheral), with an app I've written for each.
What should I be doing to get either a fixed UUID (never-ever changing, or a HW address is OK) and descriptive name from a peripheral? Let's assume still iPhone-to-iPhone and yes, if the CB classes can't do what I'm asking on either side, please let me know :)
Regards, - John
Do not post admin requests to the list. They will be ignored.
Bluetooth-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
|