Meteorite logoMeteorite
Back to videos

Turn USB Power On/Off Via The Shell

So i bought this cooling-desk for my laptop today. It's actually a pretty cheap and simple product, i love it! Now i can sit with my old laptop (with a floppy disk on it) in my couch or where ever i want, hate being locked up in front of a desktop computer. There's a usb power-only chord (no data wires) that is connected to your laptop so it witll run the two 120mm fans that keep my machine nice and cooled down. I suddenly got this idea in my head, that it would be awesome if i could turn these fans on/off whenever i wanted to. But found out that its impossible to manipulate the original root usb ports to turn on/off. Then i remembered a small usb hub with 4 extra ports built into it. Luckily enough, this usb hub had a tiny driver that my machine could actually register activity in "dmesg" output. Then the hacing began, hour after hour i stuggled to find some system files that could connect to this device. And all of a sudden, bumped in to this file, and showed some relation to the small usb hub, because when i unplugged this the files would disapear, and when i plugged it back it they came back, so i analysed all the files in the directory with NANO, and found that most of these files were controlled with an on/auto/off paradigm! So got this idea to echo new values into the files to mess with the standard settings to see what happens.. and then BOOM! Suddenly the four lights just turned on!! That's UNIX Magic :D

Suggested videos