2

How to communicate with MFI Accessory communicate via USB?

Here's what I've got.

  1. My MFI accessory, other company's MFI accessory and protocol names enter image description here

  2. EADemo(An Apple official Accessory Demo)

Here's what I've done.

  1. add protocol name toSupported external accessory protocols in EADemo-Info.plist of the EADemo.

  2. Run EADemo with other accessory, send data, text of receivedBytesLabel keep changing.

When I run EADemo with my accessory, click send data, nothing changes in UI.

My colleague(a hardware developer) says I should set interface(like changing a communicate tunnel) after connecting to accessory, so that I can communicate with accessory. But I look up EASession and ExternalAccessory document, I can't find some method that would allow me to change interface. I don't know if it's my problem not setting interface, or it's a problem of the accessory?

How can my App communicate with a MFI accessory?

ronan
  • 1,611
  • 13
  • 20

1 Answers1

2

As nobody has experienced this situation. I'll explain how to communicate with MFI accessory in normal way and what leads to my situation

Usually If you wanna use MFI device, you just need to do the following steps:

  1. Add protocols supported by MFI to Info.plist Supported external accessory protocols.

  2. Connect your MFI accessory to iOS device.

  3. That's it. You can see data change status on screen.

Note: Those procedure are base on Apple official project EADemo, you can download from the official site.

Here's what I've been experienced:

The MFI accessory support 2 protocols, one is for connection event, the other one is data exchange(like my colleague said before, there should be 2 interface). But the manufacture didn't give the specific document. So when I connect one protocol, of course there's no data exchanging. So I connect the first protocol, and step back, connect to the second one. It works, there's data exchange status on screen.

ronan
  • 1,611
  • 13
  • 20
  • You created two EASession objects for one accessory? – John Tracid Aug 04 '15 at 16:42
  • Hi @ronan.. I am in the same situation. I need to access my MFI accessory via USB in my iOS application. Currently i have used EADemo and i can fully access my MFI accessory. Can you help me with this ? – Arun Kumar Munusamy Nov 05 '15 at 09:14
  • Ok. but I didn't get what you're saying. As you've said that you had already get access to the accessory. – ronan Nov 05 '15 at 09:25