USB: Difference between revisions

From miki
Jump to navigation Jump to search
Line 15: Line 15:
* [http://blog.andrew.net.au/2009/01/17 USB power switch]
* [http://blog.andrew.net.au/2009/01/17 USB power switch]
* [http://tiebing.blogspot.be/2011/01/use-linux-to-control-outlet.html Use Linux to control outlet] ([http://www.gniibe.org/oitoite/ac-power-control-by-USB-hub/hub-ctrl.c hub-ctrl.c])
* [http://tiebing.blogspot.be/2011/01/use-linux-to-control-outlet.html Use Linux to control outlet] ([http://www.gniibe.org/oitoite/ac-power-control-by-USB-hub/hub-ctrl.c hub-ctrl.c])
<source lang=bash>
* [http://dannf.org/bloggf/tech/wootoff-lights.html]
wget http://www.gniibe.org/oitoite/ac-power-control-by-USB-hub/hub-ctrl.c
sudo apt-get install libusb-dev
gcc -lusb hub-ctrl.c -o hub-ctrl

#Get info on USB devices:
lsusb -t
sudo ./hub-ctrl -v


</source>
* [http://dannf.org/bloggf/tech/wootoff-lights.html Controlling Power on a USB Hub]


Advices:
Advices:

Revision as of 14:17, 24 October 2012

USB Drives under Windows

Some references:

Creating multiple partitions on a single USB drives

From [1], Nearly all USB flash drives pretend to have a removable media (even it's a lie), so Windows detects them as 'removable'. On drives with a removable media Windows 2000 and higher supports only one partition. Finally it's a single bit in the device's device descriptor, the removable media bit (RMB). If you take away the RMB then Windows sees the drive as local disk and multiple partitions work.

To have Windows not to handle USB drives as removable media, just install a filter driver that will remove the RMB flag. Check here.

USB Power Control

Reference

wget http://www.gniibe.org/oitoite/ac-power-control-by-USB-hub/hub-ctrl.c
sudo apt-get install libusb-dev
gcc -lusb hub-ctrl.c -o hub-ctrl

#Get info on USB devices:
lsusb -t
sudo ./hub-ctrl -v

Advices:

  • Avoid hub with cheap Genesys Logic chip inside.
  • Good hub is Linksys 4-port hub, with external power cable.