imagitronics.org


dream it, build it, break it, repeat.

Apr/07

14

Extreme Cubicle Warfare

If you’re not familiar with the DreamCheeky USB Missile Launcher then you should be ashamed to call yourself a geek. The USB Missile Launcher is the pinnacle of intra-office warfare. Basically, it’s a simple USB enabled device that launches foam darts at a pretty good clip. I have some ideas for retrofitting the device with an autonomous tracking and firing mechanism. The Windows-based software included with the launcher is absolutely terrible. There are hardware features of the device not even supported in their release software (turning on the horizontal and vertical axis simultaneously, for instance) Open source drivers for the launcher are plentiful for Linux and Mac OS X, but it seems that nobody has released Open Source drivers for Windows. I own two Apple desktop machines, but since I find most of my development time when I’m on the go I’m confined to my Windows laptop.

At first, I planned to port the extremely simple ctlmissile utility to Windows using the libusb-win32 library. Unfortunately, the usb_detach_kernel_driver_np function is Linux-only. I haven’t had any luck detaching the HID drivers from the device to allow libusb to connect to the device.

For round two, I attempted to interface with the device using a Debian distribution running on my laptop through Parallels virtualization software. Unfortunately, Parallels provides a layer of abstraction between the device and the virtual Linux machine, and I was unable to connect to the device.

I started researching native USB communication using Microsoft’s Windows API. This quickly turned into a nightmare. There are literally dozens of USB HID libraries available, each designed for specific chipsets. It would require some serious trial and error to find out if any of them would even work with the DreamCheeky launcher.

Eventually, I stumbled across a USB HID sample application written using Visual C++ and the Windows Driver Kit. The sample program allows me to send raw hexadecimal data, that I retrieved from this site, directly to the launcher. This was my first taste of success, although it came at a cost.

I sent 0×01 to the device, which is the signal that indicates to the device that it should aim the turret upward. Unfortunately, the sample application is not threaded so the user interface locked up during transmission, and remained so while receiving data returned from the device. When the missile launcher had reached it’s Apex, the gears began to grind as it kept attempting to move further. I unplugged the device from the USB device. It was actually smoking from the stress! Fortunately, it’s not ruined. At least now I know that the example code works. Hopefully I can couple the logic from the open source drivers with the sample Windows Driver Kit software.

RSS Feed

<<

>>

I shop at

Theme Design by devolux.nh2.me

Hosted in the cloud

To top

imagitronics.org is Digg proof thanks to caching by WP Super Cache