Issue 3599 in pharo: Serial Port

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue 3599 in pharo: Serial Port

pharo
Status: Accepted
Owner: [hidden email]
Labels: Milestone-1.3

New issue 3599 by [hidden email]: 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

Reply | Threaded
Open this post in threaded view
|

Re: Issue 3599 in pharo: Serial Port

pharo

Comment #1 on issue 3599 by [hidden email]: Serial Port
http://code.google.com/p/pharo/issues/detail?id=3599

see 1057


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3599 in pharo: Serial Port

pharo

Comment #2 on issue 3599 by [hidden email]: 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.


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3599 in pharo: Serial Port

David T. Lewis
In reply to this post by pharo
On Wed, Jan 26, 2011 at 03:09:14PM +0000, [hidden email] wrote:

> Status: Accepted
> Owner: [hidden email]
> Labels: Milestone-1.3
>
> New issue 3599 by [hidden email]: 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
<[hidden email]> and I helped with some of the integration.
Anything that I did is MIT licensed.

HTH,
Dave


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3599 in pharo: Serial Port

SergeStinckwich
On Fri, Jan 28, 2011 at 9:12 AM, David T. Lewis <[hidden email]> wrote:

> On Wed, Jan 26, 2011 at 03:09:14PM +0000, [hidden email] wrote:
>> Status: Accepted
>> Owner: [hidden email]
>> Labels: Milestone-1.3
>>
>> New issue 3599 by [hidden email]: 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
> <[hidden email]> 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/

Reply | Threaded
Open this post in threaded view
|

Fwd: Issue 3599 in pharo: Serial Port

SergeStinckwich
---------- Forwarded message ----------
From: Séverin Lemaignan <[hidden email]>
Date: 2011/1/28
Subject: Re: [Pharo-project] Issue 3599 in pharo: Serial Port
To: Serge Stinckwich <[hidden email]>
Cc: [hidden email]


> 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:

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 - [hidden email]
 [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/

Reply | Threaded
Open this post in threaded view
|

Re: Issue 3599 in pharo: Serial Port

pharo
In reply to this post by pharo
Updates:
        Status: Closed

Comment #3 on issue 3599 by [hidden email]: Serial Port
http://code.google.com/p/pharo/issues/detail?id=3599

(No comment was entered for this change.)


Reply | Threaded
Open this post in threaded view
|

Re: Issue 3599 in pharo: Serial Port

David T. Lewis
In reply to this post by SergeStinckwich
On Fri, Jan 28, 2011 at 09:33:50AM +0700, Serge Stinckwich wrote:

> On Fri, Jan 28, 2011 at 9:12 AM, David T. Lewis <[hidden email]> wrote:
> > On Wed, Jan 26, 2011 at 03:09:14PM +0000, [hidden email] wrote:
> >> Status: Accepted
> >> Owner: [hidden email]
> >> Labels: Milestone-1.3
> >>
> >> New issue 3599 by [hidden email]: 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
> > <[hidden email]> 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.

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

>
> 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/