Finally!! – The iPhone is allowed to control serial devices!

First a bit of history

It’s no secret that Apple keeps a tight reign on what they allow developers to do with their hardware.  I don’t necessarily disagree with this.  But it can be annoying when you want to do something special – like use the computing power of an iPod Touch as the brain for a robot.  Because that requires some way to interface the iHardware with all the robot sensors and motor controllers.  But my understanding when iOS4 came out was that you could communicate with outside devices via the 30-pin dock connector.  Yeah, not exactly.

When I decided to jump in to this new hobby and custom build a full size replica R2D2, I immediately wanted to control the droid with hardware and software that is in my comfort zone.  The iDevice is small, fast, relatively cheap ($300), lightweight, has a great battery which should be able to last all day, can be quickly recharged or charged while in use by a conversion of the 24 volts on board, has built-in sensors like accelerometers, can play sounds, etc, and probably the most important reason to me, I already know how to code for it.  To me this was a slam dunk.

So I researched it and found that there is indeed an iOS framework to communicate to serial devices over the 30-pin.  But there was a major roadblock.  To do it you have to develop an “accessory”, and more importantly to gain access to the dock connector details, you have to join the MFi program and they’ll only allow REAL accessory companies to join.  How it works is that there is a chip in the cable that has a secret ID.  And in software you need that secret code, and the framework will only communicate with your device if you know that secret.  There are no generic cables.  And making a custom cable is expensive and the minimum order in like 20 or 30,000.  Oh and it requires an apple acceptance of your particular accessory and the application (use) for that connection.  Hobbyists were not going to be allowed to join.

There were two options.  First was that some resourceful people had made a custom cable that patches in to the serial port that is in every 30-pin dock connector.…rial-port.html

Problem is that this solution requires a jailbreak – which I just don’t do.  So that was (mostly) out.  And another problem is that it might be dangerous, cause you could blow the device.  So again.. it’s out for me.

Second option was the SkyWire cable, which is an iPhone to serial adaptor/cable that is specifically made to control telescopes.  The cable is made by Redpark, and I contacted them to see if that cable would work for my application:…es_ios_devices

The simple answer is no.  The problem is the secret code.  To use the SkyWire cable in my app I’d need to know the id.  I think I could figure it out with a little simple hacking.  There is a standard format for the id’s – so it would be easy to guess.  But if I’m going to share my solution with the rest of the club I’d have to disclose the code, and I can’t do that.  So that solution was out.

Back then I had a very nice talk with the makers of the SkyWire cable, Redpark.  They are the ones who explained all of these limitations to me.  But they were sympathetic to what I wanted to do.

The fix

Tonight I got an email from Redpark:

Hello Michael,

Apple policy has evolved — allowing us to release a new Redpark Serial Cable with SDK.   You may find this cable to be useful.Take a look at the Products section of our website (

So now they sell an open cable and have an SDK to go with it:

Looking at the FAQ you learn that we still can’t develop apps that use this cable and sell them in the app store.  But this isn’t what I want to do anyway.  I just want to develop software for my own use and to share with a couple of other people in the builder’s club. And now this can be done without jailbreaking and without hacking the SkyWire cable. So I’m excited about this news.

The cable can be purchased here:


One of my friends asked me today (paraphrasing), “If you can’t sell the app in the store, how is it any use for anyone else in your club?”  Here was my response:

Personally, I’m not interested in selling these apps on the app store.  I actually couldn’t for several reasons, one being that I intend to use trademarked images in the app, like pictures of R2D2 and copywritten sounds.  Second that it wouldn’t be profitable – not to mention that I’m not allowed to make a profit.  Third is the reason to #2 which is that every implementation would be different and to make an app that works good for every r2d2 would mean too many settings, scripts, etc.  And while the club is like 7k people (signed up) the number of people who would ever use an ipod touch for that would be like single digits.

Also, just because I can’t sell them in the app store does not mean that I can’t distribute them.  I could compile and send out copies ad-hoc.  Apple doesn’t look at those apps or really even know or care what they do.  I can distribute 100 copies of each app, and I could just make a 2nd or 3rd app that does the same thing to get around that.  I can also publish code, which is what I’ll probably do for those who are interested.

It’s still good news that they lifted some of the restrictions.  It’s a first step.

One thought on “Finally!! – The iPhone is allowed to control serial devices!

  1. Hey Michael,
    Thank you very much for your interesting blog! I found it while searching information to external accessories for the iPhone which are connected via the dock connector.
    I am working at one, and like you I found out about the MFI-program. And I don’t have a company as well. So I will have to figure it out on my own.
    I have some questions to your article above.
    I wonder where the difference is between connecting the external accessory via USB like the original apple-cable and the one you use. It is serial as well, so I think it is similar to USB?
    Is it because of the secret code you mentioned above? But there are examples where a USB cable is used:
    Maybe this needs a jailbreak? And I think the way, peertalk uses is not the one apple wants to be used, so if the accessory should be accepted by apple this way isn’t possible?
    Did you use the External accessory framework for connection in your project?
    Coming to the secret code again… So I guess that every company has its own secret code in their cable so it can communicate only with this device?
    And one last question. You say you can distribute 100 copies of an App, that is not accepted by apple. How could you share these copies? Usually you can only download them via the App-store….
    I’d be very glad about some more information and maybe some help….
    For contact:
    Thank you very much!
    (Sorry for my English…)

Leave a Reply

Your email address will not be published. Required fields are marked *