473,440 Members | 1,640 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,440 software developers and data experts.

USB Missile.

I am trying to create a python version of the M&S USB Missile Launcher
code for Windows.

I am basing it off one designed for linux.

I note the following about dependencies:

Requirements:
-------------
0. python (>=2.3)
-Fine
1. libusb (>=0.1.2)
-Fine, however the windows version has the following note:
If you are porting a libusb based program from Unix
style systems to Windows, remove all references to the library's global
variable usb_busses. Use the function usb_get_busses() instead to get
this variable. Global variables in shared libraries (DLLs) do not work
on Windows systems across different compilers.
2. pyusb (==0.3.1) python module with patch (to enable kernel
detachment)
-Fine, besides patch since this does not seem to be
windows compatible (patch is hosted at
http://scott.weston.id.au/software/p...l-detach.patch)
3. urwid python module
-Fine

I am trying to use the following code at
http://scott.weston.id.au/software/pymissile/missile.py but with the
following lines removed due to the patch above not being applied:
self.handle.detachKernelDriver(0)
self.handle.detachKernelDriver(1)

It loads okay, but gives the following error:

Traceback (most recent call last):
File "C:\Documents and Settings\Bob\Desktop\missile.py", line 367, in
?
main(sys.argv[1:])
File "C:\Documents and Settings\Bob\Desktop\missile.py", line 361, in
main
MissileDisplay().main()
File "C:\Documents and Settings\Bob\Desktop\missile.py", line 156, in
main
self.ui.run_wrapper(self.run)
File "C:\Python24\lib\urwid\curses_display.py", line 179, in
run_wrapper
return fn()
File "C:\Documents and Settings\Bob\Desktop\missile.py", line 197, in
run
m.move(MissileDevice.LEFTUP)
File "C:\Documents and Settings\Bob\Desktop\missile.py", line 83, in
move
self.dev.handle.controlMsg(0x21, 0x09, self.INITA, 0x02, 0x01)
usb.USBError: usb_control_msg: sending control message failed, win
error: The de
vice does not recognize the command.
Does anyone have any ideas of how to solve this error? I thought it
might have something to do with
busses = usb.busses()
in the python, but libusb requiring the function usb_get_busses() to be
used to obtain the usb_busses variable.

I don't however have much python experience.

Thanks.

Dec 27 '06 #1
0 1472

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Grzegorz Dostatni | last post by:
I had an idea yesterday. (Yes, I know. Sorry). If we don't need to declare variables as having a certain type, why do we need to import modules into the program? Isn't the "import sys" redundant...
137
by: Philippe C. Martin | last post by:
I apologize in advance for launching this post but I might get enlightment somehow (PS: I am _very_ agnostic ;-). - 1) I do not consider my intelligence/education above average - 2) I am very...
26
by: mohydine | last post by:
Hi, I am trying to implement some parabolic trajectories for the missiles used in the game Magnant (http://www.insectwar.com) . It would enable Ants to shoot more realistic arrows to other...
5
by: Tarapia Tapioco | last post by:
FIRE THE DANAS FOR WRONG REPORTING, to MSNBC or WASH-POST JOURNALIST ACCURACY Hello American Sheeple, Tell us a glaring mistake in this article. If your IQ is TOO LOW, from eating McDeath...
38
by: vashwath | last post by:
Might be off topic but I don't know where to post this question.Hope some body clears my doubt. The coding standard of the project which I am working on say's not to use malloc.When I asked my...
31
by: DirtySnipe | last post by:
I have created a php form with dynamic drop down boxes in it which pull the options from a database. The boxes work fine and the data gets submitted fine but im having a problem getting the box to...
12
by: bgold | last post by:
Hey. I have a base class (SPRITE), and using this base class I have derived a large number of derived classes (PERSON, BULLET, MISSILE, etc.). Now, at a certain point in my program, I have a pair...
6
by: pankajs | last post by:
Hello freinds! I m making a game but I m facing a problem that when I click New Game button(defined by me) animation starts. But in the animation keys are not working even the Close button at the...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.