Re: Serial Ports across platforms
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: Serial Ports across platforms

From: <slebetman@yahoo.com>
Date: Fri Dec 23 2005 - 00:25:45 CET

Ian Bell wrote:
> Ian Bell wrote:
>
> > I am writing a cross platform application that communicates with a device
> > via an RS232 serial link. The serial connection might be direct to a
> > serial port on the host platform or via a USB to serial converter.
> >
> > I am OK under Linux that the ports appear as either ttySx or ttyUSBx. I
> > believe under windows they will always be COMx:
> >
> > What happens on the MAC?
> >
> > Ian
>
> OK, answered my own question from man open - opening a serial port is not
> currently supported on the Mac.
>

The documentation is very old. It has not been changed for ages. It now
should read: "opening a serial port is not currently supported on
MacOS9 or earlier".

Macs now are Unixen. So it is the same as Linux. But I can't remember
if it is ttySx or cuax. Looking at apple docs provide little help since
they discourage the usage of /dev devices for serial I/O and want you
to use their IOkit API instead - which doesn't help us Tclers. If you
have access to a Mac try listing the /dev directory and see if ttySx is
there. Even if it is, ttyS0 is probably not COM1 but some strange
legacy ADB or Geoport connection the developers left in there. I'm not
sure, don't have a Mac - I usually go to an Apple to play with one to
confirm things. Remember, MacOS X has tclsh installed by default.
Received on Fri Dec 23 19:03:08 2005