I have a text stream coming in on a USB-RS232 adapter. I want to pipe it to some Unix tools, to a file, whatever. What is the simplest way to do so? Does it really require third-party software?

OS X includes cu and screen utilities, but both are specialized terminal emulators. It seems I need to use sudo to make cu work at all, which isn't really cool.

I saw something somewhere about OS X Server having a serial port logging facility. Is that an exclusive feature?

link|improve this question
feedback

1 Answer

Have you tried something like cat < /dev/ttyS0 > outputfile or cat < /dev/ttyS0 | command? Your serial port may be named something else like /dev/usbXXX. You may need to set the communication parameters using stty.

link|improve this answer
For one thing, the baud rate needs to be specified. That is probably the first thing I tried. – Potatoswatter Feb 5 '11 at 9:07
Also, stty does not appear to work at all on this device. – Potatoswatter Feb 7 '11 at 18:18
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.