USB Serial Device on a Mac/OSX
31 May 2010
Getting serial on my Mac has been something I’ve wanted to get going for awhile, but like my blog and my time….
How to get a serial port up and running on my OSX laptop?
Most USB serial devices are exactly the same or at least they are built up from FTDI or compatible chips that you can find here at ftdichip.com. In fact, that’s a great site to buy exactly what you need, though I bought my locally. Therefore drivers for pretty much any of the sources are the same or similar. I have seen bad performing devices, so perhaps there are some low-level firmware tricks, but mostly one doesn’t need to know about those hardware/firmware implementation details and just find a good and fast device.
I have a device that is manufactured by Tripplite that looks and is typical to ones from other manufacturers.
“PL2303 USB to Serial Driver for Mac OS X. It supports different manufacturers of PL2303 based USB to serial dongles like ATEN, IOData, Elcom, Itegno, Ma620, Ratoc, Tripp, Radioshack, Dcu10, SiteCom, Alcatel, Samsung, Siemens, Syntech, Nokia, MS3303H”
So was it hard to get running on OSX? No. Knowing some tricks is helpful, or really only one trick. Connect pins 2 and 3 of the serial port device which connects the RX and TX pins (aka receive/data-in and transmit/data-out serial) to test it out. Here are the steps:
- Download the device installer of an OSX open source driver from sourceforge.org (http://sourceforge.net/projects/osx-pl2303/). Run it.
- You can ignore the network configuration depending on your intended use or at least to test your device/install.
- Find the device name by opening up a Terminal window and typing ‘ls /dev/tty.’ to see all of the serial ports available. Hopefully, there are many and it’s obvious which is likely.
- Once you have the name and pins 2 & 3 connected you can open up port with ‘screen your-device-name-here 9600’. The 9600 is for 9600 baud.
- Start typing in that window and you should see the characters type echo on the screen, disconnect the pins 2 & 3 and the characters will stop, since the TX pin is no longer sending them back into the RX pin.
- If that works, you’re up and running. If not, make sure you didn’t make any mistakes and try again. Try another USB port (your device name will likely change). One can also try the device on a Windows machine with Hyperterminal, just to make sure it works.