Re: Reusing CBPeripheral across multiple re-connections
Re: Reusing CBPeripheral across multiple re-connections
- Subject: Re: Reusing CBPeripheral across multiple re-connections
- From: William Henderson <email@hidden>
- Date: Thu, 12 Dec 2013 09:49:49 -0800
You should be fine re-using CBPeripheral objects. I’d be defensive about it, though – if the connection attempt times out more than a couple times, then fall back on scanning/retrieving the peripheral. We use this strategy more or less for our app.
-- William Sent from my iPhone
On December 11, 2013 at 5:56:34 PM, Anthony Stevens (email@hidden) wrote:
To clarify that statement, William.
The iOS device is connecting to our own hardware module which
contains a TI BLE chip. That module is acting as the
peripheral.
On Dec 6, 2013, at 5:00 PM, William Henderson < email@hidden>
wrote:
Is
your device an iOS device running in peripheral mode or another of
hardware?
William
On December 6, 2013 at 4:56:24 PM,
Anthony Stevens (email@hidden)
wrote:
Hi,
We've seen two different approaches to re-connecting to peripheral
once a connection is lost (e.g. our device moved too far from the
iTouch/iPhone).
1. Scan before each reconnect to obtain a CBPeripheral. Connect
using this new CBPeripheral.
2. Scan just once to obtain a CBPeripheral and reuse that
peripheral for each subsequent reconnection.
We are opting for scenario 2 but wanted to hear what others are
doing. It seems to work fine for us so far…even when placed into
the background. Why rescan if we don't need to.
Is this the same approach the majority of you are taking?
Thanks
Anthony
_______________________________________________
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