On Mon, Mar 15, 2010 at 10:40 AM, Dave Smith <d...@thesmithfam.org> wrote: > Byron Clark wrote: >> On Tue, Feb 23, 2010 at 09:04:18AM -0700, Dave Smith wrote: >>> Has anyone gotten a USB device that requires "Virtual COM Port" support >>> to work in Linux? I'm considering employing this relay[1] to perform a >>> nightly reboot of my pile-of-junk Comcast cable modem. >> >> It looks like it uses the FTDI chip so it should work fine with any >> 2.6.x kernel. > > The part arrived today and after a few minutes of hacking, it works > beautifully. I didn't have to install or configure anything for > /dev/ttyUSB0 to appear. And now I have a very simple python script that > can turn the relay on: > > f=open("/dev/ttyUSB0","wb") > for byte in [0xff, 0x01, 0x00]: > f.write(chr(byte)) > f.close() > > (Is there a one-liner to do this?)
echo -n \xff\x01\x00 > /dev/ttyUSB0 /* PLUG: http://plug.org, #utah on irc.freenode.net Unsubscribe: http://plug.org/mailman/options/plug Don't fear the penguin. */