Enter Search Query:

Serial commuications on a MacBook Pro

Connecting to a device using via a rs232 using a MacBook is not straight forward, but possible if you have one of the more popular USB-to-Serial adapters. The PL2303 adapter is sold by a number of manufacturers under different model names. Luckily, however, most of them run on the same basic chip for which an open source driver exists. Here’s how I configure Cisco devices from my MacBook Pro:


[step 1] Download one of these drivers (the one at Sourceforge is actively being developed so it will be more up-to-date, but the one at Apple worked fine for me).

[step 2] Install the driver package, then plug in your USB to Serial adapter. It’ll show up in your network control panel, but don’t worry about configuring it there.
[step 3] Lauch a terminal window and type:

ls /dev/tty.*

You’ll see a list of your connected communication devices. If your devices is supported by the driver we installed earlier, you’ll see a device like this (the portion after the “-” varies):

/dev/tty.PL2303-00001004

[step 4] Connect your USB to serial adapter to a serial device and use the screen command as follows:

screen /dev/tty.PL2303-00001004 9600

Now you’ll have full terminal access to the device. The screen command supports different baud rates as long as you specify them like shown above.

To detach the screen and get back to the OS X terminal, type Control-a then the letter “d”. To re-attach it at any point later, type screen -r.

That’s it. Easy peasy.

July 10, 2010

Related Posts

0 comments found

Comments for: Serial commuications on a MacBook Pro

Leave a Reply

Your email address will not be published. Required fields are marked *