×

Announcing: Slashdot Deals - Explore geek apps, games, gadgets and more. (what is this?)

Thank you!

We are sorry to see you leave - Beta is different and we value the time you took to try it out. Before you decide to go, please take a look at some value-adds for Beta and learn more about it. Thank you for reading Slashdot, and for making the site better!

The iPhone Serial Port Hack

CmdrTaco posted more than 4 years ago | from the totally-top-secret dept.

Handhelds 217

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.'"

Sorry! There are no comments related to the filter you selected.

No, thank you (-1, Flamebait)

Anonymous Coward | more than 4 years ago | (#34052662)

My time is worth too much to play with hidden features that the manufacturer won't even tell me about, much less support.

Re:No, thank you (4, Insightful)

radarsat1 (786772) | more than 4 years ago | (#34052858)

And yet, you are posting on Slashdot.

Re:No, thank you (2, Funny)

Anonymous Coward | more than 4 years ago | (#34053292)

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?

Re:No, thank you (2, Informative)

mcgrew (92797) | more than 4 years ago | (#34054188)

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?

If u want linux in your smartphone (5, Insightful)

Anonymous Coward | more than 4 years ago | (#34052666)

Get a Nokia N900 or Android.

Re:If u want linux in your smartphone (1, Flamebait)

countSudoku() (1047544) | more than 4 years ago | (#34052730)

Get a Nokia N900 or Android.

Sound advice, AC! I'm boggled by the fact that 1) they have to HIDE it, and 2) that we have to HACK to get to it, and 3) that crApple will disable it now that it's found, and 4) I don't already have an Android phone... :)

Re:If u want linux in your smartphone (1)

H310iSe (249662) | more than 4 years ago | (#34053038)

exactly, this differs from what you can do with a new moto (or other snapdragon) phone... how? I mean, maybe I miss something

Re:If u want linux in your smartphone (0, Flamebait)

Dog-Cow (21281) | more than 4 years ago | (#34053214)

Your purposeful ignorance and your sig are perfectly complementary. Of course, your mind may not be closed; it might just be absent.

Re:If u want linux in your smartphone (1)

gmuslera (3436) | more than 4 years ago | (#34053888)

Is not just the hardware, but what your OS enable to do with it.

Be careful which Android phone you get (4, Informative)

rsborg (111459) | more than 4 years ago | (#34053998)

More recent ones have anti-tamper (Droid X [androidpolice.com] ) or auto-reflash (G2 [maximumpc.com] ), 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.

Re:Be careful which Android phone you get (1, Interesting)

Anonymous Coward | more than 4 years ago | (#34054506)

The G2 does not reflash. It just currently reports that something is written when it isn't. It's the same old S-OFF that they've had in the past. I repeat, the G2 does not auto-reflash itself.

Re:If u want linux in your smartphone (1)

Gizzmonic (412910) | more than 4 years ago | (#34054622)

How about an HP Pre? You can root the device with the manufacturers' blessing-even play NES games or hack it so you can use the Wifi to share your 3G signal.

WebOS is real Linux with real multitasking and a better interface than iPhone (especially the contacts) and yet it seems like most geeks ignore it.

ipad (3, Funny)

Anonymous Coward | more than 4 years ago | (#34052684)

i want to know why everytime i plug in my ipad the pc asks what kind of camera it is

Re:ipad (1)

jedidiah (1196) | more than 4 years ago | (#34052768)

It must see the magic photo directory on your iPad.

Re:ipad (3, Informative)

AndrewNeo (979708) | more than 4 years ago | (#34053188)

That's because it's exposed as a PTP (Picture Transfer Protocol) device over USB. All iPhone/iPod Touch/iPads do this.

Re:ipad (5, Funny)

CannonballHead (842625) | more than 4 years ago | (#34054124)

You're plugging it in wrong.

Most embedded devices have a serial port (3, Informative)

FranTaylor (164577) | more than 4 years ago | (#34052690)

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.

Re:Most embedded devices have a serial port (1)

bhsx (458600) | more than 4 years ago | (#34052852)

Yeah, and for the amount of extra hardware you have to lug around for this "hack," you might as well just pick-up an old zaurus or something considerably more apt(no pun) in delivering a remote terminal.

Re:Most embedded devices have a serial port (2, Insightful)

AJ Mexico (732501) | more than 4 years ago | (#34054134)

How last century! What are we going to see next -- how to interface your iPhone to a paper tape reader/punch? Instead of this -- cut the cable, and get an RS-232 - to Bluetooth adapter, similar to this. [provantage.com] They are cheaper than the parts for this hack. The iPhone is a wireless device.

Re:Most embedded devices have a serial port (1)

makomk (752139) | more than 4 years ago | (#34054494)

More interestingly, on some of the HTC Android phones, the ExtUSB connector can apparently double up as a serial port if you use the correct cable. Not sure why - hardly anything uses that feature.

Not a secret (5, Informative)

m2pc (546641) | more than 4 years ago | (#34052710)

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 [adriangame.co.uk]

Re:Not a secret (2, Informative)

unts (754160) | more than 4 years ago | (#34054390)

THANK YOU!

This is so far from a secret it's not even funny. Imagine if we'd only just discovered what those two pins on the connector did?

Hell, even the breakout board the guy (who's original, non full page ad-encumbered article can be found here [blogspot.com] ) bought has the bloody serial pins labelled.

It's not remotely surprising that an embedded device has a UART on it. It's even less surprising that a device designed to interface with very simple dock devices has a UART exposed via its peripheral connector.

What is surprising is that the combination of breakout board and RS232 line driver somehow managed to be bigger than the phone.

More interesting if iPad also has it ... (2, Interesting)

Anonymous Coward | more than 4 years ago | (#34052716)

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.

Re:More interesting if iPad also has it ... (1)

BitZtream (692029) | more than 4 years ago | (#34053586)

It does, all of the iDevices do at this point, have for years. Its how you control the iDevice remotely. Its how your car steering wheel controls or car stereo or any of the remote systems to plug your iPod/iPhone/iPad into a XM radio controller so it appears on cars that don't directly support the iPod.

Re:More interesting if iPad also has it ... (1)

Hatta (162192) | more than 4 years ago | (#34054056)

The iPhone screen is just too small for practical use

We're talking about a serial connection here. Is the iphone screen really too small to handle an 80x25 console?

Re:More interesting if iPad also has it ... (1)

mattdm (1931) | more than 4 years ago | (#34054092)

The iPhone screen is just too small for practical use

We're talking about a serial connection here. Is the iphone screen really too small to handle an 80x25 console?

It's workable, but barely. There's already a bunch of SSH clients in the app store. If you want to actually interact, you need to have an app which has a translucent keyboard, and that takes some getting used to.

Computer-Phone=Serial port? (4, Funny)

Kenja (541830) | more than 4 years ago | (#34052718)

Could have sworn there was more to these computer things then that.

Re:Computer-Phone=Serial port? (4, Funny)

$RANDOMLUSER (804576) | more than 4 years ago | (#34053164)

Reminds me of the story from The Zen of Programming:

A novice went into the master's cubicle and saw a new computer sitting upon the master's desk. "What is that computer?" asked the novice. The master placed his hand upon a small box that was connected to the computer by a wire. "Behold," said the master, "This device controls what we see on the screen. The screen simulates a desk. For example, here is a filing cabinet and a trash depository. Here also is a typewriter and a calculator." "This is a wonderful invention," whispered the novice in awe. "It is not as wonderful as it seems," said the master. "Can you see the two desks?" The novice nodded. "One is on the floor, the other is on the screen," he remarked. "Just so. Now, is there something missing on one of the two desks?" The novice pondered for a moment. "One of the desks does not have a computer on it," he said. The master shook his head. "Neither of the desks has a computer on it."

Re:Computer-Phone=Serial port? (1)

nxtr (813179) | more than 4 years ago | (#34054470)

So what you're trying to say is they wasted money buying a second desk?

Re:Computer-Phone=Serial port? (4, Funny)

hardie (716254) | more than 4 years ago | (#34054488)

Even more existentially, one of the desks has windows on it.

If You'd Rather Read the Article (4, Informative)

kat_skan (5219) | more than 4 years ago | (#34052766)

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 [blogspot.com]

Re:If You'd Rather Read the Article (1)

advocate_one (662832) | more than 4 years ago | (#34052954)

wow, thanks for that... the link on there to pinouts.ru is sheer magic to an old hardware geek like me...

Re:If You'd Rather Read the Article (4, Informative)

kat_skan (5219) | more than 4 years ago | (#34053082)

Looking at it a little closer, CW just plagiarized the entire thing photos and all, and added a paragraph here and there to make it look like the article was about how they built one using his design. Classy.

Fully functional computer? (1)

asnelt (1837090) | more than 4 years ago | (#34052778)

So far my definition of a fully functional computer was based on Turing completeness. How is a serial port important for that?

Re:Fully functional computer? (4, Funny)

idontgno (624372) | more than 4 years ago | (#34052836)

How are you going to attach the tape reader/punch for the program tape without a serial port?

Re:Fully functional computer? (2, Funny)

Anonymous Coward | more than 4 years ago | (#34052886)

Wirelessly?

Vagina (0)

Anonymous Coward | more than 4 years ago | (#34053830)

IMHO, a computer that is "fully functional" will have a fully functional Vagina. :-)

Re:Vagina (4, Funny)

opus7600 (1250684) | more than 4 years ago | (#34054154)

Love how you classed that right up by adding a smiley.

Or (0, Offtopic)

Pojut (1027544) | more than 4 years ago | (#34052788)

'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.'"

Or, you could just...you know...get an Android phone with a custom ROM on it...

Re:Or (2, Insightful)

Anonymous Coward | more than 4 years ago | (#34052846)

"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".

Re:Or (2, Insightful)

Pojut (1027544) | more than 4 years ago | (#34052908)

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.

Re:Or (3, Informative)

Pojut (1027544) | more than 4 years ago | (#34052948)

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.

Re:Or (0)

Anonymous Coward | more than 4 years ago | (#34053374)

Unless you are on AT&T. They remove the option to enable unknown sources. No side-loading for you (unless you've done a custom ROM install). But the devices as delivered by AT&T don't allow side-loading. Fortunately, my Motorola Droid (on Verizon) can side-load just fine.

That's Apple's fault! (1, Informative)

Anonymous Coward | more than 4 years ago | (#34053530)

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.

Re:Or (3, Interesting)

anethema (99553) | more than 4 years ago | (#34053450)

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.

---

Re:Or (1)

makomk (752139) | more than 4 years ago | (#34054538)

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.

Re:Or (0)

Anonymous Coward | more than 4 years ago | (#34054648)

...you do realize they've run Ubuntu in a chroot jail on Android right? Been able to do that on your iPhone?

Re:Or (0)

Anonymous Coward | more than 4 years ago | (#34053456)

That very option (install from unknown sources) was disabled in at least one Android phone, I think the AT&T Galaxy S.

Workarounds for the issue (ADB and pm) would require rooting the phone.

I guess leave it to Google (and the Nexus One) to do anything right. Carriers can't seem to leave phones alone.

Re:Or (0, Offtopic)

Jahf (21968) | more than 4 years ago | (#34052956)

Insightful? Not really.

If you've gone through the process of rooting Android versus jailbreaking iOS then you'd know there is a pretty serious difference. Both in terms of what you can do -without- going through one of these processes as well as how hard the process is to complete.

While in a flow-chart the processes look like the same block, from an end-user perspective they are significantly different.

And yes, this is the major reason why I went from an iPhone to an Android phone.

Re:Or (5, Insightful)

Joce640k (829181) | more than 4 years ago | (#34052916)

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.

Re:Or (0)

Anonymous Coward | more than 4 years ago | (#34053296)

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.

Re:Or (2, Insightful)

Nyder (754090) | more than 4 years ago | (#34053978)

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?

Re:Or (0)

Anonymous Coward | more than 4 years ago | (#34053336)

I was going to say, this hack might make sense to someone who already had an iPhone that is disused (say, because you realized you wanted to actually control your hardware, and ditched St. Steve of Jobs) but they actually seem to fetch a fair price on eBay.

Re:Or (1, Insightful)

Anonymous Coward | more than 4 years ago | (#34053340)

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).

obviously meant for low-level debugging (1)

postmortem (906676) | more than 4 years ago | (#34052790)

.. of perhaps iOS itself.

Re:obviously meant for low-level debugging (1)

Gollum (35049) | more than 4 years ago | (#34052986)

Amongst other things, I suppose.

It would be interesting to try listen on this serial port to see if the device emits any messages while booting up. Some trial and error on the baud rate may be required, of course.

Re:obviously meant for low-level debugging (2, Informative)

idontgno (624372) | more than 4 years ago | (#34053044)

Alas, this hack won't do it:

To operate the serial port, we need to run an RS232 to TTL converter. Fortunately, there's a 3.3v output on the bottom of the phone that'll power our unit. Not useful if you want to get into the phone's serial console, since it only provides power once booted.

In other words, this design is powered with a power source that isn't even available until the iPhone/iPod is booted up.

I guess you could fix that with an appropriate external power supply; a little wall-wart and some appropriate voltage regulation.

Re:obviously meant for low-level debugging (1)

BitZtream (692029) | more than 4 years ago | (#34053638)

Maybe, but its known, well documented purpose is so external devices can control the iPod/iPhone. Tell it to change songs and such.

Its not a new discovery, its well known and documented and has been for years.

I've known about it for at least 2 years and it wasn't new when I came across it.

Re:obviously meant for low-level debugging (1)

zach_the_lizard (1317619) | more than 4 years ago | (#34053782)

Or, with this mod, for configuring the real IOS: Cisco'- IOS. That's exactly what I thought of. Get a foldup bluetooth keyboard, a jailbroken iPhone with this connector, and you've got a very mobile setup that can charge off of simple USB.

Linux box? (2, Insightful)

Anonymous Coward | more than 4 years ago | (#34052820)

Just get a Nokia N900. Nothing hidden there.

Cease and Desist (2, Informative)

BabyDuckHat (1503839) | more than 4 years ago | (#34052942)

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

Re:Cease and Desist (4, Insightful)

Shadow Wrought (586631) | more than 4 years ago | (#34052990)

Please don't use the hardware you purchased and is now yours for non-Apple authorized activities.

How soon until you're just licensing that iPhone?

Re:Cease and Desist (4, Insightful)

idontgno (624372) | more than 4 years ago | (#34053178)

Never. There's no need. You can own the hardware. You just can't use any of the software included until you agree to the license, and thereby agree to Apple's restrictions on how you use the hardware.

That's the cleverness, really. They don't control your ownership of the hardware. So to a naive observer, you're completely in charge. But the moment you actually try to use any functionality embodied in the included software (i.e., anything capability beside "crappy doorstop" and "blender fodder"), Apple owns you. As long as your path coincides with Apple's decisions, you're golden. But try to do anything they don't want you to do... "You get nothing! you lose! Good day, Sir!"

Re:Cease and Desist (0)

Anonymous Coward | more than 4 years ago | (#34054618)

But the moment you actually try to use any functionality embodied in the included software (i.e., anything capability beside "crappy doorstop" and "blender fodder"), Apple owns you.

If that actually was the iPhone user experience, they wouldn't have users. Hyperbole much?

virtual keyboards and small screens (1, Insightful)

Anonymous Coward | more than 4 years ago | (#34052982)

typing router commands using the virtual keyboard and having the console on half of a small screen ? no, thanks ...

Re:virtual keyboards and small screens (1)

zach_the_lizard (1317619) | more than 4 years ago | (#34053838)

IIRC, you can use a bluetooth keyboard with the iPhone, so that fixes one problem. If you must have a bigger screen, then you can SSH into the phone itself and run the commands on a bigger screen, but that sort of defeats the purpose.

yet another appleboy article... (3, Funny)

Kynde (324134) | more than 4 years ago | (#34053060)

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?

Re:yet another appleboy article... (4, Funny)

jiteo (964572) | more than 4 years ago | (#34053306)

What next? They'll discover a hidden parallel port and what? It's supposed to stop world hunger?

Damn right, it'll feed people cereal in parallel.

Re:yet another appleboy article... (-1, Redundant)

Anonymous Coward | more than 4 years ago | (#34054118)

Damn right, it'll feed people serial in parallel.

Fixed that for you.

Re:yet another appleboy article... (2, Funny)

Ksevio (865461) | more than 4 years ago | (#34054034)

Then I can hook up my HP Laserjet III and print stuff off my iPod!

Almost Useful (1)

lizardb0y (149142) | more than 4 years ago | (#34053066)

Woo hoo! Now the iPhone is almost as useful as my 15 year old Palm! Well done, Apple.

Oh Christ No!!!! (5, Insightful)

OzPeter (195038) | more than 4 years ago | (#34053074)

<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>

Re:Oh Christ No!!!! (2, Funny)

clone53421 (1310749) | more than 4 years ago | (#34053110)

Pff. I’m still fiddling with gender changers, null modems, 9/15 pin changers, RS232 and RJ45 cables... oh, and this ancient boxy thing called a 1747-PIC...

Re:Oh Christ No!!!! (0)

Anonymous Coward | more than 4 years ago | (#34053154)

yeah well, all I had to play with as a child were two cans and a string!

Re:Oh Christ No!!!! (1)

clone53421 (1310749) | more than 4 years ago | (#34053300)

I’m pretty sure that protocol is still implemented at least someplace in our system, too.

Re:Oh Christ No!!!! (1)

spammeister (586331) | more than 4 years ago | (#34053198)

Bah, DCE and DTE are fun on a bun.

Re:Oh Christ No!!!! (1)

Sponge Bath (413667) | more than 4 years ago | (#34053726)

I don't see any handshake signals, just transmit and receive data. No complicated protocol, no worry about host vs peripheral, just bits of data flowing in each direction. Sometimes simple is good.

Re:Oh Christ No!!!! (1)

spaceyhackerlady (462530) | more than 4 years ago | (#34054614)

I don't want to go back to carrying gender changes...

Changing gender is a life-long thing. While I got my new birth certificate with an F on it nearly 25 years ago, I will need a new hormone prescription (if nothing else) from my doctor every year as long as I live.

Parts is Parts (1)

digitaldc (879047) | more than 4 years ago | (#34053116)

"There you have it! All parts were acquired from eBay, Ridax and Jaycar."

Steve Jobs: "NOOOOOOOOOOOOOOOOOOO!!!!"

I may be missing something, but... (4, Informative)

quarkoid (26884) | more than 4 years ago | (#34053208)

...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 [ebay.co.uk] for an example.

Re:I may be missing something, but... (5, Informative)

BitZtream (692029) | more than 4 years ago | (#34053506)

Yea, its rather well documented on Apple's website actually. Its how third party vendors can control the iPod/iPhone.

When you plug you iPod/iPhone into a car and start using your radio or steering wheel controls to change songs or whatever ... thats done through the serial port.

Its all documented on Apples website for registered developers, including the control protocol. You can also find the information elsewhere on the web by those people who reverse engineered it to avoid being bound to Apples rules.

At last...... (1)

slashnik (181800) | more than 4 years ago | (#34053278)

......I can put the psion5 out to grass.

Re:At last...... (1)

davidbrit2 (775091) | more than 4 years ago | (#34054692)

Funny enough, I keep a Psion 5 on my desk for those odd occasions when I need a portable serial terminal.

Wow.. (1, Insightful)

Anonymous Coward | more than 4 years ago | (#34053280)

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 :)

Old News (5, Informative)

stokessd (89903) | more than 4 years ago | (#34053354)

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
        stopVal = digitalRead(stopPin); // read stop button
        fwdVal = digitalRead(fwdPin); // read fwd button
        backVal = digitalRead(backPin); // read back button

    if (playVal == LOW)
    {
        sendRequest(commandBytes[1]); // send play command
        sendRequest(commandBytes[0]); // send button release
    }
    else if (stopVal == LOW)
    {
        sendRequest(commandBytes[8]); // send stop command
        sendRequest(commandBytes[0]); // send button release
    }
    else if (fwdVal == LOW)
    {
        sendRequest(commandBytes[4]); // send stop command
        sendRequest(commandBytes[0]); // send button release
    }
    else if (backVal == LOW)
    {
        sendRequest(commandBytes[5]); // send stop command
        sendRequest(commandBytes[0]); // send button release
    }

delay(100);
}

void sendRequest(int val) {
        checkSum = 0x100 - ((0x03 + 0x02 + val + 0) & 0xFF);
        int request[] = {0xFF, 0x55, 0x03, 0x02, 0x00, val, checkSum};

        for (int i = 0; i 8; i++)
            {
                Serial.print(request[i], BYTE);
            }
        Serial.println();
}

OLD NEWS (1)

aardwolf64 (160070) | more than 4 years ago | (#34053382)

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/ [ilounge.com]

Next they'll discover the JTAG port (4, Informative)

Animats (122034) | more than 4 years ago | (#34053402)

Yeah, it's got a serial port, with TTL levels, at its external connector. Big deal.

It's also possible to attach USB devices [arstechnica.com] , which is somewhat more useful today. For example, you can plug a real keyboard into an iPad.

Re:Next they'll discover the JTAG port (2, Funny)

multipartmixed (163409) | more than 4 years ago | (#34053796)

Yeah, it's got a serial port, with TTL levels, at its external connector. Big deal.

You mock, but it IS a big deal.

This means I can plug my iPhone into my Vic-20!

Re:Next they'll discover the JTAG port (1)

SharpFang (651121) | more than 4 years ago | (#34054198)

Seriously, a whole lot of embedded devices - sensors, microcontrollers, machinery, vehicles, booths - use RS232 (as simple, universal and VASTLY easier to program than USB)
It would be pretty exciting news... if it wasn't iPhone, a platform so locked down that it's nearly useless for homebrew like that.

Wonderful (1)

formfeed (703859) | more than 4 years ago | (#34053412)

Now you can use your iPhone to program your Arduino. </sarcasm>

Re:Wonderful (1)

BitZtream (692029) | more than 4 years ago | (#34053674)

Whats cooler is that if you look in Arduino land ... we've been using this serial port for years, there have been libraries written for Arduino to use this port to control playback.

Re:Wonderful (1)

walshy007 (906710) | more than 4 years ago | (#34054084)

what I don't get about arduino is... why don't people just get the atmel chips and make their own boards? the arduino branding makes little sense to me since all of the boards are comparatively simple and all of the chips are readily available.

So why don't people just make their own designs?

Re:Wonderful (2, Insightful)

fotbr (855184) | more than 4 years ago | (#34054598)

Because hardware "is hard". The bulk of the arduino crowd doesn't really want to play with hardware, they want to buy kits and write some glue code for premade libraries and pretend like they know microcontrollers.

Means to an end, and all that. They're more concerned with what they can do with it than how they accomplish it.

Finally... (0)

Anonymous Coward | more than 4 years ago | (#34053746)

I can get rid of my Palm Vx

How to access programatically (1)

DalDei (1032670) | more than 4 years ago | (#34053844)

Does this serial port appear on /dev/tty(?) can you run a getty on it ?

Re:How to access programatically (1)

Guy Harris (3803) | more than 4 years ago | (#34054350)

Does this serial port appear on /dev/tty(?) can you run a getty on it ?

/dev/tty on UN*X is a device that, when opened in a process that has a controlling terminal, gives you a descriptor that lets you do I/O on the controlling terminal; if you had a process running on iOS with /dev/tty.iap as its controlling terminal, and the sandboxing let you open /dev/tty, /dev/tty.iap would "appear" in the sense that reads or writes to /dev/tty would access /dev/tty.iap.

However, if you meant /etc/ttys, which is what controls where getty is run, you could presumably put an entry for /dev/tty.iap in /etc/ttys. I don't know whether launchd would immediately notice that the file had changed or whether you'd need to poke it, but, once it re-reads /etc/ttys, there should be a getty running there.

Unfortunately, xnu's tty driver doesn't support all of the delay options in termios, so you probably won't be able to hook up an ASR33 to an iPhone/iPod Touch/iPad, or a Mac, and use it, cool though it might be to log into an iphone, or a Macintosh, with an ASR33.

Applies to iPad as well (1)

PinkyGigglebrain (730753) | more than 4 years ago | (#34054080)

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 [apple.com] and a USB=>RS232 adapter [dealextreme.com] 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.

cool beans (1)

hesaigo999ca (786966) | more than 4 years ago | (#34054264)

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???

hah (0)

Anonymous Coward | more than 4 years ago | (#34054656)

"you can have a fully functional computer, as useful as a Linux box"

Okay, so it will make your phone useless? Do not want.

Load More Comments
Slashdot Login

Need an Account?

Forgot your password?