[squeak-dev] Serial ports on Linux
Jon Hylands
jon at huv.com
Wed Sep 1 13:55:43 UTC 2010
On Tue, 31 Aug 2010 23:57:39 -0400, "Schwab,Wilhelm K"
<bschwab at anest.ufl.edu> wrote:
>I have been able to do serial I/O on Windows, but not Linux. Running in a terminal to capture output yields "Error while saving old state" while trying to open just about any number or name I can think of (including 0 and /dev/ttyS0), but the open method gives no indication that there is a problem; it returns a perfectly valid looking serial port with the #port set to whatever it was given.
>
>Subsequent reads fail, and are probably a bit more honest about what is happening: "Error while reading: serial port is not open." I am not sure whether that is always the case, but it certainly is on this machine when I try /dev/ttyUSB0, which does not exist here.
If you're trying to use a USB->Serial port, what I normally do is
create a symbolic link to /dev/ttyUSB0 from /dev/ttyS4, and open the
port as port #4.
ln -s /dev/ttyUSB0 /dev/ttyS4
In terms of errors, though, the new SerialPort >> #openPort: in 4.1 is
really borked - it returns no indication that the open succeeded or
failed.
The old one, in 3.8, was much better.
Later,
Jon
More information about the Squeak-dev
mailing list
|