Re: Automatically reestablishing BLE connection when in range
Re: Automatically reestablishing BLE connection when in range
- Subject: Re: Automatically reestablishing BLE connection when in range
- From: Pierre Bouchet <email@hidden>
- Date: Fri, 28 Sep 2012 00:22:16 +0200
My experience with the connectPeripheral request in the background is the same as Andras.
Pierre
2012/9/27 Andras Kovi
<email@hidden>
No. All app threads are suspended in background but you get 10 or so seconds of operation every time a BLE callback happens. After this, the execution will be suspended again.
Someone mentioned that their app was shut down after some time but e.g. my app never experienced that. I can leave it running in the background as long as I want.
What I meant was then you start the connectPeripheral request, it will stay there as long as the app is running (even in background) or cancelPeripheral connection is called somewhere from the app.
I may be mistaken but this is actually my experience.
Andras
On Sep 27, 2012, at 11:26 PM, David Chouinard <
email@hidden> wrote:
Thanks. My understanding is that the OS will eventually shut down background apps that use the "bluetooth-central" background mode. I've read reports that the OS automatically closes those apps typically after 40-60 mins, which is unacceptable for my application.
Is that incorrect? Your comment that there is "no timeout or other things" seems to imply that.
On 2012-09-27, at 5:22 PM, Andras Kovi <
email@hidden> wrote:
Hi,
if your app uses the background mode "bluetooth-central" and you make sure that there is always a CentralManager::connectPeripheral call pending when the peripheral is disconnected, then as soon as the peripheral comes in range, the connection will be reestablished. There is no timeout or other things.
You should check out the introductory WWDC presentation. This is described there in detail.
The only issue I can see with this scheme is when the phone is restarted and the app is not started automatically again. This needs to be done manually, however, I would be interested if there is a way to do it automatically. Something similar to the "robotic OS" BOOT_COMPLETED intent.
Cheers,
Andras
On Sep 27, 2012, at 11:13 PM, David Chouinard <
email@hidden> wrote:
Hi all,
Is is possible to "pair" a Bluetooth BLE device such that they automatically connect when in range? (ie. an iPhone app sets up a connection to the Bluetooth device and from then on, the iPhone automatically reconnects to the device if in range, even if the app hasn't been opened in days and is fully closed).
Once reconnected, the device could either using Event Backgrounding to prompt the user to open the app or otherwise interact with a possibly backgrounded app (as described here:
http://lists.apple.com/archives/bluetooth-dev/2011/Dec/msg00007.html)
Anecdotally, I've used Bluetooth keyboards that automatically reconnect to my laptop when back in range. These are not necessarily BLE devices, is this something that's possible in BLE land?
Could this be possible if the iPhone were the server instead of the device? What if this were done using traditional Bluetooth under the MFI program?
There are number of relevant messages on the archive of this list, but nothing that cleared it up for me. Thank you for your help.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Bluetooth-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
_______________________________________________
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