Quantcast
Channel: Naives - My Blog » Computers & Blogging
Viewing all articles
Browse latest Browse all 8

Serial Communication in OSX Terminal

$
0
0

Don’t get me wrong but I still think the OS from the evil empire is easier to use. I’ve referred to this dozens of times, though not enough to memorize it.

Remember to install the driver!

Original from here.

First, open Terminal. If you’ve never used it before, it’s under Applications/Utilities/Terminal. Next, type

ls /dev/tty.*

to get a list of all of your serial ports. Pick the one that you want to open. For example, my list looks like this:

/dev/tty.BTRS232 /dev/tty.Tigoe6630-AppleAgent-1
/dev/tty.Bluetooth-Modem /dev/tty.Tigoe6630-Dial-UpNetwor-2
/dev/tty.KeySerial1 /dev/tty.modem

And I know from previous experience that /dev/tty.Keyserial1 is my Keyspan USB-to-serial adaptor.

Knowing the serial port, you can just type screen portname datarate to show the serial data on the screen. In my case, it was:

screen /dev/tty.Keyserial1 9600

To quit the screen app, tyoe control-A, then control-\.


Viewing all articles
Browse latest Browse all 8

Trending Articles