D-Link DUB-H7 7x Ports USB Hub ( only version 1 works, silver case)

D-Link DFB-H7 Combo Hub

Compile software:

Download OpenWrt-SDK & Yun

mkdir ~/hub-ctrl
cd ~/hub-ctrl
wget http://www.gniibe.org/oitoite/ac-power-control-by-USB-hub/hub-ctrl.c
mips-openwrt-linux-uclibc-gcc   hub-ctrl.c -o hub-ctrl \
-I${CFLAGS} -L${LDFLAGS} \
-Wl,-rpath-link=${LDFLAGS}  -lusb
mips-openwrt-linux-uclibc-strip hub-ctrl
scp hub-ctrl [email protected]:/mnt/sda1

Control per port power/per indicator LED of USB Hub

or download pre-compiled software:

wget  -O hub-ctrl https://www.dropbox.com/s/dqlfrm91v5s7t2b/hub-ctrl?dl=0 --no-check-certificate
chmod 755 hub-ctrl
root@Arduino:/mnt/sda1# ./hub-ctrl -h
Usage: ./hub-ctrl [{-h HUBNUM | -b BUSNUM -d DEVNUM}] \
          [-P PORT] [{-p [VALUE]|-l [VALUE]}]

./hub-ctrl -v
...
Hub #2 at 001:003
 INFO: individual power switching.
 Hub Port Status:
   Port 1: 0000.0000
   Port 2: 0000.0000
   Port 3: 0000.0000
   Port 4: 0000.0000

./hub-ctrl -h 2 -P 1 -p 1
./hub-ctrl -v
...
Hub #2 at 001:003
 INFO: individual power switching.
 Hub Port Status:
   Port 1: 0000.0100 power
   Port 2: 0000.0000
   Port 3: 0000.0000
   Port 4: 0000.0000

USB Port 1 POWER SWITCHING on and LED is on.

Confirm USB Hub supports Per-port power switching:

root@Arduino:/mnt/sda1# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 058f:6254 Alcor Micro Corp. USB Hub
Bus 001 Device 003: ID 05e3:0606 Genesys Logic, Inc. USB 2.0 Hub / D-Link DUB-H4 USB 2.0 Hub
...

lsusb -d 05e3:0606 -v  |grep 'Per-port power switching'
Per-port power switching

If return empty then no support.

Comments powered by CComment