RE: Controlling a USB port

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

 




> -----Original Message-----
> From: Alan Stern [mailto:stern@xxxxxxxxxxxxxxxxxxx]
> Sent: Thursday, January 14, 2010 9:06 AM
> To: Leslie Rhorer
> Cc: USB list
> Subject: Re: Controlling a USB port
> 
> 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.

	I know, but if the built-in hub does not, I can always use an
external hub.  Once I get the program to compile, I'll know for certain.

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

	He hasn't posted anything since 2006.

> > 	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.

	The include doesn't spec it there.  It's finding it.

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