Reading data coming down the serial pins of the cable

Discussion in 'iOS Development' started by Gaming Warrior, Dec 17, 2007.

  1. Gaming Warrior

    Gaming Warrior New Member

    Joined:
    Dec 8, 2007
    Messages:
    159
    Likes Received:
    12
    Ok, i was looking at this http://ipodlinux.org/Dock_Connector and notice there are serial pins but do we have a way of reading whats coming down those pins? If we do then we could very easily make a gps add-on for the Ipod touch that just tells you the X and Y of your location the next step would be making/porting something like mapthis for the psp.
    =-=-=-=-=-=-=-=-=-=
    If the above is possible all that would be required to hook up a gps to the ipod touch would be.
    1x USB GPS
    1x USB to miniUSB cable
    1x Ipod dock connector

    and a little bit of rewiring.
  2. Pyrofer

    Pyrofer New Member

    Joined:
    Oct 2, 2007
    Messages:
    162
    Likes Received:
    0
    Yes, its easy. Its done.
    There is already a team working on making a GPS module for the Dock connector!
    You had a great idea, you just werent first

    Please Register or Log in to view images

    At least it shows you are right.

    They have done it with a basic serial GPS module not a USB one, so even more simple than your suggestion.

    http://partfoundry.com/iphonegps.html btw.
  3. Gaming Warrior

    Gaming Warrior New Member

    Joined:
    Dec 8, 2007
    Messages:
    159
    Likes Received:
    12
    Yea, found that just after i posted but i'm a little lost on what the micro controller is for. If anyone know please shed some light as i think we could also get a keyboard(like a pda one) using the same method. i found the code used to do the handshake and every thing and thought it would be easy till i watched the gps video and he needed the micro controller for something.
    also usb gps is basicly the same as what hes doing expect hes is more compact but i dont see why we couldn't use hes software and our own usb gps recivers.
  4. Pyrofer

    Pyrofer New Member

    Joined:
    Oct 2, 2007
    Messages:
    162
    Likes Received:
    0
    Its actualy easier to get a GPS module as they almost all run on the right 3.3v IO that the iPod has on its dock connector. So no complex crap like usb, just connect the module in to the serial port (its low voltage on the dock same as the gps module)
    The Micro is for handshaking the serial pin, but that isnt needed in 1.1.1 firmware and above, so is probably only for 1.0.2 phones. The GPS module should be able to be initialised by the iPhone/iPod itself and it will output NMEA directly to the iPod after that. Its simple then to use that in any software.
  5. Gaming Warrior

    Gaming Warrior New Member

    Joined:
    Dec 8, 2007
    Messages:
    159
    Likes Received:
    12
    Thanks for clearing that up, as for the usb point, basically its the same just not as compact. from what i now understand if i hook the first usb pin to the power pin of the ipod connector, the second and third usb pins go to the two serials of the ipod and the 4th will be used as earth. I'm not 100% sure thats the right wiring I'll have to do a little more looking around.
  6. Pyrofer

    Pyrofer New Member

    Joined:
    Oct 2, 2007
    Messages:
    162
    Likes Received:
    0
    USB is not serial, I dont think the USB data pins connect to the Serial pins at all.
    Check the Dock connector pinout, but there are seperate USB +/- data pins.

    Connecting USB to the serial pins will probably break your iPod/Phone... Dont do it.
    There also seem to be seperate power connections for the USB port, so dont go blowing up the iPod that way either...
    http://www.ipodlinux.org/Dock_Connector

    The GPS modules use the 3.3v power from pin13 (out of ipod) and connect directly to the 2 serial pins and ground. THus, only 4 connections and NO other hardware is needed.
    I dont beleive the USB port works in host mode, so getting a USB GPS module to work would be a total nightmare, and completely pointless when the serial modules are so cheap from www.sparkfun.com and ebay.
  7. Gaming Warrior

    Gaming Warrior New Member

    Joined:
    Dec 8, 2007
    Messages:
    159
    Likes Received:
    12
    Basicly i'm just using usb as 4 wires. the fact of what type of cable it is doesn't really matter at all.
    this is the preposed layout i'm looking into atm
    USB pin 1 to dock conecter pin 13
    USB pin 2 to dock conecter pin 18
    USB pin 3 to dock conecter pin 19
    USB pin 4 to dock conecter pin 20
    The only part i'm unsure about in that is the grounding part.
    But think of the usb as just 4 wires not as being a usb cable.
    i have no plan to use the usb ports on the ipod. But before any of this goes near my ipod i'm gonna make sure its 150% safe.
  8. Pyrofer

    Pyrofer New Member

    Joined:
    Oct 2, 2007
    Messages:
    162
    Likes Received:
    0
    Im a little confused here, are you actualy connecting a USB device or not?
    Also, if you connect to pin 13 for power, that is 3.3v OUT of the iPod, DO NOT put any power INTO this port, especialy not 5v USB levels.
  9. Gaming Warrior

    Gaming Warrior New Member

    Joined:
    Dec 8, 2007
    Messages:
    159
    Likes Received:
    12
    Ok, to try and avoid confusing myself, you and others i'm gonna wait till i get my ipod and can test some of this to make sure this is all possible. but i'm almost certain that what i'm trying to achive is possible.
  10. wardak

    wardak New Member

    Joined:
    Oct 12, 2007
    Messages:
    37
    Likes Received:
    0
    Device:
    iPod touch
    The serial connection on the bottom are active but I don't know if you will need a MAX232 level converter to get the signal voltages right. Hopefully this is allowed? News site and all http://www.hackaday.com/2007/12/14/iphone-gps-module/ (note last comment)

    The USB GPS devices generally have a box in the middle of the wire which convert the serial data to usb... connecting the serial port to the GPS USB will not do anything useful. Its like trying to connect two ipod usb cables together.

    Please Register or Log in to view images

    I hope you're good at porting software

Share This Page