SerialPort problem in UNIX Squeak 3.0 vm on FreeBSD
Ned Konz
ned at bike-nomad.com
Mon May 21 23:24:10 UTC 2001
On Monday 21 May 2001 16:28, Peter William Lount wrote:
> port := SerialPort new.
> port stopBitsType: 2.
> port openPort: 0.
> port baudRate: 9600.
You need to do all the settings (including #baudRate:) _before_ you do the
openPort: . Swap the last two lines.
> ioStream := ReadWriteStream on: String new.
Instead of using a Stream, a lower-garbage alternative is to use
SerialPort>>readInto:startingAt: with a pre-allocated buffer. Then you just
have to keep track of the start position. No String creation is involved!
Anyway, I'm not able to get the sqUnixSerial.c code to work even when I link
it into a C program. I'm looking into the port settings. I'm wondering
whether my changes to the Linux operating system (from 2.2.whatever to 2.4.4)
since the last time I tested this have made any difference. I'm going to try
it on a 2.2.19 system.
--
Ned Konz
currently: Stanwood, WA
email: ned at bike-nomad.com
homepage: http://bike-nomad.com
More information about the Squeak-dev
mailing list
|