Hi Peter,
Good to hear that the issue got resolved.
Thanks, Joakim
On Apr 7, 2012, at 6:41 PM, Peter Skinner wrote: Hi Michael, Joakim,
Thanks for helping to investigate.
I was able to flesh out the problem a little more. There was an issue with my peripheral sending an empty or malformed GAP Device Name value.
When a peripheral is discovered, CBPeripheral seems to first take the name from kCBAdvDataLocalName in the advertising data. After the device is connected, that name is replaced with the GAP Device Name value. I can maybe guess what happened in my case: My peripheral's empty or faulty GAP Device Name was used for the user alert, but CBPeripheral was smart enough to check for an empty string, and cleverly returned the kCBAdvDataLocalName instead when asked.
Once corrected on the peripheral's side, the GAP Device Name is now used for user alerts as expected.
Thanks again, Peter
Ten One Design 201-965-0200
On Apr 7, 2012, at 5:44 AM, Michael Kroll wrote: Hello Peter, I can't see this behavior on iOS5.1. When my peripheral disconnects, I can see the peripherals name. Kind Regards/Mit freundlichen GrĂ¼ssen, Dr. Michael Kroll --- On 05.04.2012, at 04:41, Peter Skinner < email@hidden> wrote: Hello,
I'm probably doing something wrong, but I am unable to supply iOS with the peripheral's name to use for alerts shown to the user when the app is in the background. I am using event backgrounding (bluetooth-central is not set for UIBackgroundModes).
For example, on disconnect, the user would see,
The "" accessory disconnected. Open "MyExampleApp" to reconnect.
When I call the name getter of CBPeripheral, the name is returned correctly. In my case, it's "Blue Tiger." Is there somewhere else I need to register the name for iOS to use when alerting the user?
Thanks, Peter Skinner
Ten One Design 201-965-0200
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
|