Studio Contrechoc

design & textile & technology entries

Linux Ubuntu…serial things

Being relatively new to linux and having a double boot on my MACBOOK, MACOS and XP, I configured finally an old laptop with Ubuntu 9.10.

Then using the Synaptic I installed the python things I needed: numpy and scipy. I had to install ImageTK too to run

then get nearer to the serial ports:
using synaptic you can install setserial.

(is this really needed? Later I found sstty: )

then I found this link:

usefull commands are (in the terminal window):
sudo chmod 777 fileName to give all rights to fileName, asking for the admin or root password

then listing the ports:
ls /dev/tty*

$ dmesg | grep tty
like in the linked page, this gives info on tty0

returning to setserial:
setserial -g /dev/ttyS[012345] (“info about how the device driver is configured for your ports”)
give a list of possible ports… not so much as ls /dev/tty* because these are not physical ports.
setting the portspeed…i still have to find that one.

Back to stty:
stty -a immediately gives the portspeed
$man stty gives the control possibilities:
“number      Set terminal baud rate to the number given, if possible.  If
the baud rate is set to zero, modem control is no longer

which means setting to 9600: stty 9600
% stty -F /dev/ttyUSB0 57600 for the specified port

For the rest I found this page: talking to the arduino ( apparently a virtual serial port)

From this I read something about “screen”, to get the serial data from arduino/atmega
$ screen /dev/ttyUSB0 57600 opens a port a that indicated speed

this is a useful page for starters with linux like me…:

about file permissions:

related: terminal commands and examples for MACOS:
This helped me with a locked USB stick (read only)
in the terminal: diskutility eraseDisk UFS UntitledUFS disk1
after you have found the “disk1” with (in the terminal):diskutil list

now on MACOS there is “the same” terminal. Here is a link to all the commands:






Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: