2011/3/13 Andrew Errington <a.erring...@lancaster.ac.uk>: > On Fri, 11 Mar 2011 19:37:36 wander.lairson wrote: > > I'm not sure. SnoopUSB tells me there is no endpoint involved (it is n/a), > and you can see in the XML I sent it is -1, so I don't know. I am sure it is > supposed to be endpoint 0x83 on interface 3. > > Here is the summary of the first packet from SnoopUSB. This is the first > packet that is sent when I set the GPIO from the test software: > > Seq Dir Endpt Time Function Data Result > 9 out down n/a 31.341 CLASS_INTERFACE 00 01 01 00 > > If I expand this packet in the SnoopUSB program I see this: > > URB Header (length: 80) > SequenceNumber: 9 > Function: 001b (CLASS_INTERFACE) > PipeHandle: 00000000 > SetupPacket: > 0000: 22 09 00 02 03 00 00 00 > bmRequestType: 22 > DIR: Host-To-Device > TYPE: Class > RECIPIENT: Endpoint > bRequest: 09 > > TransferBuffer: 0x00000004 (4) length > 0000: 00 01 01 00 > bRequest = 9 indicates this is just a SET_CONFIGURATION request.
> There is no more information to be seen in this packet. There are four > packets in the transaction. I assume that the following three packets are > acknowledgement and housekeeping (they are in the XML I sent, but they > are 'prettier' in SnoopUSB). > > Here are the interfaces and endpoints. First, a short program to print them: > > dev = usb.core.find(idVendor=0x0c76, idProduct=0x160b) > > for cfg in dev: > sys.stdout.write(str(cfg.bConfigurationValue) + '\n') > for intf in cfg: > sys.stdout.write('\ti/f no:' + \ > str(intf.bInterfaceNumber) + \ > ',' + \ > str(intf.bAlternateSetting) + \ > '\n') > for ep in intf: > sys.stdout.write('\t\te/p addr:' + \ > str(hex(ep.bEndpointAddress)) + \ > '\n') > > Here is the output: > > 1 > i/f no:0,0 > i/f no:1,0 > i/f no:1,1 > e/p addr:0x1 > i/f no:2,0 > i/f no:2,1 > e/p addr:0x82 > i/f no:3,0 > e/p addr:0x83 > > > What should I look for/try next? > You have only one out endpoint, endpoint 1. It is probably this endpoint you should write to, but before it you must select this interface through a call to set_interface(1,1). -- Best Regards, Wander Lairson Costa LCoN - Laboratório de Computação Natural - Natural Computing Laboratory (http://www.mackenzie.com.br/lcon.html) Programa de Pós-Graduação em Engenharia Elétrica (PPGEE) Faculdade de Computação e Informática (FCI) Universidade Presbiteriana Mackenzie - SP - Brazil ------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d _______________________________________________ pyusb-users mailing list pyusb-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pyusb-users