iphonerfcommmfi

How can I advertise RFCOMM Bluetooth service programmatically with swift/Objective-C? or Connecting through ExternalAccessory Framework


I Need to advertise RFCOMM Bluetooth service programmatically from iPhone, I know that iPhone supports BLE only unless there is membership in MFI program, I have POS Device licensed from iPhone under MFI Program but I can not neither connect nor send/receive from iPhone, I have searched and found that ExternalAccessories could work with RFCOMM bluetooth profile but I don't how !?

I Tried this snippet but unfortunately it returns empty Array

let connectedAccessories = EAAccessoryManager.shared().connectedAccessories

but with no results ! and after connection how can I send/receive data between iPhone and my Point of sale machine ?


Solution

  • I have fixed it through External Accessory Framework, that's the only way to create a bluetooth channel between and iOS Device and MFI Accessory.

    to check if your accessory under MFI Program or not check this URL : https://mfi.apple.com/MFiWeb/getAPS.action