Author Topic: USB and the iPhone 6  (Read 12304 times)

sfuller94

  • Member
  • ***
  • Posts: 2
USB and the iPhone 6
« on: February 13, 2015, 08:52:35 am »
Jan,

I've bought your embedded systems book and hope to dig in soon. We're going to be developing a USB interface to monitor a few analog data points on a control system and would like to use a Microchip uController connected to either an iPad or iPad. Our app will work with either.

 We're licensed iPhone app developers and are registered through the MFi program. Thus, I have the information on how the app can gain access to connected devices. Now it's time to 'connect' the device. Seems it's the easiest to have the iPhone/iPad as the host and the embedded system as the device.

Any thoughts/tips/tricks? Have you connected to any Apple products before? It seems to be very specialized knowledge and for some reason, NOBODY is talking about it which has me worried that we've bitten off more than we can chew.

This topic would make for a great 'next' book! I can't seem to find any example systems anywhere so I'm starting from scratch.

We'll be using standard USB 2.0 Full Speed as our standard. Any tips or help would be greatly appreciated.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: USB and the iPhone 6
« Reply #1 on: February 13, 2015, 10:26:28 am »
You've probably seen this:

https://developer.apple.com/library/ios/featuredarticles/ExternalAccessoryPT/Introduction/Introduction.html

I'm hoping Barry will chime in with some further wisdom.

sfuller94

  • Member
  • ***
  • Posts: 2
Re: USB and the iPhone 6
« Reply #2 on: February 13, 2015, 10:39:07 am »
Hey Jan,

Yes, we're G2G from the App Side (EAAccessory Framework).  But, I'm now having to write the interface on the device side (uController).  I've never had to do that, but am familiar with Microchip devices.  I took the tutorials in your book, but it's been a while.

The part that is a bit unknown for me, is getting the device to enumerate with the phone.  Our intent is to have the phone as the Host and the uController as the device.  For the App side, once the device is successfully enumerated (finds an acceptable protocol) then it will appear in an array within the EAAccessory Manager.  It's easy enough to search the array and open a session to begin comm.  That's all fairly straightforward.  

Also, I've not authenticated to an Apple device via the lightening plug.  Seems we'll all probably learn a lot!

I did read a few posts in the forum regarding CDC and mimicking an AT device.  My thoughts at this point is to create a CDC type connection.

Thanks!
Seth
  
« Last Edit: February 13, 2015, 01:54:43 pm by sfuller94 »

Barry Twycross

  • Frequent Contributor
  • ****
  • Posts: 263
Re: USB and the iPhone 6
« Reply #3 on: February 14, 2015, 02:15:16 am »
I'm hoping Barry will chime in with some further wisdom.
I don't have much to add. I never developed an MFI device. Getting the MFI documentation would be my suggestion which you already have.

Is there an NDA associated with the interfaces? I thought developers weren't supposed to talk about it, so no discussion.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: USB and the iPhone 6
« Reply #4 on: February 14, 2015, 03:33:16 pm »
The key to successful enumeration is to have descriptors that contain the information the host system needs to identify the driver to assign to the device. Hopefully your documentation can help you with that.