Tuesday, December 4, 2012

Use Minicom to Connect Over Serial

Okay, it's plugged in and the little blue light on the board is glowing. Now what?

I install minicom, start it up, and use Hayes modem commands to configure it. "Sherman, set the Wayback machine for 1981."

"Start it up" means "sudo minicom" because I lack permission to talk to whatever it thinks it's talking to. Maybe I could fix that. Right now, I just want to connect.

Really and truly, the user interface for minicom makes me feel young again. This was what talking to modems looked like on a CRT tube. It was so much higher-tech than waiting for the screech of the modem over the phone line, then plugging your telephone handset into the rubber cups of an acoustic coupler of a 150-baud modem. The Hayes Smartmodem was a godsend.

Thirty years later, the command set is still the same. I'm tempted to type ATDT and some ancient phone number just for old-time's sake.

It says ^A Z will get me help, which it does. The speed's already correct. I set hardware control flow to "off" and the device to /dev/beaglebone-serial, save it as a dfl file (it winds up in .minicom.dfl), and exit, resetting the modem. (".dfl" stands for "default." I looked it up.)

Why do I turn hardware flow control off? I have an easy, technical answer: that's what I was told to do. What is "hardware flow control" doing in my terminal program and why does minicom turn it on by default? Jeepers. Not a clue.

Now I start up minicom again, wait for it, and -- Presto! -- a root prompt from the Beaglebone.
All my standard Linux commands now work, running on the target.  Oh, okay, not all of them, but why be a Debbie Downer? For now, I'm just thrilled. Time for another cup of coffee.

But first, I'll transform "connecting" into a test case, which I squirrel away here.

No comments:

Post a Comment