USB Missile Launcher Web Control Interface for Linux

After learning about Scott Weston’s fun and games with the usb-missile-launcher, I begged Father Christmas for one. Lo and Behold it came!

The suggested method of unleashing said missiles at co-workers seemed to require the ‘missile controller’ to sit at the computer connected to the missile launcher. This method does however have the slightly undesirable effect of making the person doing the firing immediately identifiable to the large bloke who’s eye he has just taken out.

USB missile launcher image

I decided that it’d be a good idea to be able to control my missiles from afar, and of course - the web seemed the only way.

Delving into Scott’s code, it seems he laid the groundwork for net control of the launcher. I’ve therefore had a bash at creating the rest of the code, and I’ve included it here.

First off, you’ll be needing to visit Scott’s tutorial to install your usb missile launcher on Linux.

I’ll skim through the steps here, but please visit Scott’s site above for a more complete explanation:

apt-get python
apt-get libusb
apt-get urwid python

  • Get pyusb-0.3.1 from Scott’s site or grab the files refered to in this package here > usb-missile-launcher.tar
  • Patch the pyusb-0.31 code with the attached patch like so - patch -p1 < pyusb-0.3.1-kernel-detach.patch
  • Install your patched pyusb-0.31 via the included script - sudo python setup.py install
  • Make missile script executable - chmod +x ./missile.py
  • Test the script - sudo ./missile.py
  • Now that you are set up with your usb missile launcher script, you’ll be wanting to hook it up to the web! I’ve released the files I wrote for the job in this package here > usb-missile-web-interface.tar

    I don’t make any warranty of the completeness or ‘uberness’ of the code but heck - how mission critical is your usb missile launcher?

  • Copy the up.py (make it executable) and missile.php files to your web server. (the up.py one is probably a wee bit of a risk, but if you’re on a LAN or simply don’t care about others learning the ip address of the computer your missile launcher is attached to, don’t worry about it.)
  • Edit the up.py file to point the script at the computer where your usb-missile-launcher is located. You need to change the PeerAddr option from localhost, to the IP of your usb-missile-launcher computer.
  • Start the usb-missile-launcher script on your usb-missile-launcher computer (as root) and append the -n switch for network. For example ./missile.py -n
  • Visit the missile.php webpage on your web server and have fun!
  • USB missile launcher web interface screenie

    Troubleshooting - Make sure that port 20000 UDP is open. This is the port used by the web interface to talk to your missile launcher. If you get errors you should also check file permissions.

    And there you have it. You now have your missile launcher set up for remote destruction. If you use this script, please post here and tell me how you got on with it. I’d also like to see any improvements you have to it and would really appreciate your comments. I’d like to tidy up the appearance of the web interface, and perhaps add a web cam window. For the moment, you’ll have to use your web cam in another window to assist you in your aiming!

    Posted by Chris

    Post to del.icio.us Post to del.icio.us

    Post to Slashdot Post to Slashdot

    Digg this Digg this

    This entry was posted on Monday, January 1st, 2007 at 10:55 pm and is filed under . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

    9 Responses to “USB Missile Launcher Web Control Interface for Linux”

    1. Adam Says:

      Go Chris!
      Chris is too shy to admit that this is his strike at coding…!
      Well done mate, now onto MVC with OOA/OOD using agile programming.
      Or we could just go to work and play with the missle launcher :-)

    2. David Jones Says:

      hey mate, - i’ve modified your code, used a c++ image processing library and a webcam for target detection and tracking and used a socket to communicate between this and your code…. the result is a pretty nifty automated missile track-and-destroy system that defends my workspace in the event of invaders, see the website link for you-tube video and if you want the code, let me know.

      david

    3. chris Says:

      Hey David - that’s looking pretty cool :)

      I’d love to see the code! If you wanted to release it, you’re welcome to put it up here at justuber.com to share it, just send me an email at christopherrowson (at) gmail (dot) com - Or if you’ve already released it elsewhere, just post the link!

      Cheers

    4. Sameer Says:

      Hey Chris, do you know if this will work with the Rocket Launcher? (http://www.thinkgeek.com/computing/accessories/8a0f/)

    5. Chris Says:

      Hi Sameer, I’ve never tried it to be honest mate. I suppose it depends on the python code that controls the missile launcher. If it responds to the same usb codes as the rocket launcher you may be in business ;-)

    6. Matias Paterlini Says:

      Hi David, it’s fantastic what you’ve done. please send me the code and the exe file if it is posible. paterlinimatias (at) gmail (dot) com

      Thanks a lot!!

      Matias Paterlini

    7. Chris Says:

      Hi Matias,

      Sorry, there is no .exe file (this being Linux, Python & PHP.) The source is in the post if you want it though.

      Cheers

      Chris

    8. Usb Missile Launcher Says:

      [...] Just Uber ” Blog Archive ” USB Missile Launcher Web Control Interface for Linux (justuber.com) - January 19, 2009 [...]

    9. (XGP)-G-S Says:

      hello

    Leave a Reply