Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 40
Discuss trying to use the serial port at the Free Toolchain Software (Cydia App's) - Hackint0sh.org; I've been playing with the serial port for a week now and I have to ...
  1. #11
    CVB
    CVB is offline
    Newbie Array

    Join Date
    Sep 2007
    Posts
    2
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    I've been playing with the serial port for a week now and I have to say its tricky. I've tried all the ports and it seems like the only ones that work are the tty.iap and cu.iap. Both of these ports are mentioned under the IOSerialBSDClient section in the IOKIt registry. I was able to run minicom and send serial data out to my computer but the problem I found is that the iphone locks up when you try to send data back to the iphone over that same connection. I am by no means an apple OS X expert so any pointers people can give me would really help out.

    Does anyone know the nuisances between cu.iap and tty.iap? I assume that one is a callout device and one is a dial in device... maybe thats why its locking up everytime I send data to the phone.
    Last edited by CVB; 09-24-2007 at 05:28 AM.


  2. #12
    Newbie Array

    Join Date
    Sep 2007
    Posts
    7
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Quote Originally Posted by CVB View Post
    I've been playing with the serial port for a week now and I have to say its tricky.
    Are you sure nothing else is listening to the serial port? I heard there was a shell? Perhaps you need to kill off a getty process or the modern equivalent? The xserve runs a serial daemon of some sort perhaps the iphone daemon is related?

    If you run the phone with and without debug-uarts set are there any differences to the process running?

  3. #13
    Senior Professional Array

    Join Date
    Jul 2007
    Posts
    151
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    16

    Default

    Use only tty.
    From what I understand, on Unix machines, the cu devices differ by the way they respond to open(), in that they do some primitive locking.

    Oh yeah, is lsof available on the iPhone? If so, use that and tell us if it will tell you who's got tty.iap open.

    Quote Originally Posted by CVB View Post
    I've been playing with the serial port for a week now and I have to say its tricky. I've tried all the ports and it seems like the only ones that work are the tty.iap and cu.iap. Both of these ports are mentioned under the IOSerialBSDClient section in the IOKIt registry. I was able to run minicom and send serial data out to my computer but the problem I found is that the iphone locks up when you try to send data back to the iphone over that same connection. I am by no means an apple OS X expert so any pointers people can give me would really help out.

    Does anyone know the nuisances between cu.iap and tty.iap? I assume that one is a callout device and one is a dial in device... maybe thats why its locking up everytime I send data to the phone.

  4. #14
    Senior Professional Array

    Join Date
    Jul 2007
    Posts
    151
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    16

    Default

    Hey, can somebody ssh into a iphone and run "ps aux" and "lsof" and post the output somewhere? It might be useful to know the name of the app that currently handles stuff on the dock connector's serial port.

  5. #15
    Newbie Array

    Join Date
    Sep 2007
    Posts
    3
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Could not find "lsof", but here is the output from "ps aux":

    PHP Code:
    # ps aux
    USER   PID %CPU %MEM      VSZ    RSS  TT  STAT STARTED      TIME COMMAND
    root   217   0.0  0.0   272872    332  p0  R
    +    4:13AM   0:00.01 ps aux
    root     1   0.0  0.0   272956    332  
    ??  Ss   Fri11PM   0:04.74 /sbin/launchd
    root    12   0.0  0.0   297684   1012  
    ??  Ss   Fri11PM   1:27.73 /usr/local/bin/SMST/SMST
    root    13   0.0  0.0   285564    872  
    ??  Ss   Fri11PM   0:02.21 /usr/sbin/BTServer
    root    14   0.0  0.0   279092   1172  
    ??  Ss   Fri11PM   0:36.67 /System/Library/Frameworks/CoreTelephony.framework/Support/CommCenter
    root    17   0.0  0.0   275084    936  
    ??  Ss   Fri11PM   1:58.96 /usr/sbin/configd
    root    18   0.0  0.0   273396    360  
    ??  Ss   Fri11PM   0:00.10 /usr/libexec/crashreporterd
    root    19   0.0  0.0   272968    304  
    ??  Ss   Fri11PM   0:00.42 /usr/sbin/cron
    root    20   0.0  0.0   286788   1196  
    ??  Ss   Fri11PM   0:09.16 /System/Library/Frameworks/IAP.framework/Support/iapd
    root    21   0.0  0.0   273712    648  
    ??  Ss   Fri11PM   0:10.84 /usr/sbin/mDNSResponder -launchd
    root    22   0.0  0.0   275144    660  
    ??  Ss   Fri11PM   0:22.52 /usr/libexec/lockdownd
    root    23   0.0  0.0   274000    276  
    ??  Ss   Fri11PM   2:54.90 /usr/sbin/syslogd
    root    24   0.0  0.0   274168    200  
    ??  Ss   Fri11PM   0:00.11 /bin/sh /etc/hackinit.sh
    root    25   0.0  0.0   282248    528  
    ??  Ss   Fri11PM   0:01.71 /usr/libexec/ptpd -t usb
    root    28   0.0  0.0   273456    256  
    ??  Ss   Fri11PM   0:25.71 /usr/sbin/notifyd
    root    31   0.0  0.0   272904    188  
    ??  S    Fri11PM   0:02.09 /usr/sbin/PXLdaemon
    root    32   0.0  0.0   264644    120  
    ??  S    Fri11PM   0:16.90 /usr/sbin/update
    root   125   0.0  0.0   289836   9684  
    ??  Ss    3:04AM   0:38.79 /usr/sbin/mediaserverd
    root   141   0.0  0.0   273276    620  
    ??  S     3:39AM   0:03.39 /usr/sbin/sshd -i
    root   145   0.0  0.0   274168    980  p0  Ss    3
    :40AM   0:00.75 -sh
    root   212   0.0  0.0   320316  22432  
    ??  Ss    4:02AM   0:26.35 /System/Library/CoreServices/SpringBoard.app/SpringBoard
    root   213   0.0  0.0   299696   2044  
    ??  S     4:02AM   0:00.42 /Applications/MobilePhone.app/MobilePhone --firstLaunch --suspended 


  6. #16
    Senior Professional Array

    Join Date
    Jul 2007
    Posts
    151
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    16

    Default

    Ah, so there's a iapd.
    I wonder if CVB can try again after killing the iapd process.
    That one's probably got the serial port open and was listening for stuff.

  7. #17
    Advanced Array

    Join Date
    Oct 2007
    Posts
    47
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    I'm having the same problem as CVB. Has anyone gotten past that? I'm using uart.iap, instead of the others listed here. Works fine for serial output, but reading input either freezes the iphone, or does nothing depending on what flags I'm using etc.

    Killing iapd seems to stop the serial device from working properly in output and does not fix input. I tried changing permissions to uart.iap, but that had not affect.

    The other thing I could try is to use pin 21 and try some different resistances to see if any of them activate it. Maybe 500Kohm as mentioned here http://pinouts.ru/Devices/ipod_pinout.shtml .

    Anyone else had any more luck with this??

  8. #18
    Advanced Array

    Join Date
    Oct 2007
    Posts
    47
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Well I tried a 6k ohm today from pin 21 to gnd and no luck. Didn't have a 500k ohm, but I'll be trying that next and let you all know if it works.

  9. #19
    Senior Professional Array

    Join Date
    Jul 2007
    Posts
    151
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    16

    Default

    Changing permissions won't do anything.

    The problem you're having is that the code that handles actual iPod accessories such as car kits and speaker docks is seeing the signals you're trying to input and failing to interpret them properly. (my guess is that with a car kit, it freezes the interface like it would do for a normal ipod?)

    The idea of killing iapd and then trying your serial port tests was to make it so that your app is the only one using the serial port. Guess it isn't that easy.

    I need to get myself a serial breakout dock or cable to play with.

  10. #20
    Advanced Array

    Join Date
    Oct 2007
    Posts
    47
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Yes, I understand that. Well today I tried 500K ohm and that did not work. I don't think the freezing is because of the normal behaviors that are supposed to happen with an accessory because it freezes ALL functionality. For instance, my SSH terminal connection no longer responds to anything. I believe this is a safegard put in place to only allow authorized peripherals.

    HOWEVER I have found a way to get get serial input working now... it may not be the best solution, but it does work. I was starting to think I was going to go crazy because every so ofter (like once every 20 tries) serial input would NOT freeze the iphone and the data would reach my program. With the method I have found, the Iphone will still give a warning that the peripheral you have attached is not an official iphone peripheral. But after this it will work.
    I'll release more details once I have a good demo of this, so that people don't steal the credit for finding it.


 

 
Page 2 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Serial Port
    By Sheerz in forum Kernel / Kext (Driver) Support
    Replies: 1
    Last Post: 03-25-2010, 12:28 AM
  2. serial port problems
    By netboy in forum Installation
    Replies: 0
    Last Post: 03-02-2010, 06:10 PM
  3. Serial Port Input Assistance
    By damagedpunk in forum iPhone Developer Exchange
    Replies: 1
    Last Post: 01-13-2010, 12:49 PM
  4. Serial Port access
    By SierraDog in forum iPod Touch 2G
    Replies: 0
    Last Post: 07-27-2009, 11:30 PM
  5. Bluetooth Serial Port Protocol?
    By burkferden in forum iOS 3.x (iPhone OS 3.x)
    Replies: 0
    Last Post: 07-27-2009, 01:32 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 07:30 PM.
twitter, follow us!