Re: Question about including services
Re: Question about including services
- Subject: Re: Question about including services
- From: Rick Mann <email@hidden>
- Date: Tue, 12 Mar 2013 00:28:38 -0700
On Mar 12, 2013, at 00:06 , Andras Kovi <email@hidden> wrote:
> My first question is why would you want to replicate the Device Name characteristic? This is handled by iOS for you, you can set it at the
That's true, you do. And in fact, I use that. But I'm asking more generally. If I include one service in another, can I do a single enumeration of the characteristics in that top-level service?
> start of advertisement. Additionally, you'll get this error for service 0x1800:
>
> Service add failed: Error Domain=CBErrorDomain Code=8 "The specified UUID is not allowed for this operation." UserInfo=0x1d5b3b80 {NSLocalizedDescription=The specified UUID is not allowed for this operation.}
Hmm. I do a discoverServices with CBUUIDGenericAccessProfileString as one of the UUIDs. I don't get that error.
> You should either use the built in Device Name or your should create your own app specific definition for it. (Though that value will not be published in the advertisement packets.)
>
> Unfortunately, there is no shortcut to access the characteristics. You must do the discovery first.
Okay, thanks! Can you tell me if those objects survive a disconnect-reconnect? Can I re-use them? I've already verified they don't work if I'm not connected, so my suspicion is that I'll have to re-discover them.
If that's the case, it seems the only safe way to re-read a characteristic is to completely re-discover it, at least, if you find that the peripheral disconnected since the last time you did discovery.
--
Rick
_______________________________________________
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