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?)

I wired the relay such that when the USB connection is lost, the power 
stays on. It works wonderfully.

Thanks for the help all.

--Dave

/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/

Reply via email to