October 24, 2008 2

Serial Terminal with OSX Leopard

By in SysAdmin

I’ve procured a few cisco devices for a network lab and needed serial console access. I don’t have any windows machines anymore so there was no teraterm or hyperterminal…. but I forgot about screen!

  1. Get a usb to serial cable – link
  2. Install driver – link
  3. Open Terminal

To make sure the USB to serial adapter is connected:

akonkol$ ls -l /dev/tty.*
crw-rw-rw- 1 root wheel 10, 0 Oct 24 23:08 /dev/tty.Bluetooth-Modem
crw-rw-rw- 1 root wheel 10, 2 Oct 24 23:08 /dev/tty.Bluetooth-PDA-Sync
crw-rw-rw- 1 root wheel 10, 4 Oct 24 23:09 /dev/tty.PL2303-000013FD

Now to start the terminal session:

akonkol$ screen /dev/tty.PL2303-000013FD

To quit the session press: control + a, then control + \

And of course for more info: akonkol$ man screen

I’ve created a simple bash script for this….

#!/bin/bash
# script to start screen with usb to serial adapter
# akonkol 2008-11-02

#VARIABLES

#adjust adapter filename for manuf (works for iogear)
adapter="/dev/tty.PL2303-000011FD"

if [ -a $adapter ]; then
    echo "*** Adapter $adapter exists ***"

    echo "*** Starting screen on $adapter ***"
    echo
    echo "Don't forget: control + a, control + \ to kill"
    sleep 5
    screen $adapter
else
        echo "!!! No Adapter Found !!!"

fi

#exit to parent shell
exit 0;

2 Responses to “Serial Terminal with OSX Leopard”

  1. avocado kid says:

    cool, thanks, this looks very useful!

  2. Ben says:

    Hi!

    After a lot of PL2303 driver installations… when I list it, they don’t appear in the list, I don’t understand why… even if the adaptor is connected… an idea?

    thanks
    Ben

Leave a Reply