[chbot] OT: Compiler help
Andrew Errington
a.errington at lancaster.ac.uk
Thu Jan 6 00:01:13 GMT 2011
On Thu, 06 Jan 2011 07:54:40 Charles Manning wrote:
> That *might* work. It depends on how the code was written.
>
> Of course the superior solution is to just use libusb and make a Linux
> version of the program.
>
> libusb should make this problem trial.
Yes and no. (I presume you mean 'trivial').
I intend to use PyUSB, which is an easy wrapper for libusb, but the problem I
have is knowing how to construct the data packet for the device.
I can currently use PyUSB to read from the device and I can see the state of
the GPIO lines (they are input by default).
To control the GPIO I need to send two bytes, a data-direction byte (one bit
per GPIO to set input or output) and the output data byte. I don't know the
format of this data packet. Is it two bytes, or are there some overhead
bytes? Which byte is the DDR, and which is the output? I have /some/
information from the manufacturer, but not /this/ information. :(
No regular software exists to control the GPIO, since no-one really uses the
GPIO, so I can't just spy on some packets and parse them manually. I have to
run the test program, which will generate packets that control the GPIO,
which I can then spy on. I can't run the test program because it was
compiled with the wrong product ID. I can't compile the test program because
I have no compiler. I can't write my PyUSB program because I don't have the
format of the data packet.
And yes, I have asked the manufacturer for the specific information I need,
but it is not forthcoming. I consider myself lucky to have what I have, and
actually it's enough if I can get it to work.
Best wishes,
Andrew
More information about the Chchrobotics
mailing list