The iPhone Serial Port Hack
An anonymous reader writes "The iPhone's little known secret, a hidden serial port, is revealed. 'The real benefit in all of this is that there are so many console packages for iPhone in Cydia now that you can have a fully functional computer, as useful as a Linux box, but without carrying around a laptop.'"
Get a Nokia N900 or Android.
i want to know why everytime i plug in my ipad the pc asks what kind of camera it is
I'm reminded of Linksys WRT-54G routers and such.
You might need to do some surface mount soldering to get to the required connections.
Very handy for booting up a Sun server.
This isn't a "secret"... it's been in the iPhone (and iPod for that matter) for quite a long time. This same serial port is how 3rd party docks and cables control the device from the outside: http://www.adriangame.co.uk/ipod-acc-pro.html
The iPhone's little known secret, a hidden serial port, is revealed. 'The real benefit in all of this is that there are so many console packages for iPhone in Cydia now that you can have a fully functional computer, as useful as a Linux box, but without carrying around a laptop.'
Personally I think it would be far more practical and useful to use an iPad. The iPhone screen is just too small for practical use, however in an emergency the iPhone could be quite useful. But for somewhat frequent normal use, I have doubts.
Could have sworn there was more to these computer things then that.
"Have you ever thought about just turning off the TV, sitting down with your kids, and hitting them?"
If you'd like to read the article instead of Computer World's stupid-ass slide show, it's at http://resolvehax.blogspot.com/2010/10/iphone-serial-port.html
So far my definition of a fully functional computer was based on Turing completeness. How is a serial port important for that?
.. of perhaps iOS itself.
Just get a Nokia N900. Nothing hidden there.
"Don't jailbreak your iPhone, that's stupid. You shouldn't have to do anything to run the software you want. Instead, get an Android phone. Yeah you have to root it to run the software you want, but that's totally different".
And yet, you are posting on Slashdot.
Yeah you have to root it to run the software you want, but that's totally different
You're right, it is. Unless you Jailbreak your iPhone, you're stuck with the App store. I can install programs from wherever I want to on an Android phone by selecting an option built into the OS.
Living With a Nerd
Or, I dunno, a small netbook and a USB-to-serial cable. They're hardly massive.
It's not like you don't know in advance when you're going to need a terminal. If you can remember to bring that massive dongle thing along you can remember a netbook.
No sig today...
Please don't use the hardware you purchased and is now yours for non-Apple authorized activities. Apple reserves the right to REMOVE and/or RESTRICT functionality in order to support our business model as we see fit.
Apple
And yes, I'm aware you have to root the phone to install a custom ROM...but you can still install apps from anywhere without having to void your warranty or hacking the phone.
Living With a Nerd
typing router commands using the virtual keyboard and having the console on half of a small screen ? no, thanks ...
as useful as a Linux box
Sure.
What next? They'll discover a hidden parallel port and what? It's supposed to stop world hunger?
1 Earth is warming, 2 It's us, 3 it's royally bad, 4 we need to take action NOW
Woo hoo! Now the iPhone is almost as useful as my 15 year old Palm! Well done, Apple.
lizardb0y
http://www.vintage8bit.com/
<sobbing level="softly">I don't want to go back to carrying gender changes, null modems, 9/15 pin changers as well as worrrying about DCE/DTE and handshaking ..... </sobbing>
I am Slashdot. Are you Slashdot as well?
"There you have it! All parts were acquired from eBay, Ridax and Jaycar."
Steve Jobs: "NOOOOOOOOOOOOOOOOOOO!!!!"
He who knows best knows how little he knows. - Thomas Jefferson
...given that you can buy ipod breakout boards on ebay with the serial connectors clearly marked, it doesn't seem to be a particularly well kept secret.
See http://cgi.ebay.co.uk/Enhanced-Breakout-Board-Ipod-Iphone-Ipad-/370447835814?pt=UK_CE_MP3Access_RL&hash=item56406962a6 for an example.
......I can put the psion5 out to grass.
Functionally this puts the iPhone one step closer to the Nokia N900 (which is a fully functional Linux computer the size of a phone, out of the box, including physical keyboard and memory slot)... Impressive! You're getting there, apple fanboys :)
My time is worth too much to play with hidden features that the manufacturer won't even tell me about, much less support.
And yet, you are posting on Slashdot.
FUCK! I had no clue that /. had hidden features... I am guessing that's where all the good submissions end up?
Hey, come on. This is an apple product. Every time someone manages to do something with one, it is news on slashdot (formerly known as a place with news for nerds).
http://slashdot.org/zoo.pl?op=check&uid=666
http://slashdot.org/my/comments
Alexander Peter Kristopeit bought his basement from his mommy for one dollar.
This serial port has been around forever. All those cars with iPod integration use it for control and data. I've controlled the iPod functionality on every iPod I've had (since 3rd gen) as well as three iPhones using an Atmega controller. I year or so I shared some controller code for Arduino based atmega microconrollers.
Here's how you control your iPhone or iPod music with an Arduino, easy peasy:
Sheldon
* /* Control iPod/iPhones from Arduino
Sheldon Stokes
Jan 3, 2009
Standing on the shoulders of ipodLinux.org
http://ipodlinux.org/wiki/Apple_Accessory_Protocol
This send comands to the iPod as though it were a remote.
These are the simple 2 byte commands that should work on all
Apple iPods and iPhones starting with the 3rd Generation iPod
*********** Commands (array index, command value, command description) **************
0 0x00 Button Release
1 0x01 Play/Pause
2 0x02 Vol+
3 0x04 Vol-
4 0x08 Skip >
5 0x10 Skip
6 0x20 Next Album
7 0x40 Prev Album
8 0x80 Stop
*/
int commandBytes[]={0x00,0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80};
int checkSum;
int playPin = 2;
int stopPin = 3;
int fwdPin = 4;
int backPin = 5;
int playVal, stopVal, fwdVal, backVal;
void setup()
{
Serial.begin(19200);
pinMode(playPin, INPUT);
pinMode(stopPin, INPUT);
pinMode(fwdPin, INPUT);
pinMode(backPin, INPUT);
}
void loop()
{
playVal = digitalRead(playPin); // read play button // read stop button // read fwd button // read back button
stopVal = digitalRead(stopPin);
fwdVal = digitalRead(fwdPin);
backVal = digitalRead(backPin);
if (playVal == LOW) // send play command // send button release // send stop command // send button release // send stop command // send button release // send stop command // send button release
{
sendRequest(commandBytes[1]);
sendRequest(commandBytes[0]);
}
else if (stopVal == LOW)
{
sendRequest(commandBytes[8]);
sendRequest(commandBytes[0]);
}
else if (fwdVal == LOW)
{
sendRequest(commandBytes[4]);
sendRequest(commandBytes[0]);
}
else if (backVal == LOW)
{
sendRequest(commandBytes[5]);
sendRequest(commandBytes[0]);
}
delay(100);
}
void sendRequest(int val) {
checkSum = 0x100 - ((0x03 + 0x02 + val + 0) & 0xFF);
int request[] = {0xFF, 0x55, 0x03, 0x02, 0x00, val, checkSum};
Apple decided to allow devices to use serial over the dock connector in February 2010. Why does the summary list it as a "little known secret"? It's hardly a secret that the dock connector which uses USB communicates via a serial connector. That's what the S stands for in USB, btw.
Here's an article telling about the serial port OK from Apple last February:
http://www.ilounge.com/index.php/news/comments/apple-approves-serial-port-to-dock-connector-design/
Yeah, it's got a serial port, with TTL levels, at its external connector. Big deal.
It's also possible to attach USB devices, which is somewhat more useful today. For example, you can plug a real keyboard into an iPad.
Now you can use your iPhone to program your Arduino.
I still think the iPhone is much more of a hackers platform than any android phone.
It is kind of long but I'm going to recycle a recent comment:
---
What's funny is, iOS jailbroken is actually a nerd's paradise. Much more so than android actually.
On the iPhone, you have a full apt package system, a terminal running bash, OpenSSH/OpenSSL tools, server, client, etc. a full GCC dev environement, etc.
A lot of this stuff is stuff you just don't get on Android at any level. You get a terminal out of the box with android, but what do you get? Busybox. Guh. Want SSH? You get Dropbear. The package system sucks compared to APT. I've never tried getting GCC running on the phone but I don't imagine it is easy, if at all possible.
With the iPhone I really feel like I have a full computer running in my pocket. I asked several android hackers why you are limited with these crappy tools on the phone itself, and they replied it was an embedded device so you get embedded tools. I'm sorry but something with 1-2 cores at >1GHz, a GPU that far outstrips anything on my earlier computers, and 32 gigs of NV storage is -not- an embedded device, I don't care how small it is.
You get all this, PLUS a UI that (only IMO I understand) is far more fluid and nicer to use than Android.
Don't get my wrong I'm not just yelling across the fence. I had a Nexus one for a good few months. I tried hard to like it, but in the end when the i4 came out, I jumped ship like it was on fire.
There is of course, hassle. I don't like to restore from backup so Every time there is a major firmware update I actually wipe my phone clean, then sync all my apps over fresh. But thanks to several tools out there it isn't a total restart.
There is hassle but for me, android has a LONG way to go, especially on the hacker front to be anywhere near the iPhone in terms of UI -AND- geekery.
---
It's easier to fight for one's principles than to live up to them.
That's because APPLE had AT&T disable it, so that Droid wouldn't compete against iPhone.
Anticompetitive bullshit, they should be hearing from the DOJ.
Does this serial port appear on /dev/tty(?) can you run a getty on it ?
But you need a 3G data card in the netbook if you want to just leave it in situ and ssh in to it; the iphone and this box can juat be plugged in and left there -- (for as long as the battery lasts) -- you can be wherever you like.
So your saying you can leave it somewhere running on it's battery for about an hour?
Be seeing you...
More recent ones have anti-tamper (Droid X) or auto-reflash (G2), making it a pain to root.
I honestly think Google is very disingenuous to say Android is open when many currently-selling actual devices are locked tighter than the iPhone.
Perhaps Google is just happy that Android is "open to the carriers".
You want a sure bet for an open system, go with the N900.
Make sure everyone's vote counts: Verified Voting
The iPad uses the same pin outs and has serial port support as well.
Cool hack for an iPhone, but you could do the same thing with an iPad to USB adapter and a USB=>RS232 adapter in a smaller form factor.
Two thumbs up for the hack though. I'm going to have to get a few of those breakout boards, my Sansa e200 has the same connector, just different pin outs.
Love how you classed that right up by adding a smiley.
Did you see the masthead? "News for nerds". This is what we do. This is our recreation. I personally found the article fascinating, even though I don't have an iPhone.
You say your time is worth too much to play with hidden features, but I'll bet it isn't worth too much time to watch a NASCAR race or a football game or a movie, now is it?
Free Martian Whores!
Does that mean now i can hook up an old serial port mouse to my iphone in case i want to get a better click event happening,
or maybe the old serial port printers, they could be useful, do they at least still make cartridges for them though???
On the iPhone, you have a full apt package system, a terminal running bash, OpenSSH/OpenSSL tools, server, client, etc. a full GCC dev environement, etc.
On Android phones, you can install Debian. Not just apt, but a full Debian install with all the usual tools, etc.
On the N900, you don't even need to install Debian. Want to play around? Install the root enabler from the stock application manager, open up the terminal (which is standard) and type in "root". Bam, you have root on a _proper_ GNU/Linux device that you can carry around in your pocket. libc? check. Not to mention, you can easily run a Debian chroot, should you want, or boot into Android.
So a jailbroken A is more open than a B in its original, closed state? Fascinating.
Escher was the first MC and Giger invented the HR department.
Rooting != jailbreaking.
Without root, I can run most apps I desire. I want to FTP out? Just fine. I want to compile zsh and slap it on the memory card, it will work. I want to run a P2P client? Frostwire and others are easily downloadable.
Rooting also doesn't modify the phone much. After I rooted my Droid X, the only files that are different are a su executable and an .apk for the UI frontend to always allow with a curtsy, allow, deny, or always tell an app to get fisted if it wants root. A jailbreak to be usable adds a complete userland, from a shell, to basic UNIX commands, to Debian's packaging mechanism, to gpg, to a graphical front end (Cydia). This is major brain surgery compared to just having a "#" prompt available.
What are the advantages of rooting? Tethering comes to mind first thing, although PDANet is an acceptable substitute in a number of cases. Custom ROMs are another reason. Backups using nandroid for a complete restorable image are good. Backing up apps completely with Titanium Backup is another. Finally, DroidWall is excellent making sure that apps that don't need to phone home do not phone home, especially "crapware" installed on a device.
Jailbreaking is needed if a person wants more than what is available in the App Store. Want an app just for playing Russian Roulette? Have to jailbreak. Want another browser? JB time. Want to see more than just a clock on the lock screen? Fire up Greenpois0n.
So, because so much functionality is gained by jailbreaking compared to "just" a "#" sign when rooting Android, the two processes are quite different.
What I would want, and even if this cost 10-25% more than normal phones, would be a unit with state of the art specs and completely unlocked in every way. I wish Google would come out with an ADP every quarter or two so developers can write and test code on a "modern" phone. When not developing, it would give modders a reference platform to write code on.
I am guessing that's where all the good submissions end up?
There are good submissions on
Trolling is a art,
Erm, I had full debian installed on my Android G1 over a year ago. Look how wrong you are.
Also, jailbroken iphone = horribly unstable. Android with full linux userland = just as stable as normal.
Cool reality distortion field bro.
The iPhone battery would probably die before you got far enough away to need 3G to connect to it.
No sig today...
Dude, it's selling right now from major retailers. Ships today.
I got this after 5 seconds of googling:
Google Shopping
Amazon
Make sure everyone's vote counts: Verified Voting
That is all.
Read the EFF's Fair Use FAQ
Next thing you know and you'll be able to make a phone call on your iPhone.
"To prevent this day from getting any worse, I'll just read ERROR as GOOD THING" 1GJU8xLuDKDxEs4KLf8fAGyptoDsqvEsBT
Tether doesn't even require root or PDANet these days. (Froyo)
-]Phreak Out[-
Very true. However, a number of providers disable it, even on 2.2, so it is up to the user to "fix" that.
No, Jailbroken A is better and more powerful than jailbroken B.
Unjailbroken A is of course much more closed down.
It's easier to fight for one's principles than to live up to them.
Fantastic. So to get a usable device, I have to install a different operating system.
It is cool, nice to be able to do, etc, but not quite the same thing.
It's easier to fight for one's principles than to live up to them.
When you can just buy a bluetooth to serial for 50 bucks.. Even at walmart
---- Booth was a patriot ----
Meh... or you could get a N900 that comes with those tools *ALREADY INCLUDED* in the base OS.
Package manager? Maemo is a modified Debian, and uses Apt.
Shell? Default is Busybox, but the full system is in the repos.
Build toolchain, including GCC? In the repos.
OpenSSH and sshd? In the repos (also dropbear, if you prefer).
Anything that's available as source and compiles on ARM? Go to town. You can even pull directly to the device using Subversion and other mackage managers.
Seriously, arguing over whether iOS or Android is more open is like arguing over whether a Prius or a sports car is better for off-road driving. You're both doing it wrong. Get the right tool for the job.
There's no place I could be, since I've found Serenity...
No way to fix them? Except maybe upgrading the kernel. Which you can compile and flash on the phone itself, should you desire.
I still think the iPhone is much more of a hackers platform than any android phone. It is kind of long but I'm going to recycle a recent comment: --- What's funny is, iOS jailbroken is actually a nerd's paradise. Much more so than android actually. On the iPhone, you have a full apt package system, a terminal running bash, OpenSSH/OpenSSL tools, server, client, etc. a full GCC dev environement, etc. A lot of this stuff is stuff you just don't get on Android at any level. You get a terminal out of the box with android, but what do you get? Busybox. Guh. Want SSH? You get Dropbear. The package system sucks compared to APT. I've never tried getting GCC running on the phone but I don't imagine it is easy, if at all possible. With the iPhone I really feel like I have a full computer running in my pocket. I asked several android hackers why you are limited with these crappy tools on the phone itself, and they replied it was an embedded device so you get embedded tools. I'm sorry but something with 1-2 cores at >1GHz, a GPU that far outstrips anything on my earlier computers, and 32 gigs of NV storage is -not- an embedded device, I don't care how small it is. You get all this, PLUS a UI that (only IMO I understand) is far more fluid and nicer to use than Android. Don't get my wrong I'm not just yelling across the fence. I had a Nexus one for a good few months. I tried hard to like it, but in the end when the i4 came out, I jumped ship like it was on fire. There is of course, hassle. I don't like to restore from backup so Every time there is a major firmware update I actually wipe my phone clean, then sync all my apps over fresh. But thanks to several tools out there it isn't a total restart. There is hassle but for me, android has a LONG way to go, especially on the hacker front to be anywhere near the iPhone in terms of UI -AND- geekery. ---
mod parent up. I've been saying this for so long. With a jailbroken iPhone, you _can_ do more than what you could do with an android phone.
Few people remember when the iPhone serial port was used to hack into a flying saucer and inject a virus into an alien space fleet, saving the Earth. And the President himself led the attack against the mothership. It seems like only yesterday, before these stupid people locked me up in here.
Anyone have any links on all the terminal programs (that work) available for the jailbroken iPhone that this story alludes to? Any free solutions? I thought that was one of the main things jailbreaking the phones was all about...
Light travels faster than sound. This is why some people appear bright until you hear them speak.........
better, your opinion, more powerful... i don't think so, suck on my Samsung Galaxy S thanks :)
This is all petty anyway, "oh, my phone can be used like a full computer" "yeah, but mine can too... but better because it has an I infront of the name" "but mines better because google made it" "mine has prettier colours" "mines 3 inches longer and made out of metal" " mine shoots lazer beems!"
both the iOS and Android are incredible when you consider where smart phones were 5 years ago, the differences are so minor and mostly based on taste. if you say "my phones better because it can do this" your wrong, because chances are the other can as well in some form or another.
Sure just run openssh on your galaxy.
Fire up gcc and compile something.
Use anything in your terminal other than busybox.
Nope to do that you have to root your phone and install another operating system.
It's easier to fight for one's principles than to live up to them.
The breakout board is clearly labeled with the typical serial line designations. This project adds a standard level shifter, something described countless times for other devices.
What is interesting is the description of what access the serial port gives you, which is a lot.
Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
Yea, except most people don't go off-roading, they just want a car that will get them to the store and work on a daily basis. In that case, both the Prius and the Civic (I presume this is the android sports car you're talking about) will do just fine for most people.
Persistent Volume manager for Kubernetes - https://github.com/dwimsey/openshift-pvmanager
No 3G, clunky UI, clunky device, etc.
With the iPhone I get the hacker stuff AND the nice stuff. That's the whole point.
With the Android you sacrifice UI -AND- nerdyness.
With the N900 you get quite a bit more nerd goodness, but much worse UI/device, at least in my eyes.
I considered the N900 quite a bit though.
It's easier to fight for one's principles than to live up to them.
N900 has 3G if you use a provider that uses the standard 3G bands. AT&T's refusal to interoperate with the rest of the world is hardly Nokia's fault; they build the device for the world market. 3G on T-Mobile works fine.
I'll grant you that the UI is clunkier. I would claim it is also more powerful, and for a true Linux device the presence of a physical keyboard is also a huge boon, but it is undeniably a less polished experience.
The specs of the device itself could be better too, although they do just fine for most things. I've watch YouTube directly from the browser and played Flash games, with no problems except for an increased drain on the battery.
There's no place I could be, since I've found Serenity...
Actually you're blaming the wrong person.
:D Whoever it to blame it means no 3G for me.
:D
In North America, including here in Candada, the "standard" 3g frequencies are what ATT/Rogers/Telus/Bell etc use.
There is also an AWS band which T-Mobile and Wind Mobile here in Canada use, but their coverage is spotty outside of major metro areas and you end up frequently roaming.
So blame the FCC
It is certainly more powerful, but I'm a UI snob. Even the lower fps of android phones I just couldn't do.
I could care less about flash and wish it would disappear from the desktop too
Like I said, I really considered it. A mobile device running a desktopish linux was appealing, but the UI won me over, considering the similar functionality.
It's easier to fight for one's principles than to live up to them.
There is of course, hassle. I don't like to restore from backup so Every time there is a major firmware update I actually wipe my phone clean, then sync all my apps over fresh. But thanks to several tools out there it isn't a total restart.
out of interest, is there some jailbreak app that will let you back up your iOS app save data? on of the things that's always shitted me was the way there's no way to back up an individual app's data, and that if you remove an app from your device there's no way to save it's user data and use it later when you reinstall the app
TIAEAE!
Also, jailbroken iphone = horribly unstable
I dunno what deluded andriod fanboy echo chamber you're pulling that info from, but it's certainly not from actual experience. I've run my iphone both jailbroken and with stock firmware at various times and the stability has been consistently flawless either way
TIAEAE!
Fantastic. So to get a usable device, I have to install a different operating system.
If you want to get something that works like a standard Unix system, you probably want to install Debian in a chroot, yes. While you could install your development tools directly on the main Android OS image, doing so has no advantages and carries a much larger risk of breaking stuff. This isn't a dual-boot system: the Android OS, UI and all the standard functionality is still available when you're running stuff on the Debian install.
The main reason that all the iPhone stuff is installed straight on top of the main OS is because it has to be. The tools aren't available to set up a chroot environment, and I seem to recall chroot itself may be broken.