Serial Console on OSX
13 April, 2008 by Greg Ferro Print Posting
Serial Communication in OSX Terminal
I knew it had to be possible to view serial data in the OSX terminal window, but I’m not enough of a unix geek to figure it out. Finally, a little googling told me what I needed to know. Here’s how to read and send serial data from the terminal in OSX. (just like hyperterminal on windows)
I bought a USB Serial port that had MAC drivers. Check before you buy it that it has drivers. Not all USB Serial have MAC support. I assume that you have installed the correct drivers from here.
First, open Terminal (Applications/Utilities/Terminal). Next, type
ls /dev/tty.*
to get a list of your serial lines. Pick the one that you want to open. For example, my list looks like this:
gf:dev gf$ ls -al tty.*
crw-rw-rw- 1 root wheel 18, 4 Jan 25 07:32 tty.Bluetooth-Modem
crw-rw-rw- 1 root wheel 18, 8 Jan 25 07:32 tty.Bluetooth-PDA-Sync
crw-rw-rw- 1 root wheel 18, 10 Jan 25 09:20 tty.PL2303-0000103D
crw-rw-rw- 1 root wheel 18, 0 Jan 25 07:32 tty.SerialPort-1
gf:dev gf$
And I know /dev/tty.PL2303-0000103D is the USB-to-serial adaptor becuase it’s connected, if you unplug it the tty.PL2303-0000103D stops being listed.
Knowing the serial port, you can just type screen portname datarate to show the serial data on the screen. In my case, it was:
screen /dev/tty.PL2303-0000103D 9600
To quit the screen app, type control-A, then control-\.
Postscript
I don’t think that this is very complete, but it worked for me and might help you to get your USB serial working. Please let me know if there anything I can add to complete this piece.












I bought the keyspan serial adapter and it had a CD with MAC drivers. Installed it, plugged in the keyspan to a switch and fired up Zterm. Zterm gave me a drop down of options on how to connect. Key was one of the options. I chose it and was connected. I too stumbled around for a few days before i got it working.
Brandon
I am sure that some people know how to do this, but for me, I had to work at it a little bit. There are some days when I just wish my first job was with *nix, my life would have been much simpler.
Note that the short form of “Macintosh” is not a TLA.
Sadly no. But I like the idea