I arrived at requestType=64 based on USB spec since as per the specs (given
below)

#bmRequestType
##D7 Data Phase Transfer Direction
##0 = Host to Device
##1 = Device to Host
##D6..5 Type
##0 = Standard
##1 = Class
##2 = Vendor
##3 = Reserved
##D4..0 Recipient
##0 = Device
##1 = Interface
##2 = Endpoint
##3 = Other
##4..31 = Reserved

for...
Recipient - Device (first bit is 0)
Type - Vendor (seventh bit is 1)
Data Phase Transfer Direction - Host to Device (eigth bit 0)

which converts to 2 power 6 = 64. Am I missing anything?

>> the data do not seem to match the initial example
This is a different command. As per the vendor, this is the first command to
run on port open.

>>  msg_str = binascii.unhexlify("020200013803")
Tried it, no difference.

On Mon, Jan 17, 2011 at 3:39 PM, Emmanuel Blot <eblot...@gmail.com> wrote:

> >> results = readerHandler.controlMsg(64, msg_str, data, timeout=1000)
> > The correct prototype for the method controlMsg is
> > controlMsg(requestType, request, buffer, value = 0, index = 0, timeout
> > = 100),
> > thus you should at least supply the requestType and request
> > parameters, which is not happening here. Notice that request value is
> > a value meaningful only to your request, but requestType is bit field
> > value with format specified in the USB spec.
>
> Moreover, the data do not seem to match the initial example
>  >> msg_str = "020200013803"
> would likely be
>  msg_str = binascii.unhexlify("020200013803")
>
> Cheers,
> Manu
>
>
> ------------------------------------------------------------------------------
> Protect Your Site and Customers from Malware Attacks
> Learn about various malware tactics and how to avoid them. Understand
> malware threats, the impact they can have on your business, and how you
> can protect your company and customers by using code signing.
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to