Well,
for discovery:
take the BDADDR and put it into the manufacturing data:
- your app can see this manufacturing data and does not have to deal with the iOS "privacy" "feature".
for retrieveConnectedPeripherals:
take the BDADDR and put it into a characteristic:
- manufacturing data is not available for peripherals that are already connected to another app.
for retrievePeripherals:
as BLE connections can only be established after an advertisement packet is received, you can safely
ignore this method. Use scanning and the standard discovery procedures to reconnect to a peripheral
when you don't know the iOS UUID. Will have a similar latency than connecting to a CBPeripheral that
was obtained using retrievePeripherals.
or if you want a clean solution:
let the user re-pair the peripherals with your app. I'm not sure whether the UUID-cache is also wiped when
you perform an OTA upgrade of iOS, and from the user experience perspective, pairing should be a painless
mechanism anyways.
Etan
wrote:
But it seems that CoreBluetooth doesn't allow you to access BDADDR. For some cases, people generate an UUID based on BDADDR and advertise it. I'm not sure this will work for Darren.
On Feb 8, 2013, at 9:55 PM, Etan Kissling < email@hidden> wrote:
Each of your peripherals already has a unique ID, its BDADDR.
wrote:
This would have to be unique to each individually built peripheral.
I'm not sure that would be possible.
Maybe you can set an extra UUID characteristic in your peripherals or let it advertise an unique id in Manufacturer Data.
On Feb 8, 2013, at 9:20 PM, Darren Jones < email@hidden> wrote:
Thanks Andras,
What would be the best method to remember a peripheral?
In my case, I want to use a custom pairing method, so my app will only connect to peripherals that have been set up with that phone, and ignore others.
I have this working currently by remembering the UUID or each peripheral, however this is no good if they can change.
Thanks
Surely yes! If the BT stack is reset, new UUIDs are generated. You should use the UUID as an opaque value. It should not have any meanining to your application and your app should always check the response of the system with operations that are
concerned with UUIDs.
Regards,
Andras
_______________________________________________
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
_______________________________________________
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
|