Re: Immediate disconnect after connection attempts?
Re: Immediate disconnect after connection attempts?
- Subject: Re: Immediate disconnect after connection attempts?
- From: Scott Perry <email@hidden>
- Date: Thu, 30 May 2013 14:32:52 -0700
If conditions are right, destroying all of your CB{Central,Peripheral}Manager objects (after cleaning up the objects they've vended, if any are still connected) and waiting a few seconds before reinstantiating them (empirically: 3 seconds does the trick) will cause the XPC connection between your app and BTServer to be closed.
I've only proven this to work in the situation where a connection attempt has failed (almost immediately) with a call to centralManager:didFailToConnectPeripheral:error:—after the XPC connection has reset, the same device(s) connect without drama. I've only encountered that situation when the peripheral changes its address while it is connected ( rdar://13512198), so you can mitigate the problem by keeping your connections as short as possible. Outside of this circumstance, I've never seen centralManager:didFailToConnectPeripheral:error: get called, though it's not unreasonable to expect that there are other reasons for it to happen.
If that workaround resolves other issues, I'd be interested in hearing more about them.
On May 30, 2013, at 1:41 PM, William Henderson < email@hidden> wrote:
How do your force an XPC connection reset?
-- William Henderson Sent from my iPhone
On Wednesday, May 29, 2013 at 10:50 PM, Scott Perry wrote:
There is one error case that my code detects and in turn fires a workaround that attempts to force an XPC connection reset, as it's the only way to work around the problem. |
_______________________________________________
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