Thursday, April 09, 2009

simpler alternative to minicom

Tired of setting up and switching ports in minicom and want something simple? welcome to picocom

setup a script such as ~/bin/ttyUSB0
picocom -f n -p n -b 115200 -i -r -l /dev/ttyUSB0

and next time, just run ttyUSB0 and viola u have a terminal.. ctrl+a followed by ctrl+q quits..


Anonymous said...

If you don't mind to use X, there's also a nice alternative: gtkterm


Nishanth Menon said...

ofcourse... picocom is useful esp if you are using putty to ssh into the machine ;)...

Rsh said...

thanks for the picocom advice, it's a savior from the vicious minicom. ;p

Nishanth Menon said...

if you just want to look at output,
using stty and direct file access
stty --save -F /dev/ttyUSB0
This gives you the settings which you can use to reprogram the tty at a later point of time. so my fav technique is to first use minicom to set everything up, dump with stty as above..

I=`sudo stty --save -F /dev/ttyUSB0`
stty -F /dev/ttyUSB0 $I

now to dump the serial port:
cat /dev/ttyUSB0

or write to serial port:
echo "ls">/dev/ttyUSB0

Peter Teoh said...

Thank you for your posting. After reading and trying it, yes, much better than minicom. Minicom truncate the boot env variables of my freescale board ("printenv" output), which has very long env variables.

Nishanth Menon said...

minicom has an option to do line wrap if you like - ctrl+a w