USB

=USB Hacks=

Virtually any USB device can be "hacked" in order to modify or extend its functionality. These hacks can take a number of forms:
 * Decomposing an existing USB device in order to use its hardware to extend the function of another USB device.
 * Using a microcontroller or USB I/O board in order to interface multiple USB devices for another function
 * Reverse-engineering the programming of an existing USB device, and writing a program to extend that functionality.

If using a microcontroller or other sort of interface, there may be an API available, but in most cases, USB hacks require a fair amount of software or hardware manipulation.

Since there are multiple possibilities of what can be acheived through USB Hacking, the best way to demonstrate each method is through an example.

Decomposing an existing USB device:
Most keyboards have three LED lights on them, for Num Lock, Scroll Lock, and Caps Lock. These lights can be set using a Linux command called Setled. By taking apart the keyboard and attaching the leads for these LEDs to another USB device, one can allow a USB device to be turned on or off through automated commands. In this example, a maker used this method to control two USB lava lamps, which would be used to monitor his unit tests to tell if they were passing or not.

Using an interface:
Phidgits sells I/O boards and other interfaces to allow makers to create USB sensing and devices.

Reverse-engineering an existing device:
For some USB devices, it is possible to determine the bytecodes used by the internal programming, and use that to automate a device's operation. In this example, the makers figured out the bytecodes used to control a USB powered Nerf missile launcher, and wrote a Python script that monitored their company's code database. Whenever a developer "broke the build", the missile launcher would automatically seek out their workstation and fire a retaliatory missile at their head.