Re: Can I keep CBService and CBCharacteristics around?
Re: Can I keep CBService and CBCharacteristics around?
- Subject: Re: Can I keep CBService and CBCharacteristics around?
- From: Etan Kissling <email@hidden>
- Date: Tue, 12 Mar 2013 10:24:28 +0000
- Thread-topic: Can I keep CBService and CBCharacteristics around?
Rick,
services and characteristics have to be re-discovered after every connect if the link is not encrypted.
If encryption is active, you may find cached services / characteristics in the peripheral's services and
their characteristics. Not sure about it, as I did not test that.
The peripheral object itself can only be reused if you still have the same CBCentralManager instance.
If you create a new one, you can pass the UUID to retrievePeripherals in order to get a new CBPeripheral
instance. Note that this does only work for devices that were previously connected and, therefore, have
a UUID.
Etan
On 12.03.2013, at 07:49, Rick Mann <email@hidden> wrote:
> If I've scanned for my peripherals, connected, enumerated the services and characteristics, can I keep those objects around for later reads? What happens if the peripheral disconnects and reconnects?
>
> --
> 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
_______________________________________________
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