[Newbies] (no subject)

David T. Lewis lewis at mail.msen.com
Mon Feb 27 04:31:44 UTC 2012


On Sun, Feb 26, 2012 at 11:04:17AM -0800, Overcomer Man wrote:
> Dave,
> 
> Thanks, I was able to file out SerialPort from Squeak into Cuis.  I tried
> this code in a workspace:
> 
> | port oc |
> port := (SerialPort new) openPort: 'COM4'.
> oc := OrderedCollection new.
> port nextPutAll: '>01100'.
> oc add: port readString.
> oc add: port readString.
> oc add: port readString.
> port close.
> oc
> 
> Some data was sent out as indicated by an LED at the connection.
>  Unfortunately, the response was empty strings which is incorrect based on
> the off shelf software.  I tried adjusting the baud rate but that did not
> help.  Any suggestions?  Thank you.
> 
> Also, I'm interested in hooking the serial port code up to an application
> window like the original.  Can you please point me to a tutorial to learn
> how?  Eventually I want to migrate from simple text response to tables or
> graphs.

I'm afraid I have not ever used the serial interface on Squeak, I am
only familiar with it because I did some work to fix the plugin once.
Your best bet is to ask for help on the squeak-dev list, because a
number of people on that list have experience with this.

>From your description above (expecially the "blinking light" part),
I suspect you are close to having this working, but will need to
figure out whatever magic combination of buad rate, parity, etc
is required. Usually when working with a serial line protocol, if
you can see that data is going out (the blinking light), but the
gadget on the other end acts like it never saw any data, it's
most likely because some such setting was wrong and the gadget
was not able to read whatever you sent. I don't know what's involved
in setting the baud rate on a USB serial port on Windows, but some
further fiddling with that may help.

Try asking on squeak-dev, maybe someone on the list can offer some
advice.

Dave

> 
> ------------------
> 
> jinoh67,
> 
> > "To access IO device, use FFI"
> sounds like good advice but without more details I can't do it.  Can you
> refer me to a tutorial on using FFI?
> 
> Thanks,
> Kirk Fraser

> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners



More information about the Beginners mailing list