Professional Web Applications Themes

did '/dev/ttys0' is available to open a device in MacOSX - Mac Programming

Hi, did have any body know can I use '/dev/ttys0' device path style to control a serial device in Mac OSX. whatever this device is builtin or PCI extention or USB transfer Adaptor. I had saw article 'Accessing Hardware From Applications', it mention how to work with serial via IOKit, but I want to know can I use tranditional /dev/ttys to operate serial device, to use that to open this device ? if so, how can I make sure which /dev/ttys is available. did every serial device driver need to export a /dev/ttys on MacOSX ? did that is necessary ...

  1. #1

    Default did '/dev/ttys0' is available to open a device in MacOSX

    Hi,

    did have any body know can I use '/dev/ttys0' device path style to control a serial device in Mac OSX. whatever this device is
    builtin or PCI extention or USB transfer Adaptor.
    I had saw article 'Accessing Hardware From Applications', it mention how to work with serial via IOKit, but I want to know can I use
    tranditional /dev/ttys to operate serial device, to use that to open this device ? if so, how can I make sure which /dev/ttys is
    available. did every serial device driver need to export a /dev/ttys on MacOSX ? did that is necessary by OSX specification ?

    Thanks.

    Best Regards.

    Victor.


    Victor Guest

  2. #2

    Default Re: did '/dev/ttys0' is available to open a device in MacOSX

    In article <c6au4c$hinet.net>,
    "Victor Liu" <com.tw> wrote:
     

    I see that you saw the article 'Accessing Hardware From Applications'. I
    suggest you go back and read it.

    It will tell you that you use names of the form "/dev/tty0" to access
    devices in Mac OS X, but that the files in the /dev directory are
    created dynamicly, depending on what is available, and you use IOKit to
    get a list of appropriate devices, for example serial ports or modems.

    If course nothing requires vendors to be competent. It is quite possible
    for a device, like a USB modem, to have no driver, or to have a driver
    that asserts that it is a serial port but not a modem. You'll need to
    decide if you want to support such devices, or just ones that follow OS
    X's rules.
    David Guest

  3. #3

    Default Re: did '/dev/ttys0' is available to open a device in MacOSX


    "David Phillip Oster" <org> 在郵件 news:sf.sbcglobal.net 中撰寫... 
    >
    > I see that you saw the article 'Accessing Hardware From Applications'. I
    > suggest you go back and read it.
    >
    > It will tell you that you use names of the form "/dev/tty0" to access
    > devices in Mac OS X, but that the files in the /dev directory are
    > created dynamicly, depending on what is available, and you use IOKit to
    > get a list of appropriate devices, for example serial ports or modems.
    >[/ref]

    so each serial 'port' (not device such as modem, is port) driver should make a /dev/ttysx file be available on MacOSX ? did that is
    absolute necessary for serial 'port' driver ?whatever that driver is wrote by apple or serial 'port' (such as usb-to-serial) vendor.
     


    Thanks for your reply.

    Victor.


    Victor Guest

  4. #4

    Default Re: did '/dev/ttys0' is available to open a device in MacOSX

    In article <c6crhg$hinet.net>,
    "Victor Liu" <com.tw> wrote:
     


    I've got a Griffin Technology serial port, and a Keyspan PDA serial port
    adapter on my machine. The Griffin shows up as:

    /dev/cu.modem /dev/tty.modem

    and the Keyspan as:

    /dev/cu.USA19QI613P1.1 /dev/tty.USA19QI613P1.1

    but quality Macintosh software would use IOKit to get those names, and
    to cope with the user plugging in new devices and unplugging old ones
    while the Macintosh is running.

    The "cu" version of the name requires fewer handshaking lines from the
    end device than the "tty" version of the name.
    David Guest

Similar Threads

  1. i can't open Serial Port (/dev/ttyS0) on my PC
    By indie in forum Perl / CGI
    Replies: 4
    Last Post: July 12th, 11:28 AM
  2. can't open ttyS0
    By indie in forum PERL Modules
    Replies: 1
    Last Post: June 3rd, 11:04 AM
  3. HELP (cannot open root device)
    By Nobody in forum Linux Setup, Configuration & Administration
    Replies: 15
    Last Post: August 4th, 08:18 AM
  4. telnetd: open /dev/ptmx: No such device.
    By Pom in forum Sun Solaris
    Replies: 2
    Last Post: July 31st, 01:28 PM
  5. Cannot open root device 00:00
    By Sandrine & Thierry AUGER in forum Debian
    Replies: 0
    Last Post: July 27th, 12:10 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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139