USB-to-Serial console for Mac (OSX)

Home / Apple / USB-to-Serial console for Mac (OSX)

Here are some notes for those of us working with Macs, who also have to deal with networking gear that usually have a serial console for local control. I recently purchased a IOGEAR USB 1.1 to Serial Converter Cable that uses the PL2303 chipset (pretty much any brand of these usb to serial converters use this chip). I was hoping that this dongle would allow me to access our network switches serial interface (which you kinda need when the switch has gone berserk). So after looking around the net I found that there is a opensource driver out there for it and that it performs better than the driver provided by Prolific (the company that manufactures the chip). So once everything was installed I hooked up the serial cable and realized that I needed a serial console program.

This turned out to be quite a pain since almost all of these programs for the mac are old and/or not free. Well, that was until I found out that our good friend screen can do this just fine:

screen /dev/tty.PL2303-0000101D 9600
where /dev/tty.PL2303-0000101D is the device for the dongle (easy to find….just do a ls -l /dev/tty.* and pick the one with PL2303 in the name). The baudrate is 9600 in case you haven’t guessed it already.

This will open up a new screen session in your xterm/terminal and from there you can control your serial device. Once you’re done you need to issue the command Ctrl-a Ctrl-\ to get out of screen and back to your shell prompt.

39 Comments

  • obilix

    ahh prolfic..just terrific, not! Their drivers truely suck! have to reboot the system if you run the coms at greater 56Kbps or I get kernel panics often as their driver locks up the kernel! Even the opensource one isn’t really hot either.

    Having gone through my fair share of usb-serial adapters, the best ones to buy are either:
    o) from Keyspan (really good!)
    o) or those companies which uses FTDI chipset.

    For which, one of the JTAG units i have uses the FTDI D2XX driver. And FTDI actively supports Mac OS X. As well, the FTDI chip actually has real modem control lines which is useful for high speed communications and what not.

    Now the problem is which one uses the FTDI chip??
    Hah! Good luck finding out until you buy one.
    Good things I have Fry’s Electronics around here and doing returns means just using the car gas.

    So, here’s a FTDI one:
    http://www.amazon.com/Converter-Dongle-Serial-Compat-RS232/dp/B0006LSIOI

    here’s FTDI’s website:
    http://www.ftdichip.com

    Have fun! And don’t use Prolific!

  • obilix

    Oh, ya, one other thing:
    If you want a half-decent though 3/4 baked terminal emulator, give goSerial a try:

    http://www.furrysoft.de/?page=goserial

    The fellow hasn’t finished it, but for all intensive purposes, it works as good command line serial terminal. Just don’t try to use it with ansi or vt100 terminal emulation; that’s not done.

    And one thing about goSerial, the source code is available. One day I may pick it up and add the missing terminal emulation stuff (the simple stuff, not the hard ones… :) )

  • amesb
  • ChrisL

    Fantastik! I can’t believe how long I have yearned for a mac-serial solution. Thanks a bunch.

  • px

    the driver from Prolific wouldn’t even work for me. I’m happy there is the open source version. :)

  • KuArZo

    I have ArkMicro USB to Serial, you can tell me if exists the driver for Mac OS X?

  • Many

    Hi Kuarzo,

    Please read the post and use the links there to the prolific driver or the opensource driver. They might wrok with your particular dongle. I’ve never heard of the one you have, but they pretty much all use the same chips, so it might work. Good luck.

    TTYL
    Many

  • Findlay

    Hey! Thanks for the post, I was faced with a switch which had to have an IP address assigned via the console connection, I have a Mac…
    Your post got me up and running in no time.

  • Many

    Hey Martin,

    If you’re talking about the Opensource driver, these instructions are printed right on the screen during the installation process……I just copied this off the driver install screen:

    “Welcome to the OS X PL2303 USB to Serial driver Installation Program. You will be guided through the steps necessary to install this software.

    Imported Uninstall information:
    PackageMaker does not support uninstall! Removing the driver can be done by executing the following steps:
    -open a terminal
    -type: kextunload /System/Library/Extensions/osx-pl2303.kext/
    -The command prompt ask for you administrator password
    -type: sudo rm -r /System/Library/Extensions/osx-pl2303.kext/
    -The command prompt ask for you administrator password
    -type: sudo rm -r /Library/Receipts/osx-pl2303.pkg/

    The driver should be uninstalled.”

  • Gian Luca Mariottini

    Hi,
    thanks for your post. I think this is only one of the few places on the web where we can find something for mac.

    I have a question to ask you guys (my expertise in the field is very limited): as a preamble, I downloaded the Prolific drivers from their website, but then I re-installed the ones from SOurceforge because I read that they might be better. Then, I have followed the (quite sparse) instructions on the web to activate the USB-seria connection.

    So here is my question: how can I verify that my USB-serial cable works? Is there, moreover, a practical way to test it?

    Thanks for your help.

  • Many

    Gian,

    To be honest I don't have a easy solution for functionality test. I normally use this method to access network switching equipment at work. That involves using the "screen" command (See http://www.nerdlogger.com/2007/12/usb-to-serial-console-for-mac-osx.html). This lets me connect to these devices and usually (If I get the baudrate right) gets me a text menu.

    Another way is to hook up a cross over serial cable between the mac and a PC running windows and running the screen command from the article above on the OSX side and running hyper terminal on the PC. Then whatever you type on one end should pop up on the screen at the other.

    Hope this helps…..

    TTYL
    Many

  • Gian Luca Mariottini

    Thanks for your help,
    I'll try it and let you/everybody know!
    Thanks again,
    Gian Luca

  • Davy

    This page is one of my bookmark, as I always have to direct Mac people who claim they cannot use serial consoles on SUN boxes… :-). Thanks!

  • X38

    Hi, I just wanted to say, many thanks for this post, it helped me solve a problem today. There doesn't seem to be any alternative (free) terminal emulator for the Mac which lets you mimic xon/xoff behaviour, but using your method in screen worked great!

  • Jochem

    Finding a driver is a bitch, but the OS X PL2303 did the trick.

    Your tip is great – saved my day just now when I had to reset an APC device password.

    Thanks!

  • YIELD

    I just purchassed that serial usb converter and was looking for a driver…. Happy to have find that blog… Bless the God of rs-232…. lol

  • Gary

    I've got the same one (ish) – it's PL2303 based, but one of the issues I've found is with sending a break. Neither the Prolific driver, which is frankly rubbish, nor the open source one seem to have the capability to do this. It's a bit of a pain as it means I need to do password recover on Cisco gear with a Windows box.

    Cheers,

    Gary Smith

  • Anonymous

    Very nice. I, too, need to control some equipment, and I've been limited to using PCs. One of my coworkers had a Prolific-based adapter that I tried with OS X and it just worked.
    More importantly, though, was the information about FTDI chips. They may provide a solution to a problem we've had for a while. I'm keeping my fingers crossed.

  • Anonymous

    Have my ebabies!

    I'm in India, and my PC laptop that I run this POS USB to Serial converter took a dump. Still have a LOT of cisco gear to configure, and after this post, I'm back in business!

  • Splum

    Regarding the software side, last year I also found a very good Terminal emulator that supports serial devices directly (among other methods like Telnet, SSH etc.).

    The product is called "ZOC Terminal" and is available at http://www.emtec.com/zoc/

  • Many

    Splum,

    Not sure why on earth someone would pay $80 for a terminal program these days, but yeah I guess that would work.

    TTYL
    Many

  • Splum

    I guess the payment for MacBook spoiled me (I already forked over a lot more than I'd pay for a Lenovo or Toshiba laptop :-))

    But joking aside, what did it in my case is that I can share the config files on my PC (I just sync the "ZOC6 Files" data folder) with the address book, etc.

    I guess I'm mentally lazy … I also use Firefox instead of Safari and Thunderbird instead of Mail for the same reason.

  • Anonymous

    Yes, it works. No more asking around the office for our single old Windows laptop with serial port to configure those Ciscos. I grabbed Prodige USB adapter from local computer store and it has FTDI chip, downloaded the driver from FTDI:s web site yesterday. Today used screen to connect to Cisco's serial port and did configuring on several Ciscos.

  • bjorn

    Hi all.

    This seems to be the right place for me to ask for help with my problem. I am at this very moment on board a ship that conducts mine clearing operations in the Baltic Sea. I need to use my Mac to monitor serial RS232 NMEA-signals from various marine equipment and I have a Aten UC-232A connected. I have downloaded and installed drivers from ATEN and apple.com but the unit doesn't show up in the list.

    When looking for it with Terminal I get the following:
    ls -l /dev/tty.*
    crw-rw-rw- 1 root wheel 11, 2 15 Maj 22:02 /dev/tty.Bluetooth-Modem
    crw-rw-rw- 1 root wheel 11, 0 15 Maj 22:02 /dev/tty.Bluetooth-PDA-Sync

    I even get the same result when I check for available ports in CoolTerm, Serial Tools and goSerial: Bluetooth-Modem & Bluetooth-PDA-Sync. No sign of my Aten or it's driver.

    VERY thankful for any suggestion what so ever…

    //Bjorn

  • arbus

    I bought this adapter to configure an Netgage ALIX board to run a PFSense firewall. The board has a DB9M connector and the cable has a DB9M end. So I need a DB9F/DB9F adapter?

  • Zonker

    Thanks for the OS X pointers. It concurs with other clues I've tried.

    Testing a serial connection is pretty easy… simply connect pin 2 to pin 3, on either the DE-9 or DB-25 connector, and you should be able to type to yourself… this works because the serial driver is talking and listening at the same serial speed. For this test, you don't need to know that the TXD on a DE-9 is pin 3, while the TXD on a DB-25 is pin 2, because (fortunately) the "other" pin is the RXD.

    But I'll add a couple caveats;
    1) If hardware handshaking is on (DTR and DSR), you will probably also need to jumper (connect) those two pins together. If you can set the port to ignore hardware handshaking, you should be able to type to yourself without adding a second jumper.
    2) If hardware flow control (RTS and CTS) is configured, you will need to either disable the flow control (during your testing), or add a jumper for these pins.
    3) The hardware handshaking and flow control pins are on different pin numbers on the DE-9 versus the DB-25. You can find serial pinout info at http://www.conserver.com/consoles/Clues/rs232.html.

    Zonker

  • Anonymous

    This info about alternative non-Prolific adaptors is great and I will try ordering one. In the meantime I am stuck with Prolific and am seeing some rather strange behaviour on OS X Snow Leopard with the PL2303_1.2.1r2 driver/tty.PL2303-0000105D device.

    It seems that it is only transmitting one byte at intervals of about 1ms (confirmed by watching the TX pin with an oscilloscope). The byte is transmitted at the correct baud rate but there is then a huge pause. This is obviously hopeless for high(ish) speed comms. We can only guess that the driver is sending one byte per USB packet for some bizarre reason. Has anybody noticed this and can anybody recommend a way around this. All flow control etc is off; the port should be configured for blind transmission.

    Thanks for any suggestions…
    Jonny

  • lincoln

    Thanks! I had a raid I needed to admin and the two simple serial programs I have did not do vt-100. Made my day just a little easier!

Leave a Reply