Re: Controlling a USB port

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 13 Jan 2010, Leslie Rhorer wrote:

> Hello.
> 
> 	I have a USB device being used on a headless router which I need to
> shut down and power back up from time to time under control by system
> scripts.

Do you know whether the router's hardware is capable of turning off the 
power to its USB ports?  Lots of USB hardware is not able to switch the 
power off.

>  The router is running Debian "Lenny" (4.3.2-1.1) on an old Dell
> Optiplex 260 under kernel 2.6.26-2-686.  I searched the Debian repositories,
> but I could not find a likely candidate for something to handle this, so I
> then searched the web for a good candidate.  I found hub-ctrl-2.c from 2006
> by NIIBE Yutaka, which looks promising.  I'm having problems getting it to
> compile, however.  I've only written a handful of programs in C, so forgive
> me if I making some rookie mistakes.  I'm compiling using gcc version 4.3.2.

Shouldn't you ask the program's author about this?

> 	The source code requires the headers usb.h and mod_devicetable.h, so
> I downloaded them, as well, placing usb.h in usr/include/ and placing
> mod_devicetable.h in /usr/include/linux.

Normally usb.h belongs in /usr/include/linux as well.

>  When I tied to compile the program,
> it complained about, "expected specifier-qualifier-list before 'xxxx`", so I
> added "#include <inttypes.h>" to the hub-ctrl-2-1.c source file. When that
> didn't work, I also tried adding it to mod_devicetable.h. I still get the
> same sorts of errors.  Here is the output from gcc:

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux