[Pythonmac-SIG] termios
Bob Ippolito
bob@redivi.com
Fri, 10 Jan 2003 18:05:28 -0500
On Friday, Jan 10, 2003, at 17:20 America/New_York, Pascal Oberndoerfer
wrote:
> Bob Ippolito at bob@redivi.com:
>
>> I don't know about termios directly, but I have successfully used the
>> exact same adapter with MacOS X 10.2.2 and 10.2.3 with the pyserial
>> package ( http://pyserial.sourceforge.net/ ) and I developed a Twisted
>
> Bob,
>
> thanks again. It works very, very nice! Just one more question:
> is it true that I have to open a _named_ serial connection? I used
> "/dev/tty.USA19QW[12]1P1.1" depending on the USB port (no. 1 or 2)
> used.
> Attempts through /dev/cuaa[0-9] or /dev/ttyp[0-9] failed all. So if
> I don't know the device name in advance, all I can do is loop through
> "/dev/*" doing a RegEx or similar?
I'm sure there's a way to enumerate which serial ports are available,
as VirtualPC does it (shows modem, irda, and the keyspan if it's
connected on my laptop). I don't know how to do it. I'm pretty sure
that the string USA19QW* is specific to that USB device, and another
manufacturer would use a different string.
I think you'd be fine getting away with just going through /dev/cua*
and see which ones you can open in the meantime.
-bob