Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Create a clean Terminal for a serial line connection UNIX
I looked everywhere on the net to find something that I could afford with which to connect my USB serial port to a Sun machine. I couldn't install Fink or MacPorts, and screen was garbling all of the text for the Solaris install. Finally, I started looking in general UNIX support, which led me to the cu utility.

Use the cu command to get a (more-or-less) clear line. It's part of OSX's BSD heritage, and was originally used to allow UUCP batches to dial modems and link with each other. Here's how to use set up a connection:
sudo cu -s [bitrate] --nostop -l /dev/cu.[serialdevice]
This could also be used with /dev/tty.[serialdevice], I believe, though I have not tried it.

Caveat: If you use the ~ key, make sure you type it twice. Also, the --nostop parameter disables cu interpreting XON/XOFF software flow control. If you don't use it, and the system gets a Control-S character for whatever reason, you will need to type Control-Q to get the output moving again. If you're using the Terminal, you know how to use man(1), so read the man page for cu(1).
    •    
  • Currently 2.39 / 5
  You rated: 1 / 5 (18 votes cast)
 
[10,093 views]  

Create a clean Terminal for a serial line connection | 5 comments | Create New Account
Click here to return to the 'Create a clean Terminal for a serial line connection' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Create a clean Terminal for a serial line connection
Authored by: beerguy on Jan 27, '10 08:10:34AM

Screen actually works too:

screen /dev/tty.[USB device] 9600


I use Zterm most of the time. It's a great console app, it's too bad that it's author discontinue development on it in 2002.



[ Reply to This | # ]
Create a clean Terminal for a serial line connection
Authored by: subdude on Jan 27, '10 09:25:17AM

Ah, ZTerm, what fond memories I have. BBSs, University TTY systems, and the occasional strange, unknown systems found through war-dialing. Good times.



[ Reply to This | # ]
Create a clean Terminal for a serial line connection
Authored by: harmless on Jan 27, '10 09:05:55AM

If you don't need any terminal emulation, try goSerial:

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

Disclaimer: I'm the author. The application is free though.



[ Reply to This | # ]
Create a clean Terminal for a serial line connection
Authored by: goatbar on Jan 27, '10 09:06:23AM

For a bluetooth device, cu did not work, but tty did...

sudo cu -s 38400 --nostop -l /dev/tty.SomeBluetoothDevice-GenericSer
Connected.
* 1011 8.8 26 319 2 43.1356 -70.9393 20.3 2 1 1000 11.4
* 1011 8.7 26 293 3 43.1356 -70.9393 20.5 2 2 1000 11.4
* 1011 8.6 26 284 4 43.1356 -70.9393 20.9 2 2 1000 11.4



[ Reply to This | # ]
Create a clean Terminal for a serial line connection
Authored by: nekomatic on Jan 29, '10 11:37:39AM

How about CoolTerm?



[ Reply to This | # ]