Getting Integers From A Computer

Discussion in 'iOS Programming' started by DifferentialApp, May 30, 2010.

  1. DifferentialApp macrumors regular

    Joined:
    May 14, 2010
    #1
    Hey everyone,
    I was trying to make an app for a car that I am making. The app is supposed to get information from the computer inside the car (current oil level, fuel, ect.) and display it on the iPhone/iPod touch. Is there a way to do this with x-code? If so, could you give me some helpful tips on how I could do this? I am just beginning developing for the iPhone/iPod touch and I don't know too many things about developing.

    Again, sorry for my ignorance. If you guys could help me with this, that would be really amazing!

    Thanks!
     
  2. TiberiusXavier macrumors member

    Joined:
    Apr 18, 2010
    Location:
    Chicago
    #2
    How are you planning on acquiring this data? Are you using wireless networking or customizing the data cable?
     
  3. DifferentialApp thread starter macrumors regular

    Joined:
    May 14, 2010
    #3
    A cable. I could possibly use a wireless network, but the preferred way is through a cable.
     
  4. Matthew Yohe macrumors 68020

    Joined:
    Oct 12, 2006
    #4
    This is easy, but the big question is, how do you plan on getting data from the car?

    You do realize that you can't just hook a USB cable or something to the car right?

    This information is transmitted via the ODB or ODB-II (on board diagnostics).

    Even if you did have access to this, you would have you sign up for the Made for iPod program to even communicate through the dock connector.
     
  5. DifferentialApp thread starter macrumors regular

    Joined:
    May 14, 2010
    #5
    All I need the iPod to do is get the numbers being sent through the USB cable and display them in the proper place. There will be a computer on there that will get hex numbers and convert them. After that, the numbers will be sent to the iPod to be displayed.
     
  6. DifferentialApp thread starter macrumors regular

    Joined:
    May 14, 2010
  7. TiberiusXavier macrumors member

    Joined:
    Apr 18, 2010
    Location:
    Chicago
    #7
    Sorry, I am a very visual person. Are you trying to do:

    Car <--> OBD II <--> Computer (laptop) <--> USB interface to iPod Touch/iPhone?
     
  8. DifferentialApp thread starter macrumors regular

    Joined:
    May 14, 2010
    #8
    Yes, this is what I am trying to do.
     
  9. skunkworker macrumors regular

    Joined:
    Sep 9, 2007
    #9
    Um as stated above, you either need to jailbreak your device or somehow make it bluetooth as to use USB you need to be a Made for iPod developer from apple.
     
  10. bredell macrumors regular

    Joined:
    Mar 30, 2008
    Location:
    Uppsala, Sweden
    #10
    As people have already mentioned you need to cooperate with Apple if you want to communicate through the USB port or through Bluetooth. But there are some other ways which might be more suitable for you.

    You can use WiFi, communicating through a simple TCP or UDP interface. Some people have also used the headphone jack successfully, communicating with sound. I don't know if they use modem signals, DTMF or some other way of coding data into sound.

    Also, I think that iPhone OS 4 will allow Bluetooth keyboards which might make it possible for you to simply emulate a keyboard and send data to the phone that way.
     
  11. DifferentialApp thread starter macrumors regular

    Joined:
    May 14, 2010
    #11
    Oh, so I have to get the made for ipod thing with apple? How could I do it through jailbreaking?
     
  12. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #12
    What protocol on the cable? Serial? What data rate? The only easy way of getting data into an SDK app on an iPhone is over wifi. There are serial to wifi dongles, but they're fairly pricey (a few hundred $$$).
     
  13. DifferentialApp thread starter macrumors regular

    Joined:
    May 14, 2010
    #13
    I honestly don't know yet. My job is to figure out how to get data from the computer on the car to be displayed on the iPod itself. The other guys told me to find the best and easiest way to do this. I'm really sorry I am not providing sufficient information, and I know you need this to help me.

    I guess the real question is: What is the best way to transfer data from a computer to an iPod touch, and display it on the iPod? This can be done either using a cable or through a wireless network.

    Again, I am really sorry I cannot give you all the information you need to help me out.
     
  14. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #14
    The absolute easiest way would be to put the data on a web server, and connect to that web server via wifi from the iPod Touch.

    But it's hard to find a web server with wifi that cost less than a $300 netbook.
     
  15. skunkworker macrumors regular

    Joined:
    Sep 9, 2007
    #15
    Honestly for the rate of data that you are talking about, using the microphone in connected to a board with an integrated microcontroller may be the easiest.
     
  16. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #16
    An audio data comm protocol might work.

    But you'd need a micro capable of generating something like FSK or PSK. Then ether a cable with the proper impedances and audio levels, or a quiet enough environment to use a small speaker and the iPhone mic without too much interference from any background noise (might be difficult in a garage with an engine revving). And then a fair amount of code for the audio input capture and demodulation on the iPhone receive end. Potentially a lot cheaper in terms of hardware, but a fair amount more iPhone code at a higher difficulty level than just fetching a number string from a URL.
     
  17. DifferentialApp thread starter macrumors regular

    Joined:
    May 14, 2010
  18. TiberiusXavier macrumors member

    Joined:
    Apr 18, 2010
    Location:
    Chicago
    #18
    Given that the primary advantage of these devices is mobility, using wireless networking or bluetooth would be far easier.

    Just out of curiosity, why would you want an iTouch or iPhone when you have a computer with a superior screen already?
     
  19. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #19
    You could try applying to Apple's MFi program, and see if they give you any information on using this method But have you noticed how very very few companies have products interfacing to the iPhone via the dock connector?
     
  20. DifferentialApp thread starter macrumors regular

    Joined:
    May 14, 2010
    #20
    Well we want to put this device in the steering wheel so the driver can view important parts of the engine. The computer is only being used so that the information can be compiled, then displayed on the iPod Touch.
     
  21. DifferentialApp thread starter macrumors regular

    Joined:
    May 14, 2010
    #21
    I was wondering if I could do this with a jailbroken iPod. I highly doubt Apple will accept my application to the MFi program.
     
  22. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
  23. Matthew Yohe macrumors 68020

    Joined:
    Oct 12, 2006
    #23
    Yeah, this would probably be easiest just setting up a small web server on that laptop and serving up those numbers for the iPod to grab.
     
  24. DifferentialApp thread starter macrumors regular

    Joined:
    May 14, 2010
    #24
    Okay, thanks! I will get back to you guys with more information when we are actually doing everything.

    Now how could i do it through jailbreaking?
     
  25. skunkworker macrumors regular

    Joined:
    Sep 9, 2007
    #25
    Why not just send the raw data encoded into highs and lows over the microphone in jack? thats how the square device works

    Umm havn't you heard about microphone in through the headphone jack? why would you use a microphone, that makes no sense at all. Look at how the Square Credit Card reader works.https://squareup.com/

    Don't buy a $300 netbook if all you need is to input this data through that device, and this would easily be cheaper and not needed to use the madeforipod program. And you do not need to jailbreak if you go this route, although you will need a little more hardware expertise, and if you are going to market it it is much easier.
     

Share This Page