[ENH] SerialPort, remember them?

David N. Smith (IBM) dnsmith at watson.ibm.com
Mon Sep 10 19:17:54 UTC 2001


Ken:

Doing some MIDI?

If you have a builtin modem, it can hold one serial port. I was able to use the serial code to dial a phone number and give various AT commands. Other than that I haven't used it.

Dave



At 17:46 -0600 9/9/01, Ken G. Brown wrote:
>Hi,
>I too am now playing with serial ports, both on my Mac at home and on a Windows 2000 machine at work...not having a whole lot of luck so far although I have managed on W2000 when the ports are connected by a null modem cable, to read on com2 what I've sent out on com1. So far am unable to similarly read from an external device.
>Can you give me any tips? Especially on my Mac as that is what I'm working on at the moment.
>Which is port 1 on Mac, the modem or the printer? Port 1 seems to open ok, but port 2 gives a primitive failed error.
>I see that your change set appears to be in the image (3.1Alpha4332).
>
>What I'm basically attempting to do at work is continuously read from an external device, splitting into different streams (displayed on separate windows) depending on a character received with the high bit set. eg if I receive a char hex 80, the following chars will get displayed on one window until an different char eg hex 81 gets received wherupon the following chars will get displayed on a second window. The intent is to be able to differentiate which part of the program, different debug statements are coming from via one port on an instrument.
>Thx for any and all help.
>  Ken
>
>At 20:04 -0400 on 2000/06/27,  David N. Smith \(IBM\) is rumored to have written:
>>Hi:
>>
>>I've been playing with serial ports on my Powerbook G3 and I discovered some not so nice actions in class SerialPort. If the port is in use elsewhere, trying to open it gets a Primitive Error.
>>
>>I'd rather have my code get back some indication that the port didn't open, so I made some small mods to SerialPort, which are attached. Basically, primitives used during open answer nil if they fail, and the open method answers nil also.
>>
>>Dave
>>Attachment converted: hd7600:SerialPortChanges.1.cs (TEXT/R*ch) (0001AA45)
>>_______________________________
>>David N. Smith
>>IBM T J Watson Research Center
>>Hawthorne, NY
>>_______________________________
>>Any opinions or recommendations
>>herein are those of the author and not of his employer.


-- 
_______________________________
David N. Smith
IBM T J Watson Research Center
Hawthorne, NY
dnsmith at watson.ibm.com




More information about the Squeak-dev mailing list