Discussion:
[Pharo-project] Issue 3599 in pharo: Serial Port
(too old to reply)
pharo
2011-01-26 15:09:14 UTC
Permalink
Status: Accepted
Owner: stephane... at gmail.com
Labels: Milestone-1.3

New issue 3599 by stephane... at gmail.com: Serial Port
http://code.google.com/p/pharo/issues/detail?id=3599

Hello
We are developing software to interact with small robots for educational
purposes. To do this we need to use the serial port. SerialPort class that
includes Pharo does not work on mac or linux, because it?s not able to
open ports by name.
It would be interesting that future versions include a SerialPort that
would work in these circumstances. we are using since a time a?go the
plugin that comes with Scratch, with this we just copy the plugins in the
folder of the VM, the Plugin that comes with the VM Scrath, and add to the
image of the image classes of Scratch , ScratchPlugin and SerialPort2.Up to
date this has worked on all VM including the latest Cog.
It works on Linux, Mac or Windows.We wory that future versions will lose
support.

One important question is what is the license of scratch

Then in addition I know that there is a fix made by serge for SerialPort
pharo
2011-01-26 15:17:19 UTC
Permalink
Comment #1 on issue 3599 by stephane... at gmail.com: Serial Port
http://code.google.com/p/pharo/issues/detail?id=3599

see 1057
pharo
2011-01-26 15:24:25 UTC
Permalink
Comment #2 on issue 3599 by ryd... at gmail.com: Serial Port
http://code.google.com/p/pharo/issues/detail?id=3599

Hasn't mr. Schwab been talking about this too?

The scratch source code license is available as part of the download at
http://info.scratch.mit.edu/Source_Code.
Afaict it's not MIT compatible, since it contains both non-commercial and
copyleft clauses for derived works.
David T. Lewis
2011-01-28 02:12:36 UTC
Permalink
Post by pharo
Status: Accepted
Owner: stephane... at gmail.com
Labels: Milestone-1.3
New issue 3599 by stephane... at gmail.com: Serial Port
http://code.google.com/p/pharo/issues/detail?id=3599
Hello
We are developing software to interact with small robots for educational
purposes. To do this we need to use the serial port. SerialPort class that
includes Pharo does not work on mac or linux, because it?s not able to
open ports by name.
FYI, the primitives for named serial ports are now in the standard VM
(maybe not yet in Cog, but it is a small change). If someone would like
to test on a Linux platform, try using any recent build of the standard
VM or use the latest 4.4.7.2357 unix VM from http://squeakvm.org/unix/.

The image changes to SerialPort are simple. You can either copy changes
from Squeak or get the orginal change sets from the Mantis report at
http://bugs.squeak.org/view.php?id=7266.

The named serial port work was contributed by Severin Lemaignan
<severin.lemaignan at laas.fr> and I helped with some of the integration.
Anything that I did is MIT licensed.

HTH,
Dave
Serge Stinckwich
2011-01-28 02:33:50 UTC
Permalink
Post by David T. Lewis
Post by pharo
Status: Accepted
Owner: stephane... at gmail.com
Labels: Milestone-1.3
New issue 3599 by stephane... at gmail.com: Serial Port
http://code.google.com/p/pharo/issues/detail?id=3599
Hello
We are developing software to interact with small robots for educational
purposes. To do this we need to use the serial port. SerialPort class that
includes Pharo does not work on mac or linux, because it?s not ?able to
open ports by name.
FYI, the primitives for named serial ports are now in the standard VM
(maybe not yet in Cog, but it is a small change). If someone would like
to test on a Linux platform, try using any recent build of the standard
VM or use the latest 4.4.7.2357 unix VM from http://squeakvm.org/unix/.
The image changes to SerialPort are simple. You can either copy changes
from Squeak or get the orginal change sets from the Mantis report at
http://bugs.squeak.org/view.php?id=7266.
The named serial port work was contributed by Severin Lemaignan
<severin.lemaignan at laas.fr> and I helped with some of the integration.
Anything that I did is MIT licensed.
Hi David,

there is a issue in the Pharo bug tracker since several months for the
integration of this changes into Pharo here:
http://code.google.com/p/pharo/issues/detail?id=1057

Could we integrate these changes in 1.2 as there is no licence problems at all.
David and S?verin could you sign the licence agreement, just to be
sure everything is ok.

The quality of the code is not really good, there is a lot of isString
everywhere in order to test if the port is a number or a string
regarding the OS platform used:

