In order to access some embedded system, network equipments, wifi routers, I usually need to use serial communication programs like kermit, minicom.

However, I usually need to access to different devices with different baud rate. So, I wrote some scripts for helping me.

The first one is, which get the options from environment variable. It’s using /dev/ttyUSB0 by default, and 9600 as baud rate. If you want to use differnt device name, just type

$ # using default
$ DEVICE=/dev/ttyUSB1 SPEED=115200

The script will also save a session log in /tmp, it will show you the filename after you exit from the terminal. However, since kermit is not free. (because it ask developers who make modifications send back the chages). I also wrote another script for minicom.

This is a tip for Debian GNU/Linux.

  • Mat

    延伸功能可加上 runscript 給 minicom 吃:

    cat > ${SCRIPTFILE} <<EOF

    expect {
    send “my_username”

    expect {
    ” password:”
    send “my_password”


    然後加到 minicom 的參數後面
    LANG=en_US.UTF8 /usr/bin/minicom -o -c off -8 -C ${LOGFILE} -S $SCRIPTFILE tmp