Ubuntu/Debian Serial Terminal
From BUG Wiki
Contents |
gtkterm or minicom
You may use either gtkterm or minicom. GtkTerm is a happy GUI-configurable serial terminal. It comes with Gutsy. Drawbacks: doesn't allow you to change the buffer-line length, and you can't scroll back into the buffer like you can with a terminal. </font>
GtkTerm
To run it with Ubuntu, just type gtkterm in a terminal window, or Alt+F2 and type in gtkterm. Configure the port to /dev/ttyUSB0 and the speed to 115200. Leave the rest as it is. Note, you may only have one gtkterm or minicom session open at a time or the OS will begin sending the char data to both processes and things will get garbled.
minicom
Download and install
minicom is more robust for serial terminal use. Use minicom if you're going to be doing more than just editing a few kernel options. We will require lrzsz to get minicom talking to the BUGbase.
sudo apt-get install lrzsz ... ... sudo apt-get install minicom
Configure minicom
After lrzsz and minicom are installed, you'll need to configure minicom to communicate on the correct port at the correct data rate.
minicom -s
Select "Serial port setup" from the configuration menu.
+-----[configuration]------+
| Filenames and paths |
| File transfer protocols |
| Serial port setup |
| Modem and dialing |
| Screen and keyboard |
| Save setup as dfl |
| Save setup as.. |
| Exit |
| Exit from Minicom |
+--------------------------+
Change your options to look like those below.
+-----------------------------------------------------------------------+
| A - Serial Device : /dev/ttyUSB0 |
| B - Lockfile Location : /var/lock |
| C - Callin Program : |
| D - Callout Program : |
| E - Bps/Par/Bits : 115200 8N1 |
| F - Hardware Flow Control : No |
| G - Software Flow Control : No |
| |
| Change which setting? |
+-----------------------------------------------------------------------+
| Screen and keyboard |
| Save setup as dfl |
| Save setup as.. |
| Exit |
| Exit from Minicom |
+--------------------------+
Hit esc to return to the menu after the changes are made. Select "Save setup as dfl"
+-----[configuration]------+
| Filenames and paths |
| File transfer protocols |
| Serial port setup |
| Modem and dialing |
| Screen and keyboard |
| Save setup as dfl |
| Save setup as.. |
| Exit |
| Exit from Minicom |
+--------------------------+
+-----------------------+
| |
+-----[configura| Configuration saved |
| Filenames and | |
| File transfer +-----------------------+
| Serial port setup |
| Modem and dialing |
| Screen and keyboard |
| Save setup as dfl |
| Save setup as.. |
| Exit |
| Exit from Minicom |
+--------------------------+
Select Exit from Minicom.
Using minicom with the BUG
Plug it in
- Plug the HandyLink side into your BUGbase.
- Plug the USB end into your PC.
Running minicom
minicom will attempt to configure the "modem" when it starts. To prevent this, pass in the -o paramater to minicom when starting. By default lines too long to display in the terminal window will not wrap to the next line. to enable this, pass minicom the -w paramater. Plug the port into the bug and off you go.
minicom -ow
Ow! owow!
Minicom Welcome Screen
When you start minicom you will be greeted with the screen below.
Welcome to minicom 2.2
OPTIONS: I18n Compiled on Apr 27 2007, 15:50:20. Port /dev/ttyUSB0
Press CTRL-A Z for help on special keys
Hit Enter or Return a few times and you should see the shell:
root@BUG / # root@BUG / # root@BUG / # root@BUG / #
You can now interact with the BUG as you see fit! Check to see what processes are running:
root@BUG / # ps aux Using fallback suid method PID Uid VmSize Stat Command 1 root 584 S init 2 root SWN [ksoftirqd/0] 3 root SW [watchdog/0] 4 root SW< [events/0] 5 root SW< [khelper] 6 root SW< [kthread] 53 root SW< [kblockd/0] 54 root SW< [cqueue/0] 56 root SW< [mxc_spi.1] 62 root SW< [mxc_spi.2] 65 root SW< [ksuspend_usbd] 68 root SW< [khubd] 70 root SW< [kseriod] 85 root SW [pdflush] 86 root SW [pdflush] 87 root SW< [kswapd0] 88 root SW< [aio/0] 713 root SW [mtdblockd] 729 root SW< [kmmcd] 739 root SW [mmcqd] 742 root SW< [kjournald] 755 root 452 S < udevd --daemon 1570 root 580 S /sbin/syslogd 1572 root 1260 S /sbin/klogd 1591 root 576 S /usr/sbin/inetd 1594 root 532 S /usr/sbin/dropbear 1685 root 1232 S /usr/X11R6/bin/Xipaq :0 -ac -mouse /dev/input/bmi_lcd 1733 root 1564 S twm -display :0 -f /root/.twmrc 1739 root 1364 S xeyes -geometry 40x28+260+5 -display :0 1756 root 720 S /bin/sh /etc/rc.d/init.d/concierge start 1758 root 564 S /bin/sh /etc/rc.d/rc.local 1761 root 1192 S -sh 1762 root 9664 S /opt/phoneme_adv-revUNKNOWN/bin/cvm -cp osgi.jar:ch.e 2069 root 404 S sleep 60 2070 root 588 R ps aux
minicom command summary
To interact with minicom, hit Ctrl+A:
CTRL-A Z for help |115200 8N1 | NOR | Minicom 2.2 | VT102 | Offline
To access the menu below, hit CTRL+A Z
+-------------------------------------------------------------------+
| Minicom Command Summary |
| |
| Commands can be called by CTRL-A <key> |
| |
| Main Functions Other Functions |
| |
| Dialing directory..D run script (Go)....G | Clear Screen.......C |
| Send files.........S Receive files......R | cOnfigure Minicom..O |
| comm Parameters....P Add linefeed.......A | Suspend minicom....J |
| Capture on/off.....L Hangup.............H | eXit and reset.....X |
| send break.........F initialize Modem...M | Quit with no reset.Q |
| Terminal settings..T run Kermit.........K | Cursor key mode....I |
| lineWrap on/off....W local Echo on/off..E | Help screen........Z |
| Paste file.........Y | scroll Back........B |
| |
| Select function or press Enter for none. |
| |
| Written by Miquel van Smoorenburg 1991-1995 |
| Some additions by Jukka Lahtinen 1997-2000 |
| i18n by Arnaldo Carvalho de Melo 1998 |
+-------------------------------------------------------------------+
Troubleshooting
Multipe minicom sessions will cause the OS to divert the output from /dev/USB0 to different processes. Don't do it.
Sometimes the device comes up as /dev/ttyUSB1. If you try starting minicom and it just starts and returns to the shell, this is probably why. Try either unplugging and plugging back in the USB plug, or check to see where the node is listed by typing ls /dev/ttyU and hitting tab to see what comes up. Reconfigure minicom as above, replacing /dev/ttyUSB0 with /dev/ttyUSB#.