SerialPort>>close
"Close the serial port. Do nothing if the port is not open."
port
ifNotNil: [port isString ifTrue:[self primClosePortByName: port]
ifFalse:[self primClosePort:port]].
port := nil

I think we need to polish it in order maybe to use only strings. Why
not used string like 'COM1' for a windows platform and '/dev/ttyS*'
for Linux ? Any comments about that ?

Regards,
--
Serge Stinckwich
UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam
Every DSL ends up being Smalltalk
http://doesnotunderstand.org/
Serge Stinckwich
2011-01-28 10:39:58 UTC
Permalink
---------- Forwarded message ----------
From: S?verin Lemaignan <severin.lemaignan at laas.fr>
Date: 2011/1/28
Subject: Re: [Pharo-project] Issue 3599 in pharo: Serial Port
To: Serge Stinckwich <serge.stinckwich at gmail.com>
Cc: Pharo-project at lists.gforge.inria.fr
Post by Serge Stinckwich
The quality of the code is not really good, there is a lot of isString
everywhere in order to test if the port is a number or a string
I did so to avoid to break anything that could already used the com
port with integers.
If you're confident it's not used (or if it is easy enough to convert
it to 'com1', 'com2' strings...) then feel free to remove support for
integer.

As far as I remember, the underlying system primitive should be able
to deal with 'comX' on Windows.

Regards,
Severin

--
? ? ? ? S?verin Lemaignan - severin.lemaignan at laas.fr
?[00] ? ?PhD student on Cognitive Robotics
/|__|\ ? LAAS-CNRS - RIS group / Technische Uni M?nchen - IAS group
?'' ? ? +33561337844 / +498928917780
? ? ? ? http://www.laas.fr/~slemaign
--
Serge Stinckwich
UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam
Every DSL ends up being Smalltalk
http://doesnotunderstand.org/
David T. Lewis
2011-01-30 15:47:15 UTC
Permalink
Post by Serge Stinckwich
Post by David T. Lewis
Post by pharo
Status: Accepted
Owner: stephane... at gmail.com
Labels: Milestone-1.3
New issue 3599 by stephane... at gmail.com: Serial Port
http://code.google.com/p/pharo/issues/detail?id=3599
Hello
We are developing software to interact with small robots for educational
purposes. To do this we need to use the serial port. SerialPort class that
includes Pharo does not work on mac or linux, because it?s not ?able to
open ports by name.
FYI, the primitives for named serial ports are now in the standard VM
(maybe not yet in Cog, but it is a small change). If someone would like
to test on a Linux platform, try using any recent build of the standard
VM or use the latest 4.4.7.2357 unix VM from http://squeakvm.org/unix/.
The image changes to SerialPort are simple. You can either copy changes
from Squeak or get the orginal change sets from the Mantis report at
http://bugs.squeak.org/view.php?id=7266.
The named serial port work was contributed by Severin Lemaignan
<severin.lemaignan at laas.fr> and I helped with some of the integration.
Anything that I did is MIT licensed.
Hi David,
there is a issue in the Pharo bug tracker since several months for the
http://code.google.com/p/pharo/issues/detail?id=1057
Could we integrate these changes in 1.2 as there is no licence problems at all.
David and S?verin could you sign the licence agreement, just to be
sure everything is ok.
Just to be clear, the status of named serial port support is:
- VM support for named serial ports is present in the standard VM.
- VM support for named serial ports is not yet included in Cog.
- Pharo developers should IMO include S?verin's SerialPort changes,
but I am not involved in this and there are no changes to SerialPort
with my author initials either in Squeak or in the change sets on
Mantis 7266.

HTH,
Dave
Post by Serge Stinckwich
The quality of the code is not really good, there is a lot of isString
everywhere in order to test if the port is a number or a string
SerialPort>>close
"Close the serial port. Do nothing if the port is not open."
port
ifNotNil: [port isString ifTrue:[self primClosePortByName: port]
ifFalse:[self primClosePort:port]].
port := nil
I think we need to polish it in order maybe to use only strings. Why
not used string like 'COM1' for a windows platform and '/dev/ttyS*'
for Linux ? Any comments about that ?
Regards,
--
Serge Stinckwich
UMI UMMISCO 209 (IRD/UPMC), Hanoi, Vietnam
Every DSL ends up being Smalltalk
http://doesnotunderstand.org/
pharo
2011-01-29 12:37:00 UTC
Permalink
Updates:
Status: Closed

Comment #3 on issue 3599 by stephane... at gmail.com: Serial Port
http://code.google.com/p/pharo/issues/detail?id=3599

(No comment was entered for this change.)
Loading...