Do a search for the USB and USBTMC specifications - you'll be doing byte-level 
manipulations to set up and keep track of the transfers.  pyusb great works, 
but assumes you're familiar with the detailed specs.

Wander Lairson <[EMAIL PROTECTED]> wrote: Hi Gilles,

These parameters from controlMsg map directly from libusb parameters,
which maps directly from USB control transfer specifications. To
resume, most of these parameters go into specific fields into control
packet. If your device supports control transfers, should exist some
documention how it interprets each field...

Wander

2008/2/2, Giles Bowkett :
> Hi - I've got PyUSB up and running and giving me basic data on the
> device I want to read and write to. What I have from the manufacturer
> is a protocol, basically a list of sequences of bytecodes. For
> instance, to turn the device on, you need to send:
>
> 02H (which I believe means hex, so 0x02)
> three 0x00 bytes
> 192 0x00 bytes
> and finally a 0x02 checksum byte
>
> I'm using this really cool USB missile launcher control code to work from:
>
> http://blog.taragana.com/index.php/archive/how-to-control-usb-missile-launcher-on-linux/
>
> and that code contains some controlMsg calls.
>
> what I can't figure out is the arguments for controlMsg and how they
> map to to the sequence of bytes I need to transmit. I have this from
> the pydoc:
>
> controlMsg(requestType, request, buffer, value=0, index=0, timeout=100)
>
> are requestType and request constants within PyUSB? do I need to
> separate out the different pieces of my byte sequence or should they
> all just go in buffer? how do I choose whether my bytes go in buffer
> or value?
>
> --
> Giles Bowkett
>
> Podcast: http://hollywoodgrit.blogspot.com
> Blog: http://gilesbowkett.blogspot.com
> Portfolio: http://www.gilesgoatboy.org
> Tumblelog: http://giles.tumblr.com
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Pyusb-users mailing list
> Pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Pyusb-users mailing list
Pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users



-Sarah
       
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Pyusb-users mailing list
Pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to