For the better part of my IT career I have mostly been a PC user. When using a USB to Serial Console cable it was as easy as buying one from a trustworthy vendor and installing the drivers. From there you just had to launch Putty and tell it to use Console.
Then when I moved over to OSX, it wasn’t as simple. I had to use the CLI to get it working!
I came across Greg Ferro’s, Serial Console on OSX.
Do you seriously have to list the directory contents of /dev/tty and look for your USB to serial adapter. Yep.
rowelldionicio$ ls -l /dev/tty.* crw-rw-rw- 1 root wheel 18, 0 May 10 20:42 /dev/tty.Bluetooth-Incoming-Port crw-rw-rw- 1 root wheel 18, 2 May 10 20:42 /dev/tty.Bluetooth-Modem crw-rw-rw- 1 root wheel 18, 8 May 14 09:53 /dev/tty.KeySerial1 crw-rw-rw- 1 root wheel 18, 10 May 14 09:53 /dev/tty.USA19H141P1.1
There it is.. /dev/tty.USA19H141P1.1
Okay great.. now every time I want to use it I have to type in the following command:
Then to exit you have to use the keyboard sequence control-A, then control-
Yeah.. I hate that.
I created an alias for something much easier. All you have to remember is the alias and the exit sequence. You want to perform the exit sequence to exit out of screen so you don’t leave a session alive.
cd ~ vi .bash_profile alias con='screen /dev/tty.USA19H141P1.1'
Save and exit. Be sure to replace anything after tty. to whatever is displayed for your USB to serial cable.
Exit out of shell and reopen a new session. Whenever I want to use my USB to serial cable all I have to type in is:
The cable I use with my Mac is Keyspan by Tripp lite USA-19HS.