iPhone telemetry: a short tutorial


Hello everyone,


After experimenting with tuning the APM, a friend (Roel Offermans) and I decided to implement telemetry. Even though it may seem counterintuitive to use a phone rather than an Xbee, when you already have the phone it saves some money. Another advantage is that it has 'unlimited' range, as long as you have network coverage.

The logical choice of phone to use was the iPhone, since the 30-pin dock connector has a built-in 3.3V serial port.


What you need:

A 5V - 3.3 V level-converter. (or some resistors, google RS232 level converter)

A male dock connector (we used a cheap iPhone dock)

A jailbroken iPhone



How to:

Most of this is already outlined on other websites for the normal Arduino, but since we had a lot of confusion about some key parts, I'll put it here again with a more elaborate how to. This tutorial was tested on iOS 4.3.1, but 


Hardware steps:


iPod pin:

Pin 1 :GND

Pin 12 : Serial Tx

Pin 13: Serial Rx

Pin 18: 3.3 V

Notice: we didn't use the serial ground (pin 11) as it caused some problems, using pin 1 worked fine for us.



In case you're using resistors to make your own 5v-to-3.3v level-converter, you should connect pin 12 to the APM shield telemetry port labeled "IN". Pin 13 is connected to "OUT" while GND and 3.3V are connected to their respective ports.


When using the Sparkfun level converter, it should be connected as follows:

iPhone level converter LV level converter HV APM Oilpan (telemetry port)

Pin 1 -> GND GND -> GND

Pin 12 -> LV HV -> +5V

Pin 13 -> RXO RXI -> OUT

Pin 18 -> TXI TXO -> IN



Software steps:

Step 1:

For those of you who aren't familiar with the iPhone, the standard SDK doesn't allow access to the serial port, which is why we need a jailbroken iPhone. Most jailbreaks automatically install a secondary appstore called Cydia, where you can find a program to interface with the serial port.

Make sure you set Cydia to hacker mode, otherwise Minicom won't show up. (Very important!)

Now install minicom from the Bigboss repository, which is available by default.


Step 2:

Install the OpenSSH application on your iPhone from Cydia. This will allow you to connect to your iPhone remotely and read the serial port. 

Once you've installed OpenSSH you can use the Terminal from Mac/Linux or an ssh program (like putty) on Windows .


Step 3:

Connect to your iPhone as root via SSH. On the Mac/Linux you can do this by typing "ssh root@your-device-ip" in terminal. Accept the key by typing "yes". The default password is "alpine".

Make a new folder  /usr/etc, this is to store your Minicom config file. Do this by typing:

"cd /"

"cd usr"

"mkdir etc"


Step 4:

Type "minicom -s" to set up the serial port. Change the serial port to "/dev/tty.iap" and the baud rate to your telemetry baud rate. The standard is 57600.

Exit from the setup menu.


Step 5: 

Type "minicom -w" at the prompt to start minicom with line ending. You'll now receive a lot of gibberish if you don't set the telemetry protocol to human-readable.

3689401995?profile=originalAs you can see we do receive some sensible words, but the MAVlink protocol probably messes things up.


The next thing to do is to get the MAVlink GCS working, which shouldn't be too difficult by echoing the data you receive back over localhost, but we haven't figured it out yet.


E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones


  • @FabienBruning

    It works fine on my iPhone 4 ,4.2.1 and very likely 4.3.1. But by default you cannot get minicom but mobile terminal is include in the default "your Cydia repo". Everything works fine just one note not shown on the website I links to is that you will need to login in mobile terminal (just type login>user:root>pass:alpine) then you can run minicom.
  • There are some Android phones that also have a serial port, I believe they're Google deveoper phones you can buy. The chances of a random HTC/Samsung having one are quite low though.


    @mquintilian: Good link on the source, which iOS version are you using? Mobile terminal doesn't work on the iPhone 4 and I believe any iOS4.x, but Minicom is in the repo by default.


  • I've been working on this for a while now, You can download Minicom so you dont need to ssh to open the serial by doing this. By default you cant find minicom in cydia but you can get it by following these instructions.

    1. Download and install Mobile terminal from cydia (a quick search should do it)

    2. add repo http://nakedproductions.us/source/ (manage>Sources>edit>add)

    3. open the naked productions repo and download and install minicom

    you can now follow the steps on http://www.ohscope.com/2009/02/24/serial-port-on-iphone-with-minicom/ start from step 2

  • Very cool! Fabien, do you have any ideas how to do the same on Android?
  • I'd be a little scared sending an iPhone up in the air. It's a fantastic idea though and great tutorial.
  • I tried samething with my nokia 5800 but didnt work it all(symbian os sux) :)
    Nice job !
  • Great Job!
This reply was deleted.