Mac's and serial TTY'sMac's are excellent tools for accessing serial device TTY ports (to console into PBX's, switches, and routers). Note: Check your adapter works after an OS Update, as you may have to re-install the driver.You might notice that each serial device shows up twice in /dev, once as a tty. and once as a cu.
![]()
So, what's the difference? Well, TTY devices are for calling into UNIX systems, whereas CU (Call-Up) devices are for calling out from them (eg, modems). We want to call-out from our Mac, so /dev/cu. is the correct device to use.The technical difference is that /dev/tty. devices will wait (or listen) for DCD (data-carrier-detect), eg, someone calling in, before responding. /dev/cu.
The USA-19HS Keyspan® High-Speed USB-to-Serial Adapter allows you to connect a serial device to a computer or laptop with a USB Type-A port. Widely recommended by serial device manufacturers, the USA-19HS attaches to switches, routers, barcode scanners, GPS units, point-of-sale devices, lab equipment, network storage devices and other devices with a 9-pin serial port.
devices do not assert DCD, so they will always connect (respond or succeed) immediately.Software:Having installed the right driver, our USB-Serial adapter will show up in /dev/cu. (shown above). We now need to install some terminal emulation software before we can connect to anything. Two terminal methods are and. For a GUI solution, seeNote: If you can't find a driver for your adapter (eg, Belkin), try which has built-in support for many USB-Serial devices.ScreenIt's not actually necessary to download an install extra software, as you can use the Mac OS X built in Terminal and screen. Screen lacks some features, but it does include VT100/ANSI terminal emulation, and can be extremely useful. Open an OS X terminal session (window).
Find the right TTY device. Type: ls /dev/cu.With the USB-Serial adapter plugged in, you'll get a list, including something like this:$ ls /dev/cu./dev/cu.Bluetooth-Modem /dev/cu.iPhone-WirelessiAP/dev/cu.Bluetooth-PDA-Sync/dev/cu.usbserial. Then type: screen /dev/cu.usbserial 9600 (in this example).The 9600 at the end is the baud rate. You can use any standard rate,eg, 9600, or 19200 for a Sig Server!. To quit the screen app, type CTRL-A, then CTRL.Type man screen in Terminal for further information on screen. Command SummaryIn minicom, commands can be called by CTRL-A, for example, change your serial port settings with CTRL-A PPress CTRL-A Z for a Command Summary, and help on special keys. Enter CTRL-A X to quit.HINT: Change your OS X terminal window size to 80x25 (1 line more) so you can see the bottom Minicom status bar.(Terminal Preferences ► Settings ► Window).
Open a new window for this change to take effect.Note, the minicom installer creates /opt, and its not hidden in the OS X finder. Rectify this with: sudo chflags hidden /opt ConnectingWith handshaking set to software ( xon/xoff) or none, which covers most devices, serial data communication needs just 3 wires: RXD (2), TXD (3), and GND (5). Generally, hitting should cause a response, or should 're-draw' the screen.
If you don't get any characters, try adding a Null-Modem cable or adapter, which swaps RXD and TXD (pins 2 and 3). Signal ground is Pin 5 in a DB-9, or Pin 7 in a DB-25.Pin Functions for RS-232 DataTXD(3)Serial Data OutputRXD(2)Serial Data InputGND(5)Signal GroundOtherRI(9)Ring IndicatorHandshakeRTS(7)Request to SendCTS(8)Clear to SendDSR(6)Data Set ReadyDCD(1)Data Carrier DetectDTR(4)Data Terminal ReadyDB-9 MaleFront (pin) view.
![]()
I often have to do router configuration via a console port, so I use a Keyspan Serial Adapter to get access. Two problems then present themselves:.
ZTerm is a horrible Mac OS X app. It hasn't been updated in five years or so, and isn't a Universal Binary. The developer doesn't seem in any hurry to rectify the situation.
No need to shell out for Keyspan's admittedly very good drivers. Many USB-serial adapters use the same chip, Prolific Industries' PL-2303 controller. Is currently not very good; you can't send a break signal via screen in Terminal, for example. However, that works better.I use this with an unbranded PL-2303-equipped adapter bought from eBay for six of our English pounds, compared to thirty-odd for a Keyspan device, and it talks perfectly to my Cisco routers. I haven't tried talking to PDAs or GPS devices though. You can also use C-Kermit 8.0. Unfortunately a binary is not available, we must compile it by ourselves, but it's really easy, as Mac OS X is supported.Download the source at the following address:Copy it in a folder, then, using terminal:% cd% unzip -a cku211.zip% make macosx103% sudo make installit will compile and install Kermit in the folder /usr/local/bin/kermit; the binary is called wermit.It's ready!
To launch it:% /usr/local/bin/kermit/wermitand here it is:C-Kermit 8.0.211, 10 Apr 2004, for Mac OS X 10.3Copyright (C) 1985, 2004,Trustees of Columbia University in the City of New York.Type? Or HELP for help.(/Users/wallybear/) C-KermitCompiling from source give also the chance to tweak compiler settings so to make a PPC, Intel or Universal binary application.
Thanks for all your help, especially bboy for the cheaper cable, and wcontello for the AppleScript.I am currently taking 2 classes that use HyperTerminal, a Cisco test prep class and a basic Telecommunications classes. I've wanted to use my MacBook Pro to use something HyperTerminal related.
I have a beta of Windows 7 in Boot Camp and VMWare, and MS got rid of HyperTerminal in Vista. And of course no Mac (except for Xserves) have a serial port.-Startup Shortcuts - Shortcuts for debugging your Mac on startup, on your iPhone.
![]() Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
January 2023
Categories |