[squeak-dev] Named serial ports

David T. Lewis lewis at mail.msen.com
Sat Sep 19 14:21:24 UTC 2009


On Fri, Sep 18, 2009 at 06:25:59PM -0300, Ricardo Moran wrote:
> Hi, I've been testing the patch for accessing named serial ports in Ubuntu
> 9.04 with an USB Arduino. I'm very grateful for this patch because it solves
> me a lot of problems.
> 
> Although it seems to be working fine, I have two questions:
> 
> 1) Is it possible to access the list of available serial ports? (The
> official arduino software lets you choose from a list of serial ports and I
> would like to do the same).

The plugin will not help with this, but you know the device names that you
are looking for, you can just do something like this:

  pattern := '*usb*'.
  (FileDirectory on: '/dev') fileNames
        select: [:e | pattern match: e]
        thenCollect: [:e | '/dev/', e]


> 2) The first time I open a port, it works fine. Then, if I close it and open
> it again, everytime I try #nextPutAll: I get a primitive fail. This happens
> with port numbers and with port names. The only workaround that I found is
> closing the Squeak image and open it again. Could it be a bug in the serial
> plugin?

I think it's fixed in the latest Subversion sources now.

Dave




More information about the Squeak-dev mailing list