[Pharo-project] Make arduino work on linux with cog vm
Hi Everybody. I'm just started with Pharo, and Arduino. And i like to comunicate both. I instaled the package sent by Ricardo Moran in a Pharo 1.4 with the Cogvm from the Jenkins server, but i can't make the serials port works. The Arduino board, i have, is connected to usb, wich ubuntu detects as /dev/ttyACM0. I tried opening serial ports, like this: sp:=SerialPort new. sp openPort: '/dev/ttyACM0'. sp openPort: 'ttyACM0'. sp openPort: 'ACM0'. sp openPort: '/ttyACM0'. But all they fail with a error saying ""Cannot open..." After that, i have also, tried this: (1 to: 10000) select:[:port | [SerialPort new openPort:port;close. true] on:Error do: [false]] and had a empty collection. And also tried giving full permissions to the port and executed the vm sudoed... Are serial ports working on ubuntu?. Do i have to download a special vm?. (I would like to do a demo of arduino on monday, at work, and i would like to do in Pharo.) Cheers, Mariano
Yes, that seems to be a CogVM problem. I tried it now and Cog cannot open the port but an old Squeak4.1 of 17 April 2010 [latest update: #9957] can. -- Pavel On Tue, Mar 20, 2012 at 8:30 PM, Mariano Vicente <m.vicent@gmail.com> wrote:
Hi Everybody.
I'm just started with Pharo, and Arduino. And i like to comunicate both. Â I instaled the package sent by Ricardo Moran in a Pharo 1.4 with the Cogvm from the Jenkins server, but i can't make the serials port works. The Arduino board, i have, is connected to usb, wich ubuntu detects as /dev/ttyACM0.
I tried opening serial ports, like this:
sp:=SerialPort new. sp openPort: '/dev/ttyACM0'.
sp openPort: 'ttyACM0'.
sp openPort: 'ACM0'.
sp openPort: '/ttyACM0'.
But all they fail with a error saying ""Cannot  open..." After that, i have also, tried this:
(1 to: 10000) select:[:port | [SerialPort new openPort:port;close. true] on:Error do: [false]]
and had a empty collection.
And also tried giving full permissions to the port and executed the vm sudoed...
Are serial ports working on ubuntu?. Do i have to download a special vm?. (I would like to do a demo of arduino on monday, at work, and i would like to do in Pharo.)
Cheers, Mariano
Thanks a lot. Could you send me a link with a old vm version? Sorry but I'm a newie with Pharo :P Cheers, Mariano On Tue, Mar 20, 2012 at 5:08 PM, Pavel Krivanek <pavel.krivanek@gmail.com>wrote:
Yes, that seems to be a CogVM problem. I tried it now and Cog cannot open the port but an old Squeak4.1 of 17 April 2010 [latest update: #9957] can.
-- Pavel
On Tue, Mar 20, 2012 at 8:30 PM, Mariano Vicente <m.vicent@gmail.com> wrote:
Hi Everybody.
I'm just started with Pharo, and Arduino. And i like to comunicate both. I instaled the package sent by Ricardo Moran in a Pharo 1.4 with the Cogvm from the Jenkins server, but i can't make the serials port works. The Arduino board, i have, is connected to usb, wich ubuntu detects as /dev/ttyACM0.
I tried opening serial ports, like this:
sp:=SerialPort new. sp openPort: '/dev/ttyACM0'.
sp openPort: 'ttyACM0'.
sp openPort: 'ACM0'.
sp openPort: '/ttyACM0'.
But all they fail with a error saying ""Cannot open..." After that, i have also, tried this:
(1 to: 10000) select:[:port | [SerialPort new openPort:port;close. true] on:Error do: [false]]
and had a empty collection.
And also tried giving full permissions to the port and executed the vm sudoed...
Are serial ports working on ubuntu?. Do i have to download a special vm?. (I would like to do a demo of arduino on monday, at work, and i would like to do in Pharo.)
Cheers, Mariano
Try VM from here: http://squeakvm.org/unix/ ...but you cannot use the latest Pharo image from CI server (because it is saved in CogVM). But you can try official 1.3. -- Pavel On Tue, Mar 20, 2012 at 9:21 PM, Mariano Vicente <m.vicent@gmail.com> wrote:
Thanks a lot.
Could you send me a link with a old vm version?
Sorry but I'm a newie with Pharo :P
Cheers, Mariano
On Tue, Mar 20, 2012 at 5:08 PM, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:
Yes, that seems to be a CogVM problem. I tried it now and Cog cannot open the port but an old Squeak4.1 of 17 April 2010 [latest update: #9957] can.
-- Pavel
On Tue, Mar 20, 2012 at 8:30 PM, Mariano Vicente <m.vicent@gmail.com> wrote:
Hi Everybody.
I'm just started with Pharo, and Arduino. And i like to comunicate both. Â I instaled the package sent by Ricardo Moran in a Pharo 1.4 with the Cogvm from the Jenkins server, but i can't make the serials port works. The Arduino board, i have, is connected to usb, wich ubuntu detects as /dev/ttyACM0.
I tried opening serial ports, like this:
sp:=SerialPort new. sp openPort: '/dev/ttyACM0'.
sp openPort: 'ttyACM0'.
sp openPort: 'ACM0'.
sp openPort: '/ttyACM0'.
But all they fail with a error saying ""Cannot  open..." After that, i have also, tried this:
(1 to: 10000) select:[:port | [SerialPort new openPort:port;close. true] on:Error do: [false]]
and had a empty collection.
And also tried giving full permissions to the port and executed the vm sudoed...
Are serial ports working on ubuntu?. Do i have to download a special vm?. (I would like to do a demo of arduino on monday, at work, and i would like to do in Pharo.)
Cheers, Mariano
On 20 March 2012 22:32, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:
Try VM from here: http://squeakvm.org/unix/ ...but you cannot use the latest Pharo image from CI server (because it is saved in CogVM). But you can try official 1.3.
I think a better alternative would be to fix VM and make it work. I assuming there's something wrong with SerialPlugin , which used by SerialPort, no? I can't remember if this plugin is included into VM by default or not..
-- Pavel
On Tue, Mar 20, 2012 at 9:21 PM, Mariano Vicente <m.vicent@gmail.com> wrote:
Thanks a lot.
Could you send me a link with a old vm version?
Sorry but I'm a newie with Pharo :P
Cheers, Mariano
On Tue, Mar 20, 2012 at 5:08 PM, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:
Yes, that seems to be a CogVM problem. I tried it now and Cog cannot open the port but an old Squeak4.1 of 17 April 2010 [latest update: #9957] can.
-- Pavel
On Tue, Mar 20, 2012 at 8:30 PM, Mariano Vicente <m.vicent@gmail.com> wrote:
Hi Everybody.
I'm just started with Pharo, and Arduino. And i like to comunicate both. Â I instaled the package sent by Ricardo Moran in a Pharo 1.4 with the Cogvm from the Jenkins server, but i can't make the serials port works. The Arduino board, i have, is connected to usb, wich ubuntu detects as /dev/ttyACM0.
I tried opening serial ports, like this:
sp:=SerialPort new. sp openPort: '/dev/ttyACM0'.
sp openPort: 'ttyACM0'.
sp openPort: 'ACM0'.
sp openPort: '/ttyACM0'.
But all they fail with a error saying ""Cannot  open..." After that, i have also, tried this:
(1 to: 10000) select:[:port | [SerialPort new openPort:port;close. true] on:Error do: [false]]
and had a empty collection.
And also tried giving full permissions to the port and executed the vm sudoed...
Are serial ports working on ubuntu?. Do i have to download a special vm?. (I would like to do a demo of arduino on monday, at work, and i would like to do in Pharo.)
Cheers, Mariano
-- Best regards, Igor Stasenko.
On Tue, Mar 20, 2012 at 10:46 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 20 March 2012 22:32, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:
Try VM from here: http://squeakvm.org/unix/ ...but you cannot use the latest Pharo image from CI server (because it is saved in CogVM). But you can try official 1.3.
I think a better alternative would be to fix VM and make it work.
I assuming there's something wrong with SerialPlugin , which used by SerialPort, no? I can't remember if this plugin is included into VM by default or not..
It is an internal plugin in CogVM -- Pavel
-- Pavel
On Tue, Mar 20, 2012 at 9:21 PM, Mariano Vicente <m.vicent@gmail.com> wrote:
Thanks a lot.
Could you send me a link with a old vm version?
Sorry but I'm a newie with Pharo :P
Cheers, Mariano
On Tue, Mar 20, 2012 at 5:08 PM, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:
Yes, that seems to be a CogVM problem. I tried it now and Cog cannot open the port but an old Squeak4.1 of 17 April 2010 [latest update: #9957] can.
-- Pavel
On Tue, Mar 20, 2012 at 8:30 PM, Mariano Vicente <m.vicent@gmail.com> wrote:
Hi Everybody.
I'm just started with Pharo, and Arduino. And i like to comunicate both. Â I instaled the package sent by Ricardo Moran in a Pharo 1.4 with the Cogvm from the Jenkins server, but i can't make the serials port works. The Arduino board, i have, is connected to usb, wich ubuntu detects as /dev/ttyACM0.
I tried opening serial ports, like this:
sp:=SerialPort new. sp openPort: '/dev/ttyACM0'.
sp openPort: 'ttyACM0'.
sp openPort: 'ACM0'.
sp openPort: '/ttyACM0'.
But all they fail with a error saying ""Cannot  open..." After that, i have also, tried this:
(1 to: 10000) select:[:port | [SerialPort new openPort:port;close. true] on:Error do: [false]]
and had a empty collection.
And also tried giving full permissions to the port and executed the vm sudoed...
Are serial ports working on ubuntu?. Do i have to download a special vm?. (I would like to do a demo of arduino on monday, at work, and i would like to do in Pharo.)
Cheers, Mariano
-- Best regards, Igor Stasenko.
On 21 March 2012 00:23, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:
On Tue, Mar 20, 2012 at 10:46 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 20 March 2012 22:32, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:
Try VM from here: http://squeakvm.org/unix/ ...but you cannot use the latest Pharo image from CI server (because it is saved in CogVM). But you can try official 1.3.
I think a better alternative would be to fix VM and make it work.
I assuming there's something wrong with SerialPlugin , which used by SerialPort, no? I can't remember if this plugin is included into VM by default or not..
It is an internal plugin in CogVM
ok, so we should fix it. :)
-- Pavel
-- Best regards, Igor Stasenko.
yes! so having a case where it works is good On Mar 21, 2012, at 3:05 AM, Igor Stasenko wrote:
On 21 March 2012 00:23, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:
On Tue, Mar 20, 2012 at 10:46 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 20 March 2012 22:32, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:
Try VM from here: http://squeakvm.org/unix/ ...but you cannot use the latest Pharo image from CI server (because it is saved in CogVM). But you can try official 1.3.
I think a better alternative would be to fix VM and make it work.
I assuming there's something wrong with SerialPlugin , which used by SerialPort, no? I can't remember if this plugin is included into VM by default or not..
It is an internal plugin in CogVM
ok, so we should fix it. :)
-- Pavel
-- Best regards, Igor Stasenko.
On Wed, Mar 21, 2012 at 3:05 AM, Igor Stasenko <siguctua@gmail.com> wrote:
On 21 March 2012 00:23, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:
On Tue, Mar 20, 2012 at 10:46 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 20 March 2012 22:32, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:
Try VM from here: http://squeakvm.org/unix/ ...but you cannot use the latest Pharo image from CI server (because it is saved in CogVM). But you can try official 1.3.
I think a better alternative would be to fix VM and make it work.
I assuming there's something wrong with SerialPlugin , which used by SerialPort, no? I can't remember if this plugin is included into VM by default or not..
It is an internal plugin in CogVM
ok, so we should fix it. :)
It seems that the CogVM has no implementation for primitive primitiveSerialPortOpenByName, only for primitiveSerialPortOpen. Can you look at it? -- Pavel
On Wed, Mar 21, 2012 at 11:34 AM, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:
On Wed, Mar 21, 2012 at 3:05 AM, Igor Stasenko <siguctua@gmail.com> wrote:
On 21 March 2012 00:23, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:
On Tue, Mar 20, 2012 at 10:46 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 20 March 2012 22:32, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:
Try VM from here: http://squeakvm.org/unix/ ...but you cannot use the latest Pharo image from CI server (because it is saved in CogVM). But you can try official 1.3.
I think a better alternative would be to fix VM and make it work.
I assuming there's something wrong with SerialPlugin , which used by SerialPort, no? I can't remember if this plugin is included into VM by default or not..
It is an internal plugin in CogVM
ok, so we should fix it. :)
It seems that the CogVM has no implementation for primitive primitiveSerialPortOpenByName, only for primitiveSerialPortOpen. Can you look at it?
-- Pavel
it can work even for primitiveSerialPortOpen with port defined by number but the VM supposes it will open classic /dev/ttySx port, not /dev/ttyUSBx port. See blessed/platforms/unix/plugins/SerialPlugin/sqUnixSerial.c line 24 static const char serialPortBaseNameDefault[] = "/dev/ttyS0"; I tried to change it to /dev/ttyUSB0 (the last character is removed) and it works... -- Pavel -- Pavel
On Wed, Mar 21, 2012 at 11:51 AM, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:
On Wed, Mar 21, 2012 at 11:34 AM, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:
On Wed, Mar 21, 2012 at 3:05 AM, Igor Stasenko <siguctua@gmail.com> wrote:
On 21 March 2012 00:23, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:
On Tue, Mar 20, 2012 at 10:46 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 20 March 2012 22:32, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:
Try VM from here: http://squeakvm.org/unix/ ...but you cannot use the latest Pharo image from CI server (because it is saved in CogVM). But you can try official 1.3.
I think a better alternative would be to fix VM and make it work.
I assuming there's something wrong with SerialPlugin , which used by SerialPort, no? I can't remember if this plugin is included into VM by default or not..
It is an internal plugin in CogVM
ok, so we should fix it. :)
It seems that the CogVM has no implementation for primitive primitiveSerialPortOpenByName, only for primitiveSerialPortOpen. Can you look at it?
-- Pavel
it can work even for primitiveSerialPortOpen with port defined by number but the VM supposes it will open classic /dev/ttySx port, not /dev/ttyUSBx port.
See blessed/platforms/unix/plugins/SerialPlugin/sqUnixSerial.c line 24 static const char serialPortBaseNameDefault[] Â = "/dev/ttyS0";
I tried to change it to /dev/ttyUSB0 (the last character is removed) and it works...
so you may do a workaround with something like ln -s /dev/ttyUSB0 /dev/ttyS0 and then open port by number SerialPort new openPort: 0. -- Pavel
On 21 March 2012 11:51, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:
On Wed, Mar 21, 2012 at 11:34 AM, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:
On Wed, Mar 21, 2012 at 3:05 AM, Igor Stasenko <siguctua@gmail.com> wrote:
On 21 March 2012 00:23, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:
On Tue, Mar 20, 2012 at 10:46 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 20 March 2012 22:32, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:
Try VM from here: http://squeakvm.org/unix/ ...but you cannot use the latest Pharo image from CI server (because it is saved in CogVM). But you can try official 1.3.
I think a better alternative would be to fix VM and make it work.
I assuming there's something wrong with SerialPlugin , which used by SerialPort, no? I can't remember if this plugin is included into VM by default or not..
It is an internal plugin in CogVM
ok, so we should fix it. :)
It seems that the CogVM has no implementation for primitive primitiveSerialPortOpenByName, only for primitiveSerialPortOpen. Can you look at it?
-- Pavel
it can work even for primitiveSerialPortOpen with port defined by number but the VM supposes it will open classic /dev/ttySx port, not /dev/ttyUSBx port.
See blessed/platforms/unix/plugins/SerialPlugin/sqUnixSerial.c line 24 static const char serialPortBaseNameDefault[] Â = "/dev/ttyS0";
I tried to change it to /dev/ttyUSB0 (the last character is removed) and it works...
hmm.. why it hardcoding the port names like that? is passing strings from language considered evil? :) (ranting, because i never looked at this code before )
-- Pavel
-- Best regards, Igor Stasenko.
On Wed, Mar 21, 2012 at 05:27:38PM +0100, Igor Stasenko wrote:
On 21 March 2012 11:51, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:
On Wed, Mar 21, 2012 at 11:34 AM, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:
On Wed, Mar 21, 2012 at 3:05 AM, Igor Stasenko <siguctua@gmail.com> wrote:
On 21 March 2012 00:23, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:
On Tue, Mar 20, 2012 at 10:46 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 20 March 2012 22:32, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:
Try VM from here: http://squeakvm.org/unix/ ...but you cannot use the latest Pharo image from CI server (because it is saved in CogVM). But you can try official 1.3.
I think a better alternative would be to fix VM and make it work.
I assuming there's something wrong with SerialPlugin , which used by SerialPort, no? I can't remember if this plugin is included into VM by default or not..
It is an internal plugin in CogVM
ok, so we should fix it. :)
It seems that the CogVM has no implementation for primitive primitiveSerialPortOpenByName, only for primitiveSerialPortOpen. Can you look at it?
-- Pavel
it can work even for primitiveSerialPortOpen with port defined by number but the VM supposes it will open classic /dev/ttySx port, not /dev/ttyUSBx port.
See blessed/platforms/unix/plugins/SerialPlugin/sqUnixSerial.c line 24 static const char serialPortBaseNameDefault[] ?? = "/dev/ttyS0";
I tried to change it to /dev/ttyUSB0 (the last character is removed) and it works...
hmm.. why it hardcoding the port names like that? is passing strings from language considered evil? :)
(ranting, because i never looked at this code before )
No need to rant, the fixes are in the interpreter VM and in Squeak, and there is a Mantis issue with background. I don't recall if the plugin changes were added to Cog yet. Sorry I can't give you the links right now, I also am in the middle of a "moving earthquake" and catching up via cell phone ;) dave
On Wed, Mar 21, 2012 at 1:35 PM, David T. Lewis <lewis@mail.msen.com> wrote:
On Wed, Mar 21, 2012 at 05:27:38PM +0100, Igor Stasenko wrote:
On 21 March 2012 11:51, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:
On Wed, Mar 21, 2012 at 11:34 AM, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:
On Wed, Mar 21, 2012 at 3:05 AM, Igor Stasenko <siguctua@gmail.com> wrote:
On 21 March 2012 00:23, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:
On Tue, Mar 20, 2012 at 10:46 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 20 March 2012 22:32, Pavel Krivanek <pavel.krivanek@gmail.com> wrote:
Try VM from here: http://squeakvm.org/unix/ ...but you cannot use the latest Pharo image from CI server (because it is saved in CogVM). But you can try official 1.3.
I think a better alternative would be to fix VM and make it work.
I assuming there's something wrong with SerialPlugin , which used by SerialPort, no? I can't remember if this plugin is included into VM by default or not..
It is an internal plugin in CogVM
ok, so we should fix it. :)
It seems that the CogVM has no implementation for primitive primitiveSerialPortOpenByName, only for primitiveSerialPortOpen. Can you look at it?
-- Pavel
it can work even for primitiveSerialPortOpen with port defined by number but the VM supposes it will open classic /dev/ttySx port, not /dev/ttyUSBx port.
See blessed/platforms/unix/plugins/SerialPlugin/sqUnixSerial.c line 24 static const char serialPortBaseNameDefault[] ?? = "/dev/ttyS0";
I tried to change it to /dev/ttyUSB0 (the last character is removed) and it works...
hmm.. why it hardcoding the port names like that? is passing strings from language considered evil? :)
(ranting, because i never looked at this code before )
No need to rant, the fixes are in the interpreter VM and in Squeak, and there is a Mantis issue with background. I don't recall if the plugin changes were added to Cog yet. Sorry I can't give you the links right now, I also am in the middle of a "moving earthquake" and catching up via cell phone ;)
Here is the link :) http://bugs.squeak.org/view.php?id=7266 Cheers, Richo
dave
excellent! Thanks for the information. On Mar 20, 2012, at 9:08 PM, Pavel Krivanek wrote:
Yes, that seems to be a CogVM problem. I tried it now and Cog cannot open the port but an old Squeak4.1 of 17 April 2010 [latest update: #9957] can.
-- Pavel
On Tue, Mar 20, 2012 at 8:30 PM, Mariano Vicente <m.vicent@gmail.com> wrote:
Hi Everybody.
I'm just started with Pharo, and Arduino. And i like to comunicate both. I instaled the package sent by Ricardo Moran in a Pharo 1.4 with the Cogvm from the Jenkins server, but i can't make the serials port works. The Arduino board, i have, is connected to usb, wich ubuntu detects as /dev/ttyACM0.
I tried opening serial ports, like this:
sp:=SerialPort new. sp openPort: '/dev/ttyACM0'.
sp openPort: 'ttyACM0'.
sp openPort: 'ACM0'.
sp openPort: '/ttyACM0'.
But all they fail with a error saying ""Cannot open..." After that, i have also, tried this:
(1 to: 10000) select:[:port | [SerialPort new openPort:port;close. true] on:Error do: [false]]
and had a empty collection.
And also tried giving full permissions to the port and executed the vm sudoed...
Are serial ports working on ubuntu?. Do i have to download a special vm?. (I would like to do a demo of arduino on monday, at work, and i would like to do in Pharo.)
Cheers, Mariano
On 21 March 2012 00:00, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
excellent!
what is so excellent in finding that something not works? :)
Thanks for the information.
On Mar 20, 2012, at 9:08 PM, Pavel Krivanek wrote:
Yes, that seems to be a CogVM problem. I tried it now and Cog cannot open the port but an old Squeak4.1 of 17 April 2010 [latest update: #9957] can.
-- Pavel
On Tue, Mar 20, 2012 at 8:30 PM, Mariano Vicente <m.vicent@gmail.com> wrote:
Hi Everybody.
I'm just started with Pharo, and Arduino. And i like to comunicate both. Â I instaled the package sent by Ricardo Moran in a Pharo 1.4 with the Cogvm from the Jenkins server, but i can't make the serials port works. The Arduino board, i have, is connected to usb, wich ubuntu detects as /dev/ttyACM0.
I tried opening serial ports, like this:
sp:=SerialPort new. sp openPort: '/dev/ttyACM0'.
sp openPort: 'ttyACM0'.
sp openPort: 'ACM0'.
sp openPort: '/ttyACM0'.
But all they fail with a error saying ""Cannot  open..." After that, i have also, tried this:
(1 to: 10000) select:[:port | [SerialPort new openPort:port;close. true] on:Error do: [false]]
and had a empty collection.
And also tried giving full permissions to the port and executed the vm sudoed...
Are serial ports working on ubuntu?. Do i have to download a special vm?. (I would like to do a demo of arduino on monday, at work, and i would like to do in Pharo.)
Cheers, Mariano
-- Best regards, Igor Stasenko.
On Mar 20, 2012, at 11:03 PM, Igor Stasenko wrote:
On 21 March 2012 00:00, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
excellent!
what is so excellent in finding that something not works? :)
yes because did you know it? No. So making sure that we are not ridiculous because we use the wrong env for a demo is important for me.
Thanks for the information.
On Mar 20, 2012, at 9:08 PM, Pavel Krivanek wrote:
Yes, that seems to be a CogVM problem. I tried it now and Cog cannot open the port but an old Squeak4.1 of 17 April 2010 [latest update: #9957] can.
-- Pavel
On Tue, Mar 20, 2012 at 8:30 PM, Mariano Vicente <m.vicent@gmail.com> wrote:
Hi Everybody.
I'm just started with Pharo, and Arduino. And i like to comunicate both. I instaled the package sent by Ricardo Moran in a Pharo 1.4 with the Cogvm from the Jenkins server, but i can't make the serials port works. The Arduino board, i have, is connected to usb, wich ubuntu detects as /dev/ttyACM0.
I tried opening serial ports, like this:
sp:=SerialPort new. sp openPort: '/dev/ttyACM0'.
sp openPort: 'ttyACM0'.
sp openPort: 'ACM0'.
sp openPort: '/ttyACM0'.
But all they fail with a error saying ""Cannot open..." After that, i have also, tried this:
(1 to: 10000) select:[:port | [SerialPort new openPort:port;close. true] on:Error do: [false]]
and had a empty collection.
And also tried giving full permissions to the port and executed the vm sudoed...
Are serial ports working on ubuntu?. Do i have to download a special vm?. (I would like to do a demo of arduino on monday, at work, and i would like to do in Pharo.)
Cheers, Mariano
-- Best regards, Igor Stasenko.
participants (6)
-
David T. Lewis -
Igor Stasenko -
Mariano Vicente -
Pavel Krivanek -
Ricardo Moran -
Stéphane Ducasse