Serial Console Communication from Mac OS X

Serial cables and consoles are very important parts of a room full of servers and networking devices. They allow administration via command line, which I prefer for its depth and breadth of options. I use Mac OS X all the time. Since MacBooks don’t have serial ports, there has to be a way to still be able to make console connections. So you first need hardware. I have heard good things about Keyspan USB Serial adapter (USA-19HS). It has support for both Windows and Mac. Once you have installed drivers and plugged it in, you are good to go.

Now comes the software component. screen can be used to start a console session. But first you need to identify hardware. So run the following in Terminal.

ls /dev/tty.*

This will display devices, such as the Keyspan adapter. You will need the exact name of the device when using screen.

screen /dev/tty.xxxx datarate

where /dev/tty.xxxx stands for the device as shown when you did ls, and data rate is for the device you are connecting to. This should get you into the console of the device you are connecting to.

Hat tip: Serial Communication in OSX Terminal; Serial Com­mu­nic­a­tion in OSX Terminal; Openmoko USB serial with screen.

2 Responses to Serial Console Communication from Mac OS X

  1. John says:

    Hi, do you know how to make it buffer? Like when you’re reading a cisco config so you can scroll back, it seems to only hold the amount of lines that your terminal session is set at. thanks.

  2. John says:

    Nice, thank you for the info :)

    You can also do a apple script on this as well:

    tell application “Terminal”
    do script with command “screen /dev/tty.xxxx”
    set number of rows of window 1 to 100
    set number of columns of window 1 to 80
    set background color of window 1 to “black”
    set normal text color of window 1 to “green”
    set custom title of window 1 to “SerialOut”
    end tell