• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Talking to a serial port
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Talking to a serial port


  • Subject: Re: Talking to a serial port
  • From: Chris Boot <email@hidden>
  • Date: Fri, 17 Aug 2001 21:29:11 +0200

Hi,

> What is the suggested method of talking to a serial device on a G4? I
> have a keyspan adapter, but all of my example code is for OS9. I need
> this to work under OSX. Suggestions?

First of all, you'll need the Mac OS X beta Keyspan drivers. Once installed
and rebooted, the serial ports are available as devices in /dev. I can't
remember exactly what the names are or anything (and I think they vary
depending on exactly what USB ports and through which hubs the adapter is
plugged in to), so you'll just have to peruse /dev manually with the aid of
Terminal. In any case, you'll want to ask the end user to choose a serial
port from certain choices.

Once you have the device file, you'll need to use POSIX APIs to
set-up/read/write to device. Of course, I can't remember any of that
either.

There may be (and probably is) a simpler way of doing this through Cocoa,
but I have no idea how.

--
Chris Boot
email@hidden

"Unix is user friendly. It's just selective when choosing friends."


  • Follow-Ups:
    • Re: Talking to a serial port
      • From: Ondra Cada <email@hidden>
References: 
 >Talking to a serial port (From: Chilton Webb <email@hidden>)

  • Prev by Date: tcpdump wiggin out?
  • Next by Date: Re: Downloading html page
  • Previous by thread: Re: Talking to a serial port
  • Next by thread: Re: Talking to a serial port
  • Index(es):
    • Date
    • Thread