iOS connect/reconnect to Bluetooth device when using external-accessory and MFi
Asked Answered
S

1

9

my question is to those who has experience with MFi and external-accessory framework.

If I work with external Bluetooth accessory, is there any way to issue connect request to a remote device? I mean programmatically, without user involvement. If Bluetooth link loss happens, who initiates reconnection - iOS device or external accessory?

The info that I was able to get is that:

1) First connection (together with pairing) is made by iOS device from Bluetooth settings screen. Atter this step devices will be paired and will remember each other.

2) Then it is external accessory who should make connection requests. From iOS side the only way is to manually connect device from Settings, there's no way to do it in program. (Well, there's showBluetoothAccessoryPickerWithNameFilter method in EAAccessoryManager, but it needs user involvement and AFAIK it has some issues and doesn't work as expected)

3) If Bluetooth link loss happens, it is external accessory who should try to reconnect back. iOS will not attempt to reconnect back.

Is my understanding correct? Thanks in advance.

Subservient answered 13/8, 2013 at 9:20 Comment(0)
S
4

Most of the information you are asking for is available on the Apple MFi Website. Most questions cannot be answered because we have to sign an NDA.

However i can tell you that once you pair your device with an Apple MFI Bluetooth module, it is up to the Bluetooth Module to keep the connection alive, if you switch your device off and back on the bluetooth module initialises the connection,

If you have a loss of connection the module will reconnect. Once connected you can then open the SSP connection from the EAAccessory Framework.

Jamie

Soninlaw answered 22/8, 2013 at 9:36 Comment(4)
Jamie, thank you for the answer. But what do mean by "MFI Bluetooth module" - is it iOS or accessory side?Subservient
The MFI Bluetooth Module is Accessory Side and is a variant of the Roving Networks RN41 / RN42 Bluetooth Module.Soninlaw
We have the same problem with our BT device (using MFi chip). Pairing and manually connecting works. Once the iPhone and device get too far apart, the connection is closed, of course. But if they get in each other's reach again, they do not reconnect. The only way to connect again is to go into the iOS System Prefs and choose the device again to connect to it. Are you saying that this is not normal, and that both should automatically reconnect? Since the EA API does not seem to have anything for this, I assume the BT chip on our device (not the MFi chip) is misbehaving?Consternation
My iOS app can connect to my Bluetooth classic MFI accessory. The accessory can disconnect and reconnect from the accessory end. I can see the iOS settings Bluetooth device state change back to connected from the iOS side without any action on my part. My problem is my app cannot see the MFI app has reconnected. I do not receive EAAccessoryDidConnectNotification even though EAAccessoryManager has called registerForLocalNotifications??Edmanda

© 2022 - 2024 — McMap. All rights reserved.