This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-06-25 05:52:44

MyraUK
New Scratcher
Registered: 2012-06-16
Posts: 6

Picoboard and Linux

We have an old laptop that we have given new life by installing Ubuntu 11.10 onto it. I would like to use it to demo some interesting things at an event at my children's primary school. I have managed to get WeDo working with Scratch on it, but I am not getting very far with the Picoboard. I found this page:

http://www.scratchguide.com/picoboard-on-linux/

and it says that I should use the dmesg command to get info. When he'd got his Picoboard working, he found in his dmesg output the following lines:

[451470.917714] USB Serial support registered for FTDI USB Serial Device
[451470.917840] usbcore: registered new interface driver ftdi_sio
[451470.917843] ftdi_sio: v1.5.0:USB FTDI Serial Converters Driver

When I look at my dmesg output, I get

[ 6383.947211] usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB0
[ 6383.947242] usbcore: registered new interface driver ftdi_sio
[ 6383.947245] ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver
[ 6959.563912] generic-usb 0003:0694:0003.0002: implement() called with too large value -128! (scratch_squeak_)

and that's the end of that bit of the dmesg output. Does anybody have any idea what might have caused this error or how I could correct it?

Offline

 

#2 2012-06-26 05:30:13

MyraUK
New Scratcher
Registered: 2012-06-16
Posts: 6

Re: Picoboard and Linux

OK, I got this working, with the help of my very able husband. It turned out to be a permissions problem. I will describe how we found and solved the problem here, in case it proves useful to anyone else.

First, to check if the Picoboard was being recognized correctly, we did (in a terminal window)

tail -f /var/log/syslog

in order to monitor what was happening with the system, then plugged in the Picoboard. Some new lines were printed out, the last 3 of where were something like:

....FTDI USB Serial Device converter now attached to ttyUSB0
....bus: 5, device was not an MTP device
....WPA: Group rekeying completed with <lots of numbers>

Hubby said this looked good, so we thought we'd try to get Scratch to tell us what was going on. We started Scratch not from a GUI, but just by typing "scratch" into a terminal window, not even putting it into the background. That way any error messages would be printed to the terminal.

I plugged in the Picoboard and brought up the ScratchBoard watcher. The terminal window now said

Error opening serial port /dev/ttyUSB0 - permissions denied(13).

So we did

ls -l /dev/ttyUSB0

and it said

crw-rw---- 1 root dialout 188, 0 2012-06-26 1-:15 /dev/ttyUSB0

Ah, ha! I (myra) don't have read or write permissions for this file. But the "dialout" group does. So the solution was to add me to the dialout group. So we did

sudo vi /etc/group

(replace vi with your favourite editor). The dialout line looked like this:

dialout:x:20:skr

(skr is hubby). I changed it to add me:

dialout:x:20:skr,myra

Then I logged out and back into the computer to allow the group changes to take effect, then the next time I started Scratch it worked! Hooray!

Now I have Lego WeDo and the Picoboard working on my Linux laptop.

Offline

 

Board footer