Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

maxpany

macrumors newbie
Original poster
Aug 18, 2009
6
0
How can I get iphone serial port I/O
I have read the thread "http://devdot.wikispaces.com/page/code/Iphone+Serial+Port+Tutorial"
But while I open "/dev/tty.iap" file then failed.
how should i solve this?
or Is any other way to connection with iphone serial port?:confused:
 
I assume you are using a jailbroken phone? As this certainly won't work with the normal SDK.

Yes ,my iphone is jailbroken.
I don't really understand witch is normal SDK or not.
the include files <unistd.h>, <fcntl.h> ,<termios.h> ,is this normal SDKs?
Or another way to access the serial port?
 
If you want to connect the iPhone to a serial port you might be able to use a Bluetooth serial adapter with iPhone OS 3.0.

Do you mean this:
iphone bluetooth ->bluetooth device ->my serial device ???
if this then it's too bad, but way the dock connector have 11,12,13 pin for serial port .
Doesn't any body did this?
:(
 
I thought this is what the external accessory framework in OS3.0 was for? I haven't really looked at it but it seems appropriate for communications through the dock connector.
 
Using the official SDK you can't open the serial port. You can talk to "blessed" external devices using the dock connector API but you need to spend some time talking to Apple to get the external device approved.
 
Using the official SDK you can't open the serial port. You can talk to "blessed" external devices using the dock connector API but you need to spend some time talking to Apple to get the external device approved.

Do you mean "made for ipod/iphone"?
I have read that ,but the process is too hard to me(couse of my English..)
Is there any guide to do this?
or some code is also good, thanks.
 
Do you mean this:
iphone bluetooth ->bluetooth device ->my serial device ???
if this then it's too bad, but way the dock connector have 11,12,13 pin for serial port .
Doesn't any body did this?
:(

If you google on "bluetooth serial adapter" (without the quotes) you'll find links to a lot of these adapters. I've never used one of these and I'm not sure if the iPhone can communicate with them, but it could be worth looking into.
 
Do you mean "made for ipod/iphone"?
I have read that ,but the process is too hard to me(couse of my English..)
Is there any guide to do this?
or some code is also good, thanks.

Basically, no. You need to talk to Apple if you want to do anything to do with external devices.
 
If you google on "bluetooth serial adapter" (without the quotes) you'll find links to a lot of these adapters. I've never used one of these and I'm not sure if the iPhone can communicate with them, but it could be worth looking into.

I tried it. I got a cheap serial Bluetooth adapter and it actually works fine. It does however take a few minutes to get it configured and setup.
 
You either need to be a big manufacturer in Apple's MFi program, or have a hacked/rooted OS on the device.

I have read about the MFi programm and i am only a private person so this is no possibility for me. The App I would develop is only for a couple of users, so the requirement of a jailbrocken iPhone is no problem.

Because this will be my first iPhone App, it would be very helpful to have a sample code of something like this.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.