Iphone serial port programming?

Discussion in 'iOS Programming' started by maxpany, Aug 18, 2009.

  1. maxpany macrumors newbie

    Joined:
    Aug 18, 2009
    #1
    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:
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    I assume you are using a jailbroken phone? As this certainly won't work with the normal SDK.
     
  3. bredell macrumors regular

    Joined:
    Mar 30, 2008
    Location:
    Uppsala, Sweden
    #3
    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.
     
  4. maxpany thread starter macrumors newbie

    Joined:
    Aug 18, 2009
    #4
    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?
     
  5. maxpany thread starter macrumors newbie

    Joined:
    Aug 18, 2009
    #5
    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?
    :(
     
  6. wlh99 macrumors 6502

    Joined:
    Feb 7, 2008
    #6
    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.
     
  7. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #7
    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.
     
  8. maxpany thread starter macrumors newbie

    Joined:
    Aug 18, 2009
    #8
    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.
     
  9. bredell macrumors regular

    Joined:
    Mar 30, 2008
    Location:
    Uppsala, Sweden
    #9
    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.
     
  10. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #10
    Basically, no. You need to talk to Apple if you want to do anything to do with external devices.
     
  11. MagnetMan macrumors newbie

    Joined:
    Nov 3, 2010
    #11
    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.
     
  12. MacPioneer macrumors member

    Joined:
    Oct 26, 2010
    #12
    Are you able to do this with a non-jailbroken phone? I thought the Bluetooth profiles the SDK let you get at were pretty limited.
     
  13. the live macrumors newbie

    Joined:
    Dec 7, 2010
    #13
    is it possible to get the code? I want to connect the iPhone via Bluetooth to a custom hardware with the serial port profile but it will not work....
     
  14. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #14
    You either need to be a big manufacturer in Apple's MFi program, or have a hacked/rooted OS on the device.
     
  15. the live macrumors newbie

    Joined:
    Dec 7, 2010
    #15
    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.
     
  16. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #16
    Maybe you should consider something less complex for your first iPhone app. IMHO, you are biting off more than you can chew.
     

Share This Page