Bluetooth reconnect from MFI EAAccessory does not raise EAAccessoryDidConnectNotification?

Problem: How can an app discover a previouly paired external accessory that has reconnected to the iOS device?


Everything works fine if Bluetooth Classic connections are initiated by user from iOS device iOS Settings > Bluetooth.


However, when accessory initiates the connection, my app does NOT receive a EAAccessoryDidConnectNotification even though "Connected" is displayed in iOS > Settings > Bluetooth ?



Steps to Reproduce:

  1. Set breakpoint in handlers for EAAccessoryDidConnectNotification and EAAccessoryDidDisconnectNotification in EADemo app
  2. Power-off external accessory to close Bluetooth connection, or disconnect from iOS Settings.
  3. Verify Device displays "Not Connected" in iOS > Settings > Bluetooth
  4. Power-on external accessory and connect to iOS device from the external accessory ( Not from iOS ).
  5. Verify Device displays "Connected" in iOS > Settings > Bluetooth
  6. Breakpoint is never hit in EAAccessoryDidConnectNotification


It seems like the EADemo app can only receive EAAccessoryDidConnectNotification when connection is initiated from the iOS device side rather than the accessory.


Is it possible to make this work?


My goal is for app to reconnect, without user interaction, when the accessory disconnects then reconnects from the accesory.


I am following Apple's EADemo Sample Code :

  • Using Silicon Labs BlueGiga WT41u Bluetooth classic module in my MFI device.
  • Added com.mycompany.mydevice to UISupportedExternalAccessoryProtocols in Info.plist
  • I have called EAAccessoryManager registerForLocalNotifications
  • EAAccessoryDidConnectNotification works fine if connection is made using iOS > Settings > Bluetooth from the device but NOT from the accessory.


My Stack Overflow questionn:

Reconnect from Bluetooth MFI EAAccessory does not raise EAAccessoryDidConnectNotification?


Thanks in advance,


-Ed

Replies

Sorry if I missed it - is the accessory yours?