Virtual COM port on Linux

Dave Smith dave at thesmithfam.org
Mon Mar 15 13:58:12 MDT 2010


Andrew McNabb wrote:
> This is exactly why I only use shell scripts for very simple tasks. :)

Well, I got it to work, and I learned something about command line 
argument parsing in the process. Here's what I ended up with, and I 
looked over it, and it was good:

   # cat reboot-cable-modem
   #!/bin/bash
   device=/dev/ttyUSB0
   printf '\xFF\x01\x01' >$device # Power off
   sleep 10
   printf '\xFF\x01\x00' >$device # Power on

Now I have to blog about it so you can see pretty pictures of the relay.

By the way, I think it's time to start my sprinkler control project. I 
can buy an 8-channel relay for $50 to get started. :) Yum.

--Dave


More information about the PLUG mailing list