Lego Mindstorms Support/Serial Port Problem

johnm at wdi.disney.com johnm at wdi.disney.com
Sun Jan 10 23:21:19 UTC 1999


Jeff:

In your original message, you said that the problem was that you got a
primitiveFailed error on SerialPort>>#primClosePort:. It could be that the
Win32 implementation of "close" fails if the port isn't currently open. On
the Mac, it simply does nothing. To test this, you can try commenting
out the "close" calls (there seem to be two of them!) in SerialPort>openPort:.
Let me know what happens.

Later, you said:
"Jeffrey Odell" <jeffo at esprithealth.com> wrote:
> Currently, I'm simply not getting the serial port on
> WIN32 to open, regardless of what is attached.

This may be solved by the above suggestion, but if not...

Could some other application, perhaps having something to do with
a modem or networking, be holding onto the serial port? This happens on
the Mac if AppleTalk is using the serial port, so you have to remember
to turn off AppleTalk before trying to open the port from Squeak.

If you have access to a C compiler, you might try writing a simple
program to open the serial port. If you find that this program
can't open the port either, Squeak is not the problem. I guess you
can try opening the serial port from VSE as an equivalent test.
Or you could even use a terminal emulator to do this test.

It's even remotely possible that there is an actual hardware
problem with the port.

Good luck. This sounds like a fun project!

	-- John





More information about the Squeak-dev mailing list