USB Hub per-port power switching

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

D-Link DFB-H7 Combo Hub

Compile software:

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.

While it doesn't support interfacing with hub-ctrl, this hub has a proper software API for controlling the port power and data. Super useful for quickly reseting your development projects and even measuring how much power they're taking.
Programmable USB Hub with 4 Charge Ports | Acroname