You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(3) |
Nov
(4) |
Dec
|
2008 |
Jan
(1) |
Feb
(5) |
Mar
(2) |
Apr
|
May
(8) |
Jun
(4) |
Jul
|
Aug
|
Sep
(11) |
Oct
|
Nov
|
Dec
(20) |
2009 |
Jan
(16) |
Feb
(7) |
Mar
(9) |
Apr
(4) |
May
(6) |
Jun
(17) |
Jul
(3) |
Aug
(4) |
Sep
(5) |
Oct
(10) |
Nov
(16) |
Dec
|
2010 |
Jan
(22) |
Feb
(18) |
Mar
(9) |
Apr
(102) |
May
(29) |
Jun
(40) |
Jul
(80) |
Aug
(21) |
Sep
(47) |
Oct
(13) |
Nov
(19) |
Dec
(45) |
2011 |
Jan
(82) |
Feb
(20) |
Mar
(47) |
Apr
(25) |
May
(18) |
Jun
(24) |
Jul
(24) |
Aug
(47) |
Sep
(23) |
Oct
(22) |
Nov
(69) |
Dec
(20) |
2012 |
Jan
(56) |
Feb
(42) |
Mar
(43) |
Apr
(27) |
May
(18) |
Jun
(11) |
Jul
(61) |
Aug
(19) |
Sep
(13) |
Oct
(49) |
Nov
(32) |
Dec
(37) |
2013 |
Jan
(46) |
Feb
(14) |
Mar
(13) |
Apr
(20) |
May
(20) |
Jun
(3) |
Jul
(19) |
Aug
(7) |
Sep
(4) |
Oct
(33) |
Nov
(7) |
Dec
(15) |
2014 |
Jan
(5) |
Feb
(21) |
Mar
(3) |
Apr
(3) |
May
(30) |
Jun
(1) |
Jul
(30) |
Aug
(2) |
Sep
(22) |
Oct
(14) |
Nov
(22) |
Dec
(6) |
2015 |
Jan
(7) |
Feb
(4) |
Mar
(16) |
Apr
(9) |
May
(17) |
Jun
(28) |
Jul
(3) |
Aug
(18) |
Sep
(3) |
Oct
|
Nov
(6) |
Dec
(3) |
2016 |
Jan
(15) |
Feb
(18) |
Mar
(12) |
Apr
(14) |
May
(15) |
Jun
(3) |
Jul
(3) |
Aug
(42) |
Sep
(24) |
Oct
(6) |
Nov
(5) |
Dec
(6) |
2017 |
Jan
(6) |
Feb
(2) |
Mar
(12) |
Apr
|
May
(1) |
Jun
(3) |
Jul
(2) |
Aug
(6) |
Sep
|
Oct
(1) |
Nov
(5) |
Dec
(7) |
2018 |
Jan
|
Feb
(9) |
Mar
(7) |
Apr
|
May
(10) |
Jun
(20) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
(20) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(9) |
Dec
|
2020 |
Jan
(1) |
Feb
|
Mar
(1) |
Apr
(5) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
(5) |
Oct
|
Nov
(8) |
Dec
(2) |
2021 |
Jan
(16) |
Feb
(1) |
Mar
|
Apr
(9) |
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
(2) |
Nov
|
Dec
(1) |
2022 |
Jan
|
Feb
(7) |
Mar
|
Apr
(4) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(2) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Christopher M. <chr...@bn...> - 2008-09-02 23:51:09
|
Hey everyone, I'm trying to write my first program with pyUSB. I have already figured out how to identify my device, open it, add it to a handle, close it and claim it's interface. Here's my situation: The kernel recognizes my device ( a linksys cit200) as a device already and it actually shows up as a plughw device. The problem is the device is not "activated" My question is, do I have to claimInterface this device to send/receive signals to it? For now, I just want to see if I can "enable/activate" it, so the mic/speaker will work on the thing. Right now, in order for me to claim the interface, I have to detachKernelDriver each interface (there are 4 of them, 3 alsa/sound, 1 hid), then setConfiguration, then claimInterface. In doing so, I lose ... it showing up as those devices. Example Code: --------------------------------------------- import usb # linksys CIT200 Device Info vendor_id = 5041 product_id = 29 buses = usb.busses() for bus in buses : for device in bus.devices : if device.idVendor == vendor_id : if device.idProduct == product_id : # found the CIT200 linksys = device # open device handle = linksys.open() # setup interface and configs ... there are 4 interfaces for this device... config = linksys.configurations[0] interface = config.interfaces[0][0] # detach kernel drivers handle.detachKernelDriver(0) handle.detachKernelDriver(1) handle.detachKernelDriver(2) handle.detachKernelDriver(3) # set configuration and claim interface(s?) handle.setConfiguration(config) handle.claimInterface(interface) handle.setAltInterface(interface) --------------------------------------------- Any help would be appreciated. I will probably have a few more questions to follow :) Thanks |
From: Abhishek W. <abh...@gm...> - 2008-06-26 15:01:08
|
Hi.. I'm trying to make a Software USB based on AVR309 application note available at www.atmel.com/dyn/resources/prod_documents/doc2556.pdf So what basically i'm doing is programming a ATTINY-44 to do functions of a USB-driver and when connected to USB port, should be automatically detected by the computer. Now i'm also making a GUI using Tkinter in Python to read data from the microcontroller & to write in it. I was thinking of using pyUSB for this purpose. but i'm unable to understand how to read and write from a USB device using pyUSB. Please help me in any way in this regard. Thank U. Abhishek Wadhava 3rd year, ECE, MANIT, Bhopal(M.P.) India |
From: Wander L. <wan...@gm...> - 2008-06-25 19:43:32
|
Actually the documentation is wrong. The results what you are getting are ok. The number of bytes transfered is only returned when is executed a control OUT transfer. In control IN transfers, the function returns the data read. I'll fix that in the next release. Would mind opening a bug report at the project page? Thanks, Wander 2008/6/25 <lin...@co...>: > Keep in mind that I am new to this USB and hardware hacking stuff. > > Alright I am writing this little python application to pull the firmware from a device using the Cypress EzUSB Fx2 chip. Snazzy little thing. > > To do that you generally use fxload to load the Cypress developer kit-supplied Vend_ax.hex code. It loads into ram, resets the cpu, and then you can get access to some vendor commands to read and write to the eeprom. > > The reason I am doing this is because I need to have a way to verify the firmware on any random device on of this type. This is due to some sticky certification issues that I won't bother you with. I like python so this seems the way to go. > > Once you get the vend stuff loaded then you use control messages to send a request and your given a hunk of code. > > So.. it's the syntax of the controlmsg function that I have a question about. I have everything working right now and the script is working and all that, I just want to make sure that this behavior is 'correct'. Because once I say this is 'finished' it'll be very difficult to change the script. > > So a truncated version of the script looks like this: > > > buses = usb.busses() > for bus in buses: > for device in bus.devices: > if device.idVendor == vend_id and device.idProduct == prod_id: > mooCow = device > > mooCowHandler = moocow.open() > > results = mooCowHandler.controlMsg(0xc0, 0xa2, data, address, 0xBEEF, 10000) > > > Ok.. so it works and it makes me very happy with good feelings and all that. > > But my question is this: > > According to the documentation I would expect that the output from the command would be put into 'data' and the 'results' would be a return value for number of bytes written. > > | controlMsg(...) > | controlMsg(requestType, request, buffer, value=0, index=0, timeout=100) -> bytesWritten|buffer > | > | Performs a control request to the default control pipe on a device. > | Arguments: > | requestType: specifies the direction of data flow, the type > | of request, and the recipient. > | request: specifies the request. > | buffer: if the transfer is a write transfer, buffer is a sequence > | with the transfer data, otherwise, buffer is the number of > | bytes to read. > | value: specific information to pass to the device. (default: 0) > | index: specific information to pass to the device. (default: 0) > | timeout: operation timeout in miliseconds. (default: 100) > | Returns the number of bytes written. > > > However with my code it does something quite differently. > > The 'results' end up being a tuple of returned values! Not the number of bytes. And the 'data' needs to be a number that tells it how many bytes I want returned from the command! > > This is quite a bit different then what I expect after reading the docs and thus is why I am worried. > > When I try to make the 'data' be a tuple or a list of objects or whatnot then It'll end up being unmodified when I run the script, but the results ends up being the number of items I put in the data list. I am confused. > > So I want to make sure that this is the correct behavior for this function. (for it to return a tuple of the results) I am not a stickler for 'correctitude' or anything like that, but I want to make sure that this behavior isn't a 'bug' that is going to get 'fixed' and break my script in the distant future. > > I am using python-usb package version 0.4.1-4 provided by Debian Testing/Unstable. > > Thank you!! > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php > _______________________________________________ > Pyusb-users mailing list > Pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users > |
From: <lin...@co...> - 2008-06-25 16:09:04
|
Keep in mind that I am new to this USB and hardware hacking stuff. Alright I am writing this little python application to pull the firmware from a device using the Cypress EzUSB Fx2 chip. Snazzy little thing. To do that you generally use fxload to load the Cypress developer kit-supplied Vend_ax.hex code. It loads into ram, resets the cpu, and then you can get access to some vendor commands to read and write to the eeprom. The reason I am doing this is because I need to have a way to verify the firmware on any random device on of this type. This is due to some sticky certification issues that I won't bother you with. I like python so this seems the way to go. Once you get the vend stuff loaded then you use control messages to send a request and your given a hunk of code. So.. it's the syntax of the controlmsg function that I have a question about. I have everything working right now and the script is working and all that, I just want to make sure that this behavior is 'correct'. Because once I say this is 'finished' it'll be very difficult to change the script. So a truncated version of the script looks like this: buses = usb.busses() for bus in buses: for device in bus.devices: if device.idVendor == vend_id and device.idProduct == prod_id: mooCow = device mooCowHandler = moocow.open() results = mooCowHandler.controlMsg(0xc0, 0xa2, data, address, 0xBEEF, 10000) Ok.. so it works and it makes me very happy with good feelings and all that. But my question is this: According to the documentation I would expect that the output from the command would be put into 'data' and the 'results' would be a return value for number of bytes written. | controlMsg(...) | controlMsg(requestType, request, buffer, value=0, index=0, timeout=100) -> bytesWritten|buffer | | Performs a control request to the default control pipe on a device. | Arguments: | requestType: specifies the direction of data flow, the type | of request, and the recipient. | request: specifies the request. | buffer: if the transfer is a write transfer, buffer is a sequence | with the transfer data, otherwise, buffer is the number of | bytes to read. | value: specific information to pass to the device. (default: 0) | index: specific information to pass to the device. (default: 0) | timeout: operation timeout in miliseconds. (default: 100) | Returns the number of bytes written. However with my code it does something quite differently. The 'results' end up being a tuple of returned values! Not the number of bytes. And the 'data' needs to be a number that tells it how many bytes I want returned from the command! This is quite a bit different then what I expect after reading the docs and thus is why I am worried. When I try to make the 'data' be a tuple or a list of objects or whatnot then It'll end up being unmodified when I run the script, but the results ends up being the number of items I put in the data list. I am confused. So I want to make sure that this is the correct behavior for this function. (for it to return a tuple of the results) I am not a stickler for 'correctitude' or anything like that, but I want to make sure that this behavior isn't a 'bug' that is going to get 'fixed' and break my script in the distant future. I am using python-usb package version 0.4.1-4 provided by Debian Testing/Unstable. Thank you!! |
From: Bob C. <bc...@co...> - 2008-06-16 19:29:29
|
Hi, I'm trying to reverse engineer my iClicker base unit and create a Linux driver. Everything seems to be going OK except: print handle.controlMsg(reqType,usb.REQ_SET_CONFIGURATION,0x40,0x200,0) print "written? ",handle.interruptWrite(0x83,dataOut,1000) The sniffer I am using shows a read rather than a write. I'm stuck. I don't know whether my sniffer is lying to me or if I have a mistake in my code or if I haven't figured out the device's command structure. _________________________________________________________________________________________________________________ A couple of comments: I'm including the code, the program output and the sniffs as attachments so the body of the email doesn't get a mile long. The controlMsg seems a little un-standard according to the usb spec but I'm trying to create a setup packet that I sniffed from the Windows app.: 21 09 00 02 00 00 40 00 The output I get in Linux (using a different sniffer) is: 21 09 0200 0000 0040. I'm not absolutely sure but it looks like the Windows sniffer reverses high and low bytes for the two byte variables. (40 should be in the low byte not the high byte.) If I omit the controlMsg, the result is: USB Error: No Error The Linux sniffer is: sudo cat /sys/kernel/debug/usbmon/1u > /tmp/1.mon.out The Windows sniffer is: *SniffUSB.exe *(http://benoit.papillault.free.fr/usbsnoop/doc.php.en) Thanks, Bob ** |
From: Wander L. <wan...@gm...> - 2008-05-23 19:24:48
|
Hi, By "NAKed" and "ACKed" endpoints I mean states of the endpoints. This generally is represented by some control register bit flags for each endpoint. Please, refer to the datasheet of your microcontroller. If it's not take time more, maybe the endpoint is stalled too. Wander 2008/5/22 Gabriel <gb...@gm...>: > Hi: > I don't find information about of NAKed and ACKed enpoint. The function > don't take more time to return ¿How should be the endpoint? I goinig to make > a new firmware with C but basic is mos "basic"... > Thank a lot... > > PD: Please give my information about the endpoints... > > -- > Gabriel > ------------------------------------------------------------------------- > 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 > Pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users > > |
From: Gabriel <gb...@gm...> - 2008-05-22 22:19:48
|
Hi: I don't find information about of NAKed and ACKed enpoint. The function don't take more time to return ¿How should be the endpoint? I goinig to make a new firmware with C but basic is mos "basic"... Thank a lot... PD: Please give my information about the endpoints... -- Gabriel |
From: Wander L. <wan...@gm...> - 2008-05-11 20:51:33
|
Hi there, It's available in the project page the win32 installer package. Thanks, Wander. |
From: Wander L. <wan...@gm...> - 2008-05-09 22:01:00
|
No problem. Well, seems that o endpoint is "NAKed", try a longer timeout and see if it function takes more time to return. If so, review your firmware code to discover if the endpoint is "ACKed" in the enumeration process... 2008/5/9 Gabriel <gb...@gm...>: > I'm sorry. I didn't see the field "to" of my e-mail... > I'm making a development with a PIC 18f2455... It has embedded usb. > The PIC's firmware is a loop that read all time and put the sent value into > PORT B. > The developers of the firmware maked the firmware in basic and they maked a > program in basic to send values. > Now, I want to use pyusb. But I obtain this error... I have only send a > byte. I find the device with pyusb but I can't send the byte... > > Thank you very much... > -- > Gabriel > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Pyusb-users mailing list > Pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users > > |
From: Gabriel <gb...@gm...> - 2008-05-09 19:04:26
|
I'm sorry. I didn't see the field "to" of my e-mail... I'm making a development with a PIC 18f2455... It has embedded usb. The PIC's firmware is a loop that read all time and put the sent value into PORT B. The developers of the firmware maked the firmware in basic and they maked a program in basic to send values. Now, I want to use pyusb. But I obtain this error... I have only send a byte. I find the device with pyusb but I can't send the byte... Thank you very much... -- Gabriel |
From: Wander L. <wan...@gm...> - 2008-05-09 16:07:26
|
See if a driver is not loaded when you plug your device. And please, answer to the list. Wander 2008/5/9, Gabriel <gb...@gm...>: > The complete error is > > Traceback (most recent call last): > File "com_usb.py", line 18, in <module> > handle.setConfiguration(1) > usb.USBError: could not set config 1: Device or resource busy > gabriel@flopyIII:~/Desktop/programacion/termociclador$ > > > -- > Gabriel |
From: Wander L. <wan...@gm...> - 2008-05-08 15:20:48
|
Try it: if dev == None: print 'ProtoTermociclador device not found' else: handle = dev.open() handle.setConfiguration(1) handle.claimInterface(0) handle.interruptWrite(0x01,'\x00') 2008/5/7, Gabriel <gb...@gm...>: > Hi all: > I have this problem with pyusb: > I wrote this code > > import usb > > buses = usb.busses() > dev = None > > > for bus in buses : > for device in bus.devices : > if device.idVendor == 0x1781: > print u"ProtoTermociclador found" > dev=device > break > if dev == None: > print 'ProtoTermociclador device not found' > else: > handle = dev.open() > handle.interruptWrite(0x01,'\x00') > > I run the code with sudo python mycode.py and I get an error. > usb.USBError: error submitting URB: Device or resource busy > Please you help my with it... > Thank you very much > > -- > Gabriel > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Don't miss this year's exciting event. There's still time to save $100. > Use priority code J8TL2D2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > Pyusb-users mailing list > Pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users > > |
From: Gabriel <gb...@gm...> - 2008-05-08 02:09:19
|
Hi all: I have this problem with pyusb: I wrote this code import usb buses = usb.busses() dev = None for bus in buses : for device in bus.devices : if device.idVendor == 0x1781: print u"ProtoTermociclador found" dev=device break if dev == None: print 'ProtoTermociclador device not found' else: handle = dev.open() handle.interruptWrite(0x01,'\x00') I run the code with sudo python mycode.py and I get an error. usb.USBError: error submitting URB: Device or resource busy Please you help my with it... Thank you very much -- Gabriel |
From: Wander L. <wan...@gm...> - 2008-03-25 16:49:20
|
Does PyUSB raise any exception? If so, what's the message? If not, has all the data written? Wander 2008/3/19, Mike Holloway <me...@mi...>: > Hi all, > > I'm very new to this list, so hello all! > I'm just starting out using python, my background is lamp. > > I have a Prolific Technologies bridged usb cable that I wish to talk to > using pyusb and libusb, I've tried following examples and compiling my > own code but I'm really struggling getting it to work. > > I'm trying to send a sequence of letters to the cable, for them to > reappear on the other side. I've been trying to use bulkWrite and > bulkRead methods but I'm not sure I'm using them right. There's also > controlMethod, but I'm not sure what that is used for. > > Can anyone help get me started, I'm concerned mostly with the > communication, I reckon I could actually get somewhere if I can just > nail the first bit, here's my code so far: > > * Cheers in advance, Mike. > > > import usb > import sys > import os > import time > from array import array > > class DeviceDescriptor: > def __init__(self, vendor_id, product_id, interface_id) : > self.vendor_id = vendor_id > self.product_id = product_id > self.interface_id = interface_id > > def get_device(self) : > buses = usb.busses() > for bus in buses : > for device in bus.devices : > if device.idVendor == self.vendor_id : > if device.idProduct == self.product_id : > return device > return None > > class XFPS(): > VENDOR_ID = 0x067B #: Vendor Id > PRODUCT_ID = 0x0000 #: Product Id for the bridged usb cable > INTERFACE_ID = 0 #: The interface we use to talk to the device > BULK_IN_EP = 0x83 #: Endpoint for Bulk reads > BULK_OUT_EP = 0x02 #: Endpoint for Bulk writes > PACKET_LENGTH = 0x40 #: 64 bytes > > device_descriptor = DeviceDescriptor(VENDOR_ID, \ > PRODUCT_ID, INTERFACE_ID) > > def __init__(self,) : > # The actual device (PyUSB object) > self.device = self.device_descriptor.get_device() > # Handle that is used to communicate with device. Setup in L{open} > self.handle = None > > def open(self) : > self.device = self.device_descriptor.get_device() > if not self.device: > print >> sys.stderr, "Cable isn't plugged in" > try: > self.handle = self.device.open() > self.handle.claimInterface(self.device_descriptor.interface_id) > except usb.USBError, err: > print >> sys.stderr, err > > def close(self): > """ Release device interface """ > try: > self.handle.reset() > self.handle.releaseInterface() > except Exception, err: > print >> sys.stderr, err > self.handle, self.device = None, None > > def my_bulk_write(self): > A = chr(0x75) # u > B = chr(0x69) # i > X = chr(0x6F) # o > Y = chr(0x70) # p > LB = chr(0x6C) # l > RB = chr(0x6B) # k > LT = chr(0x68) # h > RT = chr(0x6A) # j > > S = chr(0x32) > s = chr(0x73) > > self.close() > self.open() > > msg = [A,B,A,B,A,B,A,B] > #help(self.handle.bulkWrite) > help(self.handle.interruptWrite) > sent_bytes = self.handle.interruptWrite(XFPS.BULK_OUT_EP,msg,1000) > print sent_bytes > if sent_bytes: > read_bytes = self.handle.interruptRead(0x81,sent_bytes); > print read_bytes > > xfps = XFPS() > xfps.open() > xfps.my_bulk_write() > > > Device info: > ------------ > > Full Speed device @ 3 (0x1D100000): > ............................................. Composite device from > Prolific Technology, Inc. > Device Descriptor > Descriptor Version Number: 0x0100 > Device Class: 0 (Composite) > Device Subclass: 0 > Device Protocol: 0 > Device MaxPacketSize: 8 > Device VendorID/ProductID: 0x067B/0x0000 (Prolific > Technology, Inc.) > Device Version Number: 0x0000 > Number of Configurations: 1 > Manufacturer String: 1 "Prolific Technology Inc." > Product String: 0 (none) > Serial Number String: 0 (none) > Configuration Descriptor > Length (and contents): 39 > Raw Descriptor (hex) 0000: 09 02 27 00 01 01 00 A0 32 > 09 04 00 00 03 FF 00 > Raw Descriptor (hex) 0010: 00 00 07 05 81 03 01 00 01 > 07 05 02 02 40 00 00 > Raw Descriptor (hex) 0020: 07 05 83 02 40 00 00 > Number of Interfaces: 1 > Configuration Value: 1 > Attributes: 0xA0 (bus-powered, remote wakeup) > MaxPower: 100 ma > Interface #0 - Vendor-specific > Alternate Setting 0 > Number of Endpoints 3 > Interface Class: 255 (Vendor-specific) > Interface Subclass; 0 (Vendor-specific) > Interface Protocol: 0 > Endpoint 0x81 - Interrupt Input > Address: 0x81 (IN) > Attributes: 0x03 (Interrupt no synchronization data > endpoint) > Max Packet Size: 1 > Polling Interval: 1 ms > Endpoint 0x02 - Bulk Output > Address: 0x02 (OUT) > Attributes: 0x02 (Bulk no synchronization data endpoint) > Max Packet Size: 64 > Polling Interval: 0 ms > Endpoint 0x83 - Bulk Input > Address: 0x83 (IN) > Attributes: 0x02 (Bulk no synchronization data endpoint) > Max Packet Size: 64 > Polling Interval: 0 ms > > > ------------------------------------------------------------------------- > 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 > Pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users > |
From: Mike H. <me...@mi...> - 2008-03-19 20:22:08
|
Hi all, I'm very new to this list, so hello all! I'm just starting out using python, my background is lamp. I have a Prolific Technologies bridged usb cable that I wish to talk to using pyusb and libusb, I've tried following examples and compiling my own code but I'm really struggling getting it to work. I'm trying to send a sequence of letters to the cable, for them to reappear on the other side. I've been trying to use bulkWrite and bulkRead methods but I'm not sure I'm using them right. There's also controlMethod, but I'm not sure what that is used for. Can anyone help get me started, I'm concerned mostly with the communication, I reckon I could actually get somewhere if I can just nail the first bit, here's my code so far: * Cheers in advance, Mike. import usb import sys import os import time from array import array class DeviceDescriptor: def __init__(self, vendor_id, product_id, interface_id) : self.vendor_id = vendor_id self.product_id = product_id self.interface_id = interface_id def get_device(self) : buses = usb.busses() for bus in buses : for device in bus.devices : if device.idVendor == self.vendor_id : if device.idProduct == self.product_id : return device return None class XFPS(): VENDOR_ID = 0x067B #: Vendor Id PRODUCT_ID = 0x0000 #: Product Id for the bridged usb cable INTERFACE_ID = 0 #: The interface we use to talk to the device BULK_IN_EP = 0x83 #: Endpoint for Bulk reads BULK_OUT_EP = 0x02 #: Endpoint for Bulk writes PACKET_LENGTH = 0x40 #: 64 bytes device_descriptor = DeviceDescriptor(VENDOR_ID, \ PRODUCT_ID, INTERFACE_ID) def __init__(self,) : # The actual device (PyUSB object) self.device = self.device_descriptor.get_device() # Handle that is used to communicate with device. Setup in L{open} self.handle = None def open(self) : self.device = self.device_descriptor.get_device() if not self.device: print >> sys.stderr, "Cable isn't plugged in" try: self.handle = self.device.open() self.handle.claimInterface(self.device_descriptor.interface_id) except usb.USBError, err: print >> sys.stderr, err def close(self): """ Release device interface """ try: self.handle.reset() self.handle.releaseInterface() except Exception, err: print >> sys.stderr, err self.handle, self.device = None, None def my_bulk_write(self): A = chr(0x75) # u B = chr(0x69) # i X = chr(0x6F) # o Y = chr(0x70) # p LB = chr(0x6C) # l RB = chr(0x6B) # k LT = chr(0x68) # h RT = chr(0x6A) # j S = chr(0x32) s = chr(0x73) self.close() self.open() msg = [A,B,A,B,A,B,A,B] #help(self.handle.bulkWrite) help(self.handle.interruptWrite) sent_bytes = self.handle.interruptWrite(XFPS.BULK_OUT_EP,msg,1000) print sent_bytes if sent_bytes: read_bytes = self.handle.interruptRead(0x81,sent_bytes); print read_bytes xfps = XFPS() xfps.open() xfps.my_bulk_write() Device info: ------------ Full Speed device @ 3 (0x1D100000): ............................................. Composite device from Prolific Technology, Inc. Device Descriptor Descriptor Version Number: 0x0100 Device Class: 0 (Composite) Device Subclass: 0 Device Protocol: 0 Device MaxPacketSize: 8 Device VendorID/ProductID: 0x067B/0x0000 (Prolific Technology, Inc.) Device Version Number: 0x0000 Number of Configurations: 1 Manufacturer String: 1 "Prolific Technology Inc." Product String: 0 (none) Serial Number String: 0 (none) Configuration Descriptor Length (and contents): 39 Raw Descriptor (hex) 0000: 09 02 27 00 01 01 00 A0 32 09 04 00 00 03 FF 00 Raw Descriptor (hex) 0010: 00 00 07 05 81 03 01 00 01 07 05 02 02 40 00 00 Raw Descriptor (hex) 0020: 07 05 83 02 40 00 00 Number of Interfaces: 1 Configuration Value: 1 Attributes: 0xA0 (bus-powered, remote wakeup) MaxPower: 100 ma Interface #0 - Vendor-specific Alternate Setting 0 Number of Endpoints 3 Interface Class: 255 (Vendor-specific) Interface Subclass; 0 (Vendor-specific) Interface Protocol: 0 Endpoint 0x81 - Interrupt Input Address: 0x81 (IN) Attributes: 0x03 (Interrupt no synchronization data endpoint) Max Packet Size: 1 Polling Interval: 1 ms Endpoint 0x02 - Bulk Output Address: 0x02 (OUT) Attributes: 0x02 (Bulk no synchronization data endpoint) Max Packet Size: 64 Polling Interval: 0 ms Endpoint 0x83 - Bulk Input Address: 0x83 (IN) Attributes: 0x02 (Bulk no synchronization data endpoint) Max Packet Size: 64 Polling Interval: 0 ms |
From: Giles B. <gi...@gm...> - 2008-02-03 02:19:16
|
> 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. Googling it. Very much not familiar with the detailed specs, but willing to learn. :-) -- Giles Bowkett Podcast: http://hollywoodgrit.blogspot.com Blog: http://gilesbowkett.blogspot.com Portfolio: http://www.gilesgoatboy.org Tumblelog: http://giles.tumblr.com |
From: Sarah M. <iku...@ya...> - 2008-02-03 01:38:32
|
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 <wan...@gm...> 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 > Pyu...@li... > 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 Pyu...@li... https://lists.sourceforge.net/lists/listinfo/pyusb-users -Sarah --------------------------------- Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. |
From: Giles B. <gi...@gm...> - 2008-02-03 01:35:07
|
On 2/2/08, Wander Lairson <wan...@gm...> 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... Hi Wander - awesome, thank you. So the question is basically how to access my device via USB control transfer. The device actually has an internal USB-to-serial converter, hopefully that's no obstacle though. -- Giles Bowkett Podcast: http://hollywoodgrit.blogspot.com Blog: http://gilesbowkett.blogspot.com Portfolio: http://www.gilesgoatboy.org Tumblelog: http://giles.tumblr.com |
From: Wander L. <wan...@gm...> - 2008-02-03 00:04:18
|
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 <gi...@gm...>: > 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 > Pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users > |
From: Giles B. <gi...@gm...> - 2008-02-02 16:12:35
|
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 |
From: betoman <be...@gm...> - 2008-01-15 18:46:28
|
hi, I have an IR interface with serial port and usb adapter... i have no serial port so im tryiing to use it with usb and python... my problem is that i cannot do anything xD I tried do this: *import usb for bus in usb.busses(): for dev in bus.devices: if dev.idVendor==0x4fc and dev.idProduct==0x201: IR=dev >>> IR.open().detachKernelDriver(IR.configurations[0].interfaces[0][0]) Traceback (most recent call last): File "<stdin>", line 1, in ? usb.USBError: could not detach kernel driver from interface 0: No data available >>> a.open().claimInterface(a.configurations[0].interfaces[0][0]) >>> >>> a.open().bulkRead(a.configurations [0].interfaces[0][0].endpoints[0].address,30) Traceback (most recent call last): File "<stdin>", line 1, in ? usb.USBError: could not detach kernel driver from interface 0: No data available* after bulkRead dmesg throws *usb 1-1: usbfs: process 4886 (python) did not claim interface 0 before use* and I dont know what i can do mi kernel : 2.6.22 im using Python 2.4.4 the IR interface is kosmos if anyone knows it... thanks |
From: Wander L. <wan...@gm...> - 2007-11-10 14:30:29
|
Seems that libusb header is not in the include path of the gcc. Try to locate where libusb installation has put it on... After that, you can modify the setup.py script to add the header path to gcc... 2007/11/8, John Fisher <joh...@co...>: > Hi Group, > > It looks like it might take a little while for this message to get > seen, but here goes. I am trying to install pyUSB on my MacBook Pro. > It is therefor an Intel machine. OS X 10.4.10 ( I am afraid to jump > right in to Leopard...). I have installed libusb first. It did not > pass all the tests in make test, but I proceeded blithely to attempt > the install of pyUSB. Here is the terminal window result: > > Last login: Thu Nov 8 11:11:24 on ttyp1 > Welcome to Darwin! > john-fishers-computer:~ johnfisher$ cd "/Users/johnfisher/Desktop/ > pyusb-0.4.1" > john-fishers-computer:~/Desktop/pyusb-0.4.1 johnfisher$ python > setup.py install > running install > running build > running build_ext > building 'usb' extension > creating build > creating build/temp.macosx-10.3-fat-2.5 > gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk - > fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd - > fno-common -dynamic -DNDEBUG -g -O3 -I/Library/Frameworks/ > Python.framework/Versions/2.5/include/python2.5 -c pyusb.c -o build/ > temp.macosx-10.3-fat-2.5/pyusb.o -I/sw/include > In file included from pyusb.c:11In file included from pyusb.c:11: > pyusb.h:6:17: error: usb.h: No such file or directory > : > pyusb.h:6:17: error: usb.h: No such file or directory > In file included from pyusb.c:11: > pyusb.h:120: error: parse error before 'usb_dev_handle' > pyusb.h:120: warning: no semicolon at end of struct or union > pyusb.h:122: error: parse error before '}' token > pyusb.h:122: warning: data definition has no type or storage class > In file included from pyusb.c:11: > pyusb.h:120: error: parse error before 'usb_dev_handle' > pyusb.h:120: warning: no semicolon at end of struct or unionpyusb.h: > 131: warning: 'struct usb_endpoint_descriptor' declared inside > parameter list > > pyusb.h:131: warning: its scope is only this definition or > declaration, which is probably not what you want > pyusb.h:122: error: parse error before '}' token > pyusb.h:135: warning: 'struct usb_endpoint_descriptor' declared > inside parameter list > pyusb.h:122: warning: data definition has no type or storage class > pyusb.h:140: warning: 'struct usb_interface_descriptor' declared > inside parameter list > pyusb.h:131: warning: 'struct usb_endpoint_descriptor' declared > inside parameter list > pyusb.h:131: warning: its scope is only this definition or > declaration, which is probably not what you want > pyusb.h:144: warning: 'struct usb_interface_descriptor' declared > inside parameter list > pyusb.h:135: warning: 'struct usb_endpoint_descriptor' declared > inside parameter list > pyusb.h:140: warning: 'struct usb_interface_descriptor' declared > inside parameter list > pyusb.h:144: warning: 'struct usb_interface_descriptor' declared > inside parameter list > pyusb.h:149: warning: 'struct usb_config_descriptor' declared inside > parameter list > pyusb.h:153: warning: 'struct usb_config_descriptor' declared inside > parameter list > pyusb.h:171: warning: 'struct usb_bus' declared inside parameter list > pyusb.h:149: warning: 'struct usb_config_descriptor' declared inside > parameter list > pyusb.h:153: warning: 'struct usb_config_descriptor' declared inside > parameter list > pyusb.h:171: warning: 'struct usb_bus' declared inside parameter list > pyusb.h:239: error: parse error before '*' token > pyusb.h:241: warning: data definition has no type or storage class > pyusb.h:239: error: parse error before '*' token > pyusb.h:241: warning: data definition has no type or storage class > pyusb.c: In function 'getBuffer': > pyusb.c:143: warning: passing argument 3 of > 'PyString_AsStringAndSize' from incompatible pointer type > pyusb.c: In function 'getBuffer': > pyusb.c:143: warning: passing argument 3 of > 'PyString_AsStringAndSize' from incompatible pointer type > pyusb.c: In function 'installModuleConstants': > pyusb.c:236: error: 'USB_CLASS_PER_INTERFACE' undeclared (first use > in this function) > pyusb.c:236: error: (Each undeclared identifier is reported only once > pyusb.c:236: error: for each function it appears in.) > pyusb.c:237: error: 'USB_CLASS_AUDIO' undeclared (first use in this > function) > pyusb.c:238: error: 'USB_CLASS_COMM' undeclared (first use in this > function) > pyusb.c:239: error: 'USB_CLASS_HID' undeclared (first use in this > function) > pyusb.c:240: error: 'USB_CLASS_PRINTER' undeclared (first use in this > function) > pyusb.c:241: error: 'USB_CLASS_MASS_STORAGE' undeclared (first use in > this function) > pyusb.c:242: error: 'USB_CLASS_HUB' undeclared (first use in this > function) > pyusb.c:243: error: 'USB_CLASS_DATA' undeclared (first use in this > function) > pyusb.c:244: error: 'USB_CLASS_VENDOR_SPEC' undeclared (first use in > this function) > pyusb.c:245: error: 'USB_DT_DEVICE' undeclared (first use in this > function) > pyusb.c:246: error: 'USB_DT_CONFIG' undeclared (first use in this > function) > pyusb.c:247: error: 'USB_DT_STRING' undeclared (first use in this > function) > pyusb.c:248: error: 'USB_DT_INTERFACE' undeclared (first use in this > function) > pyusb.c:249: error: 'USB_DT_ENDPOINT' undeclared (first use in this > function) > pyusb.c:250: error: 'USB_DT_HID' undeclared (first use in this function) > pyusb.c:251: error: 'USB_DT_REPORT' undeclared (first use in this > function) > pyusb.c:252: error: 'USB_DT_PHYSICAL' undeclared (first use in this > function) > pyusb.c:253: error: 'USB_DT_HUB' undeclared (first use in this function) > pyusb.c:254: error: 'USB_DT_DEVICE_SIZE' undeclared (first use in > this function) > pyusb.c:255: error: 'USB_DT_CONFIG_SIZE' undeclared (first use in > this function) > pyusb.c:256: error: 'USB_DT_INTERFACE_SIZE' undeclared (first use in > this function) > pyusb.c:257: error: 'USB_DT_ENDPOINT_SIZE' undeclared (first use in > this function) > pyusb.c:258: error: 'USB_DT_ENDPOINT_AUDIO_SIZE' undeclared (first > use in this function) > pyusb.c:259: error: 'USB_DT_HUB_NONVAR_SIZE' undeclared (first use in > this function) > pyusb.c:260: error: 'USB_MAXENDPOINTS' undeclared (first use in this > function) > pyusb.c:261: error: 'USB_ENDPOINT_ADDRESS_MASK' undeclared (first use > in this function) > pyusb.c:262: error: 'USB_ENDPOINT_DIR_MASK' undeclared (first use in > this function) > pyusb.c:263: error: 'USB_ENDPOINT_TYPE_MASK' undeclared (first use in > this function) > pyusb.c:264: error: 'USB_ENDPOINT_TYPE_CONTROL' undeclared (first use > in this function) > pyusb.c:265: error: 'USB_ENDPOINT_TYPE_ISOCHRONOUS' undeclared (first > use in this function) > pyusb.c:266: error: 'USB_ENDPOINT_TYPE_BULK' undeclared (first use in > this function) > pyusb.c:267: error: 'USB_ENDPOINT_TYPE_INTERRUPT' undeclared (first > use in this function) > pyusb.c:268: error: 'USB_MAXINTERFACES' undeclared (first use in this > function) > pyusb.c:269: error: 'USB_MAXALTSETTING' undeclared (first use in this > function) > pyusb.c:270: error: 'USB_MAXCONFIG' undeclared (first use in this > function) > pyusb.c:271: error: 'USB_REQ_GET_STATUS' undeclared (first use in > this function) > pyusb.c:272: error: 'USB_REQ_CLEAR_FEATURE' undeclared (first use in > this function) > pyusb.c:273: error: 'USB_REQ_SET_FEATURE' undeclared (first use in > this function) > pyusb.c:274: error: 'USB_REQ_SET_ADDRESS' undeclared (first use in > this function) > pyusb.c:275: error: 'USB_REQ_GET_DESCRIPTOR' undeclared (first use in > this function) > pyusb.c:276: error: 'USB_REQ_SET_DESCRIPTOR' undeclared (first use in > this function) > pyusb.c:277: error: 'USB_REQ_GET_CONFIGURATION' undeclared (first use > in this function) > pyusb.c:278: error: 'USB_REQ_SET_CONFIGURATION' undeclared (first use > in this function) > pyusb.c:279: error: 'USB_REQ_GET_INTERFACE' undeclared (first use in > this function) > pyusb.c:280: error: 'USB_REQ_SET_INTERFACE' undeclared (first use in > this function) > pyusb.c:281: error: 'USB_REQ_SYNCH_FRAME' undeclared (first use in > this function) > pyusb.c:282: error: 'USB_TYPE_STANDARD' undeclared (first use in this > function) > pyusb.c:283: error: 'USB_TYPE_CLASS' undeclared (first use in this > function) > pyusb.c:284: error: 'USB_TYPE_VENDOR' undeclared (first use in this > function) > pyusb.c:285: error: 'USB_TYPE_RESERVED' undeclared (first use in this > function) > pyusb.c:286: error: 'USB_RECIP_DEVICE' undeclared (first use in this > function) > pyusb.c:287: error: 'USB_RECIP_INTERFACE' undeclared (first use in > this function) > pyusb.c:288: error: 'USB_RECIP_ENDPOINT' undeclared (first use in > this function) > pyusb.c:289: error: 'USB_RECIP_OTHER' undeclared (first use in this > function) > pyusb.c:290: error: 'USB_ENDPOINT_IN' undeclared (first use in this > function) > pyusb.c:291: error: 'USB_ENDPOINT_OUT' undeclared (first use in this > function) > pyusb.c:292: error: 'USB_ERROR_BEGIN' undeclared (first use in this > function) > pyusb.c: At top level: > pyusb.c:395: warning: 'struct usb_endpoint_descriptor' declared > inside parameter list > pyusb.c:396: error: conflicting types for 'set_Endpoint_fields' > pyusb.h:131: error: previous declaration of 'set_Endpoint_fields' was > here > pyusb.c: In function 'set_Endpoint_fields': > pyusb.c:397: error: dereferencing pointer to incomplete type > pyusb.c: In function 'installModuleConstants': > pyusb.c:236: error: 'USB_CLASS_PER_INTERFACE' undeclared (first use > in this function) > pyusb.c:236: error: (Each undeclared identifier is reported only once > pyusb.c:236: error: for each function it appears in.) > pyusb.c:237: error: 'USB_CLASS_AUDIO' undeclared (first use in this > function) > pyusb.c:238: error: 'USB_CLASS_COMM' undeclared (first use in this > function) > pyusb.c:239: error: 'USB_CLASS_HID' undeclared (first use in this > function) > pyusb.c:398: error: dereferencing pointer to incomplete type > pyusb.c:240: error: 'USB_CLASS_PRINTER' undeclared (first use in this > function) > pyusb.c:399: error: dereferencing pointer to incomplete type > pyusb.c:400: error: dereferencing pointer to incomplete type > pyusb.c:241: error: 'USB_CLASS_MASS_STORAGE' undeclared (first use in > this function) > pyusb.c:401: error: dereferencing pointer to incomplete typepyusb.c: > 242: error: 'USB_CLASS_HUB' undeclared (first use in this function) > > pyusb.c:243: error: 'USB_CLASS_DATA' undeclared (first use in this > function) > pyusb.c:244: error: 'USB_CLASS_VENDOR_SPEC' undeclared (first use in > this function)pyusb.c: At top level: > pyusb.c:407: warning: 'struct usb_endpoint_descriptor' declared > inside parameter list > > pyusb.c:245: error: 'USB_DT_DEVICE' undeclared (first use in this > function) > pyusb.c:408: error: conflicting types for 'new_Endpoint' > pyusb.h:135: error: previous declaration of 'new_Endpoint' was here > pyusb.c:246: error: 'USB_DT_CONFIG' undeclared (first use in this > function) > pyusb.c:247: error: 'USB_DT_STRING' undeclared (first use in this > function) > pyusb.c:248: error: 'USB_DT_INTERFACE' undeclared (first use in this > function)pyusb.c: In function 'new_Endpoint': > pyusb.c:415: warning: passing argument 2 of 'set_Endpoint_fields' > from incompatible pointer type > > pyusb.c:249: error: 'USB_DT_ENDPOINT' undeclared (first use in this > function) > pyusb.c:250: error: 'USB_DT_HID' undeclared (first use in this function) > pyusb.c:251: error: 'USB_DT_REPORT' undeclared (first use in this > function) > pyusb.c:252: error: 'USB_DT_PHYSICAL' undeclared (first use in this > function) > pyusb.c:253: error: 'USB_DT_HUB' undeclared (first use in this function) > pyusb.c:254: error: 'USB_DT_DEVICE_SIZE' undeclared (first use in > this function) > pyusb.c:255: error: 'USB_DT_CONFIG_SIZE' undeclared (first use in > this function) > pyusb.c:256: error: 'USB_DT_INTERFACE_SIZE' undeclared (first use in > this function) > pyusb.c:257: error: 'USB_DT_ENDPOINT_SIZE' undeclared (first use in > this function) > pyusb.c:258: error: 'USB_DT_ENDPOINT_AUDIO_SIZE' undeclared (first > use in this function) > pyusb.c:259: error: 'USB_DT_HUB_NONVAR_SIZE' undeclared (first use in > this function) > pyusb.c:260: error: 'USB_MAXENDPOINTS' undeclared (first use in this > function) > pyusb.c:261: error: 'USB_ENDPOINT_ADDRESS_MASK' undeclared (first use > in this function) > pyusb.c: At top level:pyusb.c:262: error: 'USB_ENDPOINT_DIR_MASK' > undeclared (first use in this function) > > pyusb.c:263: error: 'USB_ENDPOINT_TYPE_MASK' undeclared (first use in > this function)pyusb.c:528: warning: 'struct usb_interface_descriptor' > declared inside parameter list > > pyusb.c:529: error: conflicting types for 'set_Interface_fields' > pyusb.h:140: error: previous declaration of 'set_Interface_fields' > was here > pyusb.c:264: error: 'USB_ENDPOINT_TYPE_CONTROL' undeclared (first use > in this function) > pyusb.c:265: error: 'USB_ENDPOINT_TYPE_ISOCHRONOUS' undeclared (first > use in this function)pyusb.c: In function 'set_Interface_fields': > pyusb.c:532: error: dereferencing pointer to incomplete type > > pyusb.c:266: error: 'USB_ENDPOINT_TYPE_BULK' undeclared (first use in > this function)pyusb.c:533: error: dereferencing pointer to incomplete > type > > pyusb.c:534: error: dereferencing pointer to incomplete type > pyusb.c:535: error: dereferencing pointer to incomplete type > pyusb.c:267: error: 'USB_ENDPOINT_TYPE_INTERRUPT' undeclared (first > use in this function) > pyusb.c:268: error: 'USB_MAXINTERFACES' undeclared (first use in this > function)pyusb.c:536: error: dereferencing pointer to incomplete type > > pyusb.c:537: error: dereferencing pointer to incomplete type > pyusb.c:539: error: dereferencing pointer to incomplete type > pyusb.c:545: error: dereferencing pointer to incomplete type > pyusb.c:546: error: dereferencing pointer to incomplete type > pyusb.c:269: error: 'USB_MAXALTSETTING' undeclared (first use in this > function)pyusb.c: At top level: > pyusb.c:552: warning: 'struct usb_interface_descriptor' declared > inside parameter list > > pyusb.c:553: error: conflicting types for 'new_Interface' > pyusb.h:144: error: previous declaration of 'new_Interface' was here > pyusb.c:270: error: 'USB_MAXCONFIG' undeclared (first use in this > function) > pyusb.c:271: error: 'USB_REQ_GET_STATUS' undeclared (first use in > this function) > pyusb.c: In function 'new_Interface': > pyusb.c:272: error: 'USB_REQ_CLEAR_FEATURE' undeclared (first use in > this function) > pyusb.c:559: warning: passing argument 2 of 'set_Interface_fields' > from incompatible pointer typepyusb.c:273: error: > 'USB_REQ_SET_FEATURE' undeclared (first use in this function) > > pyusb.c:274: error: 'USB_REQ_SET_ADDRESS' undeclared (first use in > this function) > pyusb.c:275: error: 'USB_REQ_GET_DESCRIPTOR' undeclared (first use in > this function) > pyusb.c:276: error: 'USB_REQ_SET_DESCRIPTOR' undeclared (first use in > this function) > pyusb.c:277: error: 'USB_REQ_GET_CONFIGURATION' undeclared (first use > in this function) > pyusb.c:278: error: 'USB_REQ_SET_CONFIGURATION' undeclared (first use > in this function) > pyusb.c:279: error: 'USB_REQ_GET_INTERFACE' undeclared (first use in > this function) > pyusb.c:280: error: 'USB_REQ_SET_INTERFACE' undeclared (first use in > this function) > pyusb.c:281: error: 'USB_REQ_SYNCH_FRAME' undeclared (first use in > this function) > pyusb.c:282: error: 'USB_TYPE_STANDARD' undeclared (first use in this > function) > pyusb.c:283: error: 'USB_TYPE_CLASS' undeclared (first use in this > function) > pyusb.c:284: error: 'USB_TYPE_VENDOR' undeclared (first use in this > function) > pyusb.c:285: error: 'USB_TYPE_RESERVED' undeclared (first use in this > function) > pyusb.c:286: error: 'USB_RECIP_DEVICE' undeclared (first use in this > function) > pyusb.c:287: error: 'USB_RECIP_INTERFACE' undeclared (first use in > this function) > pyusb.c:288: error: 'USB_RECIP_ENDPOINT' undeclared (first use in > this function)pyusb.c: At top level: > pyusb.c:687: warning: 'struct usb_config_descriptor' declared inside > parameter list > > pyusb.c:289: error: 'USB_RECIP_OTHER' undeclared (first use in this > function)pyusb.c:688: error: conflicting types for > 'set_Configuration_fields' > pyusb.h:149: error: previous declaration of > 'set_Configuration_fields' was here > > pyusb.c:290: error: 'USB_ENDPOINT_IN' undeclared (first use in this > function) > pyusb.c:291: error: 'USB_ENDPOINT_OUT' undeclared (first use in this > function)pyusb.c: In function 'set_Configuration_fields': > > pyusb.c:292: error: 'USB_ERROR_BEGIN' undeclared (first use in this > function)pyusb.c:692: error: dereferencing pointer to incomplete type > > pyusb.c:693: error: dereferencing pointer to incomplete type > pyusb.c:694: error: dereferencing pointer to incomplete type > pyusb.c:695: error: dereferencing pointer to incomplete type > pyusb.c:696: error: dereferencing pointer to incomplete type > pyusb.c:697: error: dereferencing pointer to incomplete type > pyusb.c:699: error: dereferencing pointer to incomplete type > pyusb.c:703: error: dereferencing pointer to incomplete type > pyusb.c:704: error: dereferencing pointer to incomplete type > pyusb.c:710: error: dereferencing pointer to incomplete type > pyusb.c: At top level: > pyusb.c:719: warning: 'struct usb_config_descriptor' declared inside > parameter list > pyusb.c:720: error: conflicting types for 'new_Configuration' > pyusb.h:153: error: previous declaration of 'new_Configuration' was > herepyusb.c: At top level: > pyusb.c:395: warning: 'struct usb_endpoint_descriptor' declared > inside parameter list > > pyusb.c:396: error: conflicting types for > 'set_Endpoint_fields'pyusb.c: In function 'new_Configuration': > pyusb.c:726: warning: passing argument 2 of > 'set_Configuration_fields' from incompatible pointer type > > pyusb.h:131: error: previous declaration of 'set_Endpoint_fields' was > here > pyusb.c: In function 'set_Endpoint_fields': > pyusb.c:397: error: dereferencing pointer to incomplete type > pyusb.c:398: error: dereferencing pointer to incomplete type > pyusb.c:399: error: dereferencing pointer to incomplete type > pyusb.c:400: error: dereferencing pointer to incomplete type > pyusb.c:401: error: dereferencing pointer to incomplete type > pyusb.c: At top level: > pyusb.c:407: warning: 'struct usb_endpoint_descriptor' declared > inside parameter list > pyusb.c:408: error: conflicting types for 'new_Endpoint' > pyusb.h:135: error: previous declaration of 'new_Endpoint' was here > pyusb.c: In function 'new_Endpoint': > pyusb.c:415: warning: passing argument 2 of 'set_Endpoint_fields' > from incompatible pointer type > pyusb.c: In function 'set_Device_fields': > pyusb.c:908: error: dereferencing pointer to incomplete type > pyusb.c:911: error: dereferencing pointer to incomplete type > pyusb.c:912: error: dereferencing pointer to incomplete type > pyusb.c:914: error: dereferencing pointer to incomplete type > pyusb.c:915: error: dereferencing pointer to incomplete typepyusb.c: > At top level: > pyusb.c:528: warning: 'struct usb_interface_descriptor' declared > inside parameter list > > pyusb.c:529: error: conflicting types for 'set_Interface_fields' > pyusb.h:140: error: previous declaration of 'set_Interface_fields' > was here > pyusb.c:918: error: dereferencing pointer to incomplete type > pyusb.c: In function 'set_Interface_fields': > pyusb.c:532: error: dereferencing pointer to incomplete type > pyusb.c:919: error: dereferencing pointer to incomplete type > pyusb.c:533: error: dereferencing pointer to incomplete typepyusb.c: > 921: error: dereferencing pointer to incomplete type > > pyusb.c:922: error: dereferencing pointer to incomplete typepyusb.c: > 534: error: dereferencing pointer to incomplete type > pyusb.c:535: error: dereferencing pointer to incomplete type > > pyusb.c:925: error: dereferencing pointer to incomplete typepyusb.c: > 536: error: dereferencing pointer to incomplete type > > pyusb.c:926: error: dereferencing pointer to incomplete typepyusb.c: > 537: error: dereferencing pointer to incomplete type > > pyusb.c:927: error: dereferencing pointer to incomplete type > pyusb.c:928: error: dereferencing pointer to incomplete typepyusb.c: > 539: error: dereferencing pointer to incomplete type > > pyusb.c:929: error: dereferencing pointer to incomplete typepyusb.c: > 545: error: dereferencing pointer to incomplete type > > pyusb.c:546: error: dereferencing pointer to incomplete typepyusb.c: > 930: error: dereferencing pointer to incomplete type > pyusb.c:931: error: dereferencing pointer to incomplete type > > pyusb.c:932: error: dereferencing pointer to incomplete type > pyusb.c:933: error: dereferencing pointer to incomplete type > pyusb.c: At top level: > pyusb.c:552: warning: 'struct usb_interface_descriptor' declared > inside parameter listpyusb.c:934: error: dereferencing pointer to > incomplete type > > pyusb.c:937: error: dereferencing pointer to incomplete typepyusb.c: > 553: error: conflicting types for 'new_Interface' > pyusb.h:144: error: previous declaration of 'new_Interface' was here > > pyusb.c:942: error: dereferencing pointer to incomplete type > pyusb.c:946: error: dereferencing pointer to incomplete type > pyusb.c: In function 'new_Interface': > pyusb.c:947: error: dereferencing pointer to incomplete type > pyusb.c:559: warning: passing argument 2 of 'set_Interface_fields' > from incompatible pointer type > pyusb.c: At top level: > pyusb.c:1056: warning: 'struct usb_bus' declared inside parameter > listpyusb.c: At top level: > > pyusb.c:1057: error: conflicting types for 'new_Bus' > pyusb.h:171: error: previous declaration of 'new_Bus' was herepyusb.c: > 687: warning: 'struct usb_config_descriptor' declared inside > parameter list > > pyusb.c: In function 'new_Bus': > pyusb.c:1065: error: dereferencing pointer to incomplete type > pyusb.c:1066: error: dereferencing pointer to incomplete type > pyusb.c:1067: error: dereferencing pointer to incomplete type > pyusb.c:1067: error: dereferencing pointer to incomplete type > pyusb.c:1075: error: dereferencing pointer to incomplete type > pyusb.c:1075: error: dereferencing pointer to incomplete type > pyusb.c: In function 'Py_usb_DeviceHandle_controlMsg': > pyusb.c:1100: error: '_self' undeclared (first use in this function) > pyusb.c:1100: error: parse error before ')' token > pyusb.c:1186: warning: passing argument 2 of 'PyErr_SetString' makes > pointer from integer without a cast > pyusb.c:688: error: conflicting types for 'set_Configuration_fields' > pyusb.h:149: error: previous declaration of > 'set_Configuration_fields' was here > pyusb.c: In function 'Py_usb_DeviceHandle_setConfiguration': > pyusb.c:1206: error: '_self' undeclared (first use in this function) > pyusb.c: In function 'set_Configuration_fields': > pyusb.c:692: error: dereferencing pointer to incomplete type > > pyusb.c:693: error: dereferencing pointer to incomplete type > pyusb.c:694: error: dereferencing pointer to incomplete typepyusb.c: > 1206: error: parse error before ')' token > > pyusb.c:695: error: dereferencing pointer to incomplete type > pyusb.c:696: error: dereferencing pointer to incomplete type > pyusb.c:697: error: dereferencing pointer to incomplete type > pyusb.c:1232: warning: passing argument 2 of 'PyErr_SetString' makes > pointer from integer without a castpyusb.c:699: error: dereferencing > pointer to incomplete type > > pyusb.c:703: error: dereferencing pointer to incomplete type > pyusb.c:704: error: dereferencing pointer to incomplete type > pyusb.c:710: error: dereferencing pointer to incomplete type > pyusb.c: In function 'Py_usb_DeviceHandle_claimInterface': > pyusb.c:1245: error: '_self' undeclared (first use in this function) > pyusb.c:1245: error: parse error before ')' token > pyusb.c: At top level: > pyusb.c:719: warning: 'struct usb_config_descriptor' declared inside > parameter list > pyusb.c:720: error: conflicting types for 'new_Configuration' > pyusb.h:153: error: previous declaration of 'new_Configuration' was > herepyusb.c:1266: warning: passing argument 2 of 'PyErr_SetString' > makes pointer from integer without a cast > > pyusb.c: In function 'new_Configuration': > pyusb.c:726: warning: passing argument 2 of > 'set_Configuration_fields' from incompatible pointer type > pyusb.c: In function 'Py_usb_DeviceHandle_detachKernelDriver': > pyusb.c:1282: error: '_self' undeclared (first use in this function) > pyusb.c:1282: error: parse error before ')' token > pyusb.c: In function 'Py_usb_DeviceHandle_releaseInterface': > pyusb.c:1321: error: '_self' undeclared (first use in this function) > pyusb.c:1321: error: parse error before ')' token > pyusb.c:1330: warning: passing argument 2 of 'PyErr_SetString' makes > pointer from integer without a cast > pyusb.c: In function 'Py_usb_DeviceHandle_setAltInterface': > pyusb.c:1349: error: '_self' undeclared (first use in this function) > pyusb.c:1349: error: parse error before ')' token > pyusb.c:1374: warning: passing argument 2 of 'PyErr_SetString' makes > pointer from integer without a cast > pyusb.c: In function 'Py_usb_DeviceHandle_bulkWrite': > pyusb.c:1393: error: '_self' undeclared (first use in this function) > pyusb.c:1393: error: parse error before ')' token > pyusb.c:1427: warning: passing argument 2 of 'PyErr_SetString' makes > pointer from integer without a castpyusb.c: In function > 'set_Device_fields': > pyusb.c:908: error: dereferencing pointer to incomplete type > pyusb.c:911: error: dereferencing pointer to incomplete type > pyusb.c:912: error: dereferencing pointer to incomplete type > pyusb.c:914: error: dereferencing pointer to incomplete type > pyusb.c:915: error: dereferencing pointer to incomplete type > pyusb.c:918: error: dereferencing pointer to incomplete type > pyusb.c:919: error: dereferencing pointer to incomplete type > pyusb.c:921: error: dereferencing pointer to incomplete type > pyusb.c:922: error: dereferencing pointer to incomplete type > pyusb.c:925: error: dereferencing pointer to incomplete type > pyusb.c:926: error: dereferencing pointer to incomplete type > pyusb.c:927: error: dereferencing pointer to incomplete type > pyusb.c:928: error: dereferencing pointer to incomplete type > pyusb.c:929: error: dereferencing pointer to incomplete type > pyusb.c:930: error: dereferencing pointer to incomplete type > pyusb.c:931: error: dereferencing pointer to incomplete type > pyusb.c:932: error: dereferencing pointer to incomplete type > pyusb.c:933: error: dereferencing pointer to incomplete type > pyusb.c:934: error: dereferencing pointer to incomplete type > pyusb.c:937: error: dereferencing pointer to incomplete type > pyusb.c:942: error: dereferencing pointer to incomplete type > pyusb.c:946: error: dereferencing pointer to incomplete type > pyusb.c:947: error: dereferencing pointer to incomplete type > pyusb.c: At top level: > pyusb.c:1056: warning: 'struct usb_bus' declared inside parameter list > pyusb.c:1057: error: conflicting types for 'new_Bus' > pyusb.h:171: error: previous declaration of 'new_Bus' was here > pyusb.c: In function 'new_Bus': > pyusb.c:1065: error: dereferencing pointer to incomplete type > pyusb.c:1066: error: dereferencing pointer to incomplete type > pyusb.c:1067: error: dereferencing pointer to incomplete type > pyusb.c:1067: error: dereferencing pointer to incomplete type > pyusb.c:1075: error: dereferencing pointer to incomplete type > pyusb.c:1075: error: dereferencing pointer to incomplete type > pyusb.c: In function 'Py_usb_DeviceHandle_controlMsg': > pyusb.c:1100: error: '_self' undeclared (first use in this function) > pyusb.c:1100: error: parse error before ')' token > > pyusb.c:1186: warning: passing argument 2 of 'PyErr_SetString' makes > pointer from integer without a cast > pyusb.c: In function 'Py_usb_DeviceHandle_bulkRead': > pyusb.c:1446: error: '_self' undeclared (first use in this function) > pyusb.c:1446: error: parse error before ')' token > pyusb.c: In function 'Py_usb_DeviceHandle_setConfiguration': > pyusb.c:1206: error: '_self' undeclared (first use in this function) > pyusb.c:1206: error: parse error before ')' token > pyusb.c:1478: warning: passing argument 2 of 'PyErr_SetString' makes > pointer from integer without a cast > pyusb.c:1232: warning: passing argument 2 of 'PyErr_SetString' makes > pointer from integer without a cast > pyusb.c: In function 'Py_usb_DeviceHandle_interruptWrite': > pyusb.c:1500: error: '_self' undeclared (first use in this function) > pyusb.c:1500: error: parse error before ')' token > pyusb.c:1534: warning: passing argument 2 of 'PyErr_SetString' makes > pointer from integer without a cast > pyusb.c: In function 'Py_usb_DeviceHandle_claimInterface': > pyusb.c:1245: error: '_self' undeclared (first use in this function) > pyusb.c:1245: error: parse error before ')' token > pyusb.c: In function 'Py_usb_DeviceHandle_interruptRead': > pyusb.c:1553: error: '_self' undeclared (first use in this function) > pyusb.c:1553: error: parse error before ')' token > pyusb.c:1585: warning: passing argument 2 of 'PyErr_SetString' makes > pointer from integer without a cast > pyusb.c:1266: warning: passing argument 2 of 'PyErr_SetString' makes > pointer from integer without a cast > pyusb.c: In function 'Py_usb_DeviceHandle_resetEndpoint': > pyusb.c:1601: error: '_self' undeclared (first use in this function) > pyusb.c:1601: error: parse error before ')' token > pyusb.c:1619: warning: passing argument 2 of 'PyErr_SetString' makes > pointer from integer without a cast > pyusb.c: In function > 'Py_usb_DeviceHandle_detachKernelDriver':pyusb.c: In function > 'Py_usb_DeviceHandle_reset': > pyusb.c:1634: error: parse error before ')' token > pyusb.c:1638: warning: passing argument 2 of 'PyErr_SetString' makes > pointer from integer without a cast > > pyusb.c:1282: error: '_self' undeclared (first use in this function) > pyusb.c:1282: error: parse error before ')' token > pyusb.c: In function 'Py_usb_DeviceHandle_clearHalt': > pyusb.c:1651: error: '_self' undeclared (first use in this function) > pyusb.c:1651: error: parse error before ')' token > pyusb.c:1670: warning: passing argument 2 of 'PyErr_SetString' makes > pointer from integer without a cast > pyusb.c: In function 'Py_usb_DeviceHandle_releaseInterface': > pyusb.c:1321: error: '_self' undeclared (first use in this function) > pyusb.c: In function 'Py_usb_DeviceHandle_getString': > pyusb.c:1690: error: '_self' undeclared (first use in this function) > > pyusb.c:1690: error: parse error before ')' token > pyusb.c:1321: error: parse error before ')' token > pyusb.c:1729: warning: passing argument 2 of 'PyErr_SetString' makes > pointer from integer without a castpyusb.c:1330: warning: passing > argument 2 of 'PyErr_SetString' makes pointer from integer without a > cast > > pyusb.c: In function 'Py_usb_DeviceHandle_setAltInterface': > pyusb.c:1349: error: '_self' undeclared (first use in this function) > pyusb.c: In function 'Py_usb_DeviceHandle_getDescriptor': > pyusb.c:1349: error: parse error before ')' token > pyusb.c:1751: error: '_self' undeclared (first use in this function) > > pyusb.c:1751: error: parse error before ')' token > pyusb.c:1374: warning: passing argument 2 of 'PyErr_SetString' makes > pointer from integer without a cast > pyusb.c: In function 'Py_usb_DeviceHandle_bulkWrite': > pyusb.c:1393: error: '_self' undeclared (first use in this function) > pyusb.c:1393: error: parse error before ')' token > pyusb.c:1792: warning: passing argument 2 of 'PyErr_SetString' makes > pointer from integer without a cast > pyusb.c:1427: warning: passing argument 2 of 'PyErr_SetString' makes > pointer from integer without a cast > pyusb.c: In function 'Py_usb_DeviceHandle_bulkRead': > pyusb.c:1446: error: '_self' undeclared (first use in this function) > pyusb.c:1446: error: parse error before ')' token > pyusb.c:1478: warning: passing argument 2 of 'PyErr_SetString' makes > pointer from integer without a cast > pyusb.c: In function 'Py_usb_DeviceHandle_interruptWrite': > pyusb.c:1500: error: '_self' undeclared (first use in this function) > pyusb.c:1500: error: parse error before ')' token > pyusb.c: In function 'Py_usb_DeviceHandle_del': > pyusb.c:1959: error: '_self' undeclared (first use in this function) > pyusb.c:1534: warning: passing argument 2 of 'PyErr_SetString' makes > pointer from integer without a cast > pyusb.c:1959: error: parse error before ')' token > pyusb.c: In function 'Py_usb_DeviceHandle_interruptRead': > pyusb.c:1553: error: '_self' undeclared (first use in this function) > pyusb.c:1553: error: parse error before ')' token > pyusb.c:1585: warning: passing argument 2 of 'PyErr_SetString' makes > pointer from integer without a cast > pyusb.c: At top level: > pyusb.c:2024: error: parse error before '*' token > pyusb.c: In function 'new_DeviceHandle': > pyusb.c: In function 'Py_usb_DeviceHandle_resetEndpoint': > pyusb.c:1601: error: '_self' undeclared (first use in this function) > pyusb.c:1601: error: parse error before ')' token > pyusb.c:2028: error: 'dh' undeclared (first use in this function) > pyusb.c:2031: error: parse error before ')' token > pyusb.c:2034: warning: assignment makes pointer from integer without > a castpyusb.c:1619: warning: passing argument 2 of 'PyErr_SetString' > makes pointer from integer without a cast > > pyusb.c:2037: warning: passing argument 2 of 'PyErr_SetString' makes > pointer from integer without a cast > pyusb.c: In function 'Py_usb_DeviceHandle_reset': > pyusb.c:1634: error: parse error before ')' token > pyusb.c:1638: warning: passing argument 2 of 'PyErr_SetString' makes > pointer from integer without a cast > pyusb.c: In function 'Py_usb_DeviceHandle_clearHalt':pyusb.c: In > function 'busses': > pyusb.c:2063: warning: passing argument 2 of 'PyErr_SetString' makes > pointer from integer without a cast > pyusb.c:2068: warning: passing argument 2 of 'PyErr_SetString' makes > pointer from integer without a cast > pyusb.c:2072: warning: assignment makes pointer from integer without > a cast > pyusb.c:2075: warning: passing argument 2 of 'PyErr_SetString' makes > pointer from integer without a cast > pyusb.c:2079: error: dereferencing pointer to incomplete type > > pyusb.c:1651: error: '_self' undeclared (first use in this function) > pyusb.c:2083: error: dereferencing pointer to incomplete type > pyusb.c:1651: error: parse error before ')' tokenpyusb.c:2084: > warning: passing argument 1 of 'new_Bus' from incompatible pointer type > > pyusb.c:1670: warning: passing argument 2 of 'PyErr_SetString' makes > pointer from integer without a cast > pyusb.c: In function 'Py_usb_DeviceHandle_getString': > pyusb.c:1690: error: '_self' undeclared (first use in this function) > pyusb.c:1690: error: parse error before ')' token > pyusb.c:1729: warning: passing argument 2 of 'PyErr_SetString' makes > pointer from integer without a cast > pyusb.c: In function 'Py_usb_DeviceHandle_getDescriptor': > pyusb.c:1751: error: '_self' undeclared (first use in this function) > pyusb.c:1751: error: parse error before ')' token > pyusb.c:1792: warning: passing argument 2 of 'PyErr_SetString' makes > pointer from integer without a cast > pyusb.c: In function 'Py_usb_DeviceHandle_del': > pyusb.c:1959: error: '_self' undeclared (first use in this function) > pyusb.c:1959: error: parse error before ')' token > pyusb.c: At top level: > pyusb.c:2024: error: parse error before '*' token > pyusb.c: In function 'new_DeviceHandle': > pyusb.c:2028: error: 'dh' undeclared (first use in this function) > pyusb.c:2031: error: parse error before ')' token > pyusb.c:2034: warning: assignment makes pointer from integer without > a cast > pyusb.c:2037: warning: passing argument 2 of 'PyErr_SetString' makes > pointer from integer without a cast > pyusb.c: In function 'busses': > pyusb.c:2063: warning: passing argument 2 of 'PyErr_SetString' makes > pointer from integer without a cast > pyusb.c:2068: warning: passing argument 2 of 'PyErr_SetString' makes > pointer from integer without a cast > pyusb.c:2072: warning: assignment makes pointer from integer without > a cast > pyusb.c:2075: warning: passing argument 2 of 'PyErr_SetString' makes > pointer from integer without a cast > pyusb.c:2079: error: dereferencing pointer to incomplete type > pyusb.c:2083: error: dereferencing pointer to incomplete type > pyusb.c:2084: warning: passing argument 1 of 'new_Bus' from > incompatible pointer type > lipo: can't figure out the architecture type of: /var/tmp//ccEcmvUt.out > error: command 'gcc' failed with exit status 1 > john-fishers-computer:~/Desktop/pyusb-0.4.1 johnfisher$ > > > END TERMINAL OUTPUT > > Please let me know of this points at a common error or something I > can readily fix. > > Thanks in advance, > > wave_man > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Pyusb-users mailing list > Pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users > |
From: John F. <joh...@co...> - 2007-11-08 19:29:20
|
Hi Group, It looks like it might take a little while for this message to get seen, but here goes. I am trying to install pyUSB on my MacBook Pro. It is therefor an Intel machine. OS X 10.4.10 ( I am afraid to jump right in to Leopard...). I have installed libusb first. It did not pass all the tests in make test, but I proceeded blithely to attempt the install of pyUSB. Here is the terminal window result: Last login: Thu Nov 8 11:11:24 on ttyp1 Welcome to Darwin! john-fishers-computer:~ johnfisher$ cd "/Users/johnfisher/Desktop/ pyusb-0.4.1" john-fishers-computer:~/Desktop/pyusb-0.4.1 johnfisher$ python setup.py install running install running build running build_ext building 'usb' extension creating build creating build/temp.macosx-10.3-fat-2.5 gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk - fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd - fno-common -dynamic -DNDEBUG -g -O3 -I/Library/Frameworks/ Python.framework/Versions/2.5/include/python2.5 -c pyusb.c -o build/ temp.macosx-10.3-fat-2.5/pyusb.o -I/sw/include In file included from pyusb.c:11In file included from pyusb.c:11: pyusb.h:6:17: error: usb.h: No such file or directory : pyusb.h:6:17: error: usb.h: No such file or directory In file included from pyusb.c:11: pyusb.h:120: error: parse error before 'usb_dev_handle' pyusb.h:120: warning: no semicolon at end of struct or union pyusb.h:122: error: parse error before '}' token pyusb.h:122: warning: data definition has no type or storage class In file included from pyusb.c:11: pyusb.h:120: error: parse error before 'usb_dev_handle' pyusb.h:120: warning: no semicolon at end of struct or unionpyusb.h: 131: warning: 'struct usb_endpoint_descriptor' declared inside parameter list pyusb.h:131: warning: its scope is only this definition or declaration, which is probably not what you want pyusb.h:122: error: parse error before '}' token pyusb.h:135: warning: 'struct usb_endpoint_descriptor' declared inside parameter list pyusb.h:122: warning: data definition has no type or storage class pyusb.h:140: warning: 'struct usb_interface_descriptor' declared inside parameter list pyusb.h:131: warning: 'struct usb_endpoint_descriptor' declared inside parameter list pyusb.h:131: warning: its scope is only this definition or declaration, which is probably not what you want pyusb.h:144: warning: 'struct usb_interface_descriptor' declared inside parameter list pyusb.h:135: warning: 'struct usb_endpoint_descriptor' declared inside parameter list pyusb.h:140: warning: 'struct usb_interface_descriptor' declared inside parameter list pyusb.h:144: warning: 'struct usb_interface_descriptor' declared inside parameter list pyusb.h:149: warning: 'struct usb_config_descriptor' declared inside parameter list pyusb.h:153: warning: 'struct usb_config_descriptor' declared inside parameter list pyusb.h:171: warning: 'struct usb_bus' declared inside parameter list pyusb.h:149: warning: 'struct usb_config_descriptor' declared inside parameter list pyusb.h:153: warning: 'struct usb_config_descriptor' declared inside parameter list pyusb.h:171: warning: 'struct usb_bus' declared inside parameter list pyusb.h:239: error: parse error before '*' token pyusb.h:241: warning: data definition has no type or storage class pyusb.h:239: error: parse error before '*' token pyusb.h:241: warning: data definition has no type or storage class pyusb.c: In function 'getBuffer': pyusb.c:143: warning: passing argument 3 of 'PyString_AsStringAndSize' from incompatible pointer type pyusb.c: In function 'getBuffer': pyusb.c:143: warning: passing argument 3 of 'PyString_AsStringAndSize' from incompatible pointer type pyusb.c: In function 'installModuleConstants': pyusb.c:236: error: 'USB_CLASS_PER_INTERFACE' undeclared (first use in this function) pyusb.c:236: error: (Each undeclared identifier is reported only once pyusb.c:236: error: for each function it appears in.) pyusb.c:237: error: 'USB_CLASS_AUDIO' undeclared (first use in this function) pyusb.c:238: error: 'USB_CLASS_COMM' undeclared (first use in this function) pyusb.c:239: error: 'USB_CLASS_HID' undeclared (first use in this function) pyusb.c:240: error: 'USB_CLASS_PRINTER' undeclared (first use in this function) pyusb.c:241: error: 'USB_CLASS_MASS_STORAGE' undeclared (first use in this function) pyusb.c:242: error: 'USB_CLASS_HUB' undeclared (first use in this function) pyusb.c:243: error: 'USB_CLASS_DATA' undeclared (first use in this function) pyusb.c:244: error: 'USB_CLASS_VENDOR_SPEC' undeclared (first use in this function) pyusb.c:245: error: 'USB_DT_DEVICE' undeclared (first use in this function) pyusb.c:246: error: 'USB_DT_CONFIG' undeclared (first use in this function) pyusb.c:247: error: 'USB_DT_STRING' undeclared (first use in this function) pyusb.c:248: error: 'USB_DT_INTERFACE' undeclared (first use in this function) pyusb.c:249: error: 'USB_DT_ENDPOINT' undeclared (first use in this function) pyusb.c:250: error: 'USB_DT_HID' undeclared (first use in this function) pyusb.c:251: error: 'USB_DT_REPORT' undeclared (first use in this function) pyusb.c:252: error: 'USB_DT_PHYSICAL' undeclared (first use in this function) pyusb.c:253: error: 'USB_DT_HUB' undeclared (first use in this function) pyusb.c:254: error: 'USB_DT_DEVICE_SIZE' undeclared (first use in this function) pyusb.c:255: error: 'USB_DT_CONFIG_SIZE' undeclared (first use in this function) pyusb.c:256: error: 'USB_DT_INTERFACE_SIZE' undeclared (first use in this function) pyusb.c:257: error: 'USB_DT_ENDPOINT_SIZE' undeclared (first use in this function) pyusb.c:258: error: 'USB_DT_ENDPOINT_AUDIO_SIZE' undeclared (first use in this function) pyusb.c:259: error: 'USB_DT_HUB_NONVAR_SIZE' undeclared (first use in this function) pyusb.c:260: error: 'USB_MAXENDPOINTS' undeclared (first use in this function) pyusb.c:261: error: 'USB_ENDPOINT_ADDRESS_MASK' undeclared (first use in this function) pyusb.c:262: error: 'USB_ENDPOINT_DIR_MASK' undeclared (first use in this function) pyusb.c:263: error: 'USB_ENDPOINT_TYPE_MASK' undeclared (first use in this function) pyusb.c:264: error: 'USB_ENDPOINT_TYPE_CONTROL' undeclared (first use in this function) pyusb.c:265: error: 'USB_ENDPOINT_TYPE_ISOCHRONOUS' undeclared (first use in this function) pyusb.c:266: error: 'USB_ENDPOINT_TYPE_BULK' undeclared (first use in this function) pyusb.c:267: error: 'USB_ENDPOINT_TYPE_INTERRUPT' undeclared (first use in this function) pyusb.c:268: error: 'USB_MAXINTERFACES' undeclared (first use in this function) pyusb.c:269: error: 'USB_MAXALTSETTING' undeclared (first use in this function) pyusb.c:270: error: 'USB_MAXCONFIG' undeclared (first use in this function) pyusb.c:271: error: 'USB_REQ_GET_STATUS' undeclared (first use in this function) pyusb.c:272: error: 'USB_REQ_CLEAR_FEATURE' undeclared (first use in this function) pyusb.c:273: error: 'USB_REQ_SET_FEATURE' undeclared (first use in this function) pyusb.c:274: error: 'USB_REQ_SET_ADDRESS' undeclared (first use in this function) pyusb.c:275: error: 'USB_REQ_GET_DESCRIPTOR' undeclared (first use in this function) pyusb.c:276: error: 'USB_REQ_SET_DESCRIPTOR' undeclared (first use in this function) pyusb.c:277: error: 'USB_REQ_GET_CONFIGURATION' undeclared (first use in this function) pyusb.c:278: error: 'USB_REQ_SET_CONFIGURATION' undeclared (first use in this function) pyusb.c:279: error: 'USB_REQ_GET_INTERFACE' undeclared (first use in this function) pyusb.c:280: error: 'USB_REQ_SET_INTERFACE' undeclared (first use in this function) pyusb.c:281: error: 'USB_REQ_SYNCH_FRAME' undeclared (first use in this function) pyusb.c:282: error: 'USB_TYPE_STANDARD' undeclared (first use in this function) pyusb.c:283: error: 'USB_TYPE_CLASS' undeclared (first use in this function) pyusb.c:284: error: 'USB_TYPE_VENDOR' undeclared (first use in this function) pyusb.c:285: error: 'USB_TYPE_RESERVED' undeclared (first use in this function) pyusb.c:286: error: 'USB_RECIP_DEVICE' undeclared (first use in this function) pyusb.c:287: error: 'USB_RECIP_INTERFACE' undeclared (first use in this function) pyusb.c:288: error: 'USB_RECIP_ENDPOINT' undeclared (first use in this function) pyusb.c:289: error: 'USB_RECIP_OTHER' undeclared (first use in this function) pyusb.c:290: error: 'USB_ENDPOINT_IN' undeclared (first use in this function) pyusb.c:291: error: 'USB_ENDPOINT_OUT' undeclared (first use in this function) pyusb.c:292: error: 'USB_ERROR_BEGIN' undeclared (first use in this function) pyusb.c: At top level: pyusb.c:395: warning: 'struct usb_endpoint_descriptor' declared inside parameter list pyusb.c:396: error: conflicting types for 'set_Endpoint_fields' pyusb.h:131: error: previous declaration of 'set_Endpoint_fields' was here pyusb.c: In function 'set_Endpoint_fields': pyusb.c:397: error: dereferencing pointer to incomplete type pyusb.c: In function 'installModuleConstants': pyusb.c:236: error: 'USB_CLASS_PER_INTERFACE' undeclared (first use in this function) pyusb.c:236: error: (Each undeclared identifier is reported only once pyusb.c:236: error: for each function it appears in.) pyusb.c:237: error: 'USB_CLASS_AUDIO' undeclared (first use in this function) pyusb.c:238: error: 'USB_CLASS_COMM' undeclared (first use in this function) pyusb.c:239: error: 'USB_CLASS_HID' undeclared (first use in this function) pyusb.c:398: error: dereferencing pointer to incomplete type pyusb.c:240: error: 'USB_CLASS_PRINTER' undeclared (first use in this function) pyusb.c:399: error: dereferencing pointer to incomplete type pyusb.c:400: error: dereferencing pointer to incomplete type pyusb.c:241: error: 'USB_CLASS_MASS_STORAGE' undeclared (first use in this function) pyusb.c:401: error: dereferencing pointer to incomplete typepyusb.c: 242: error: 'USB_CLASS_HUB' undeclared (first use in this function) pyusb.c:243: error: 'USB_CLASS_DATA' undeclared (first use in this function) pyusb.c:244: error: 'USB_CLASS_VENDOR_SPEC' undeclared (first use in this function)pyusb.c: At top level: pyusb.c:407: warning: 'struct usb_endpoint_descriptor' declared inside parameter list pyusb.c:245: error: 'USB_DT_DEVICE' undeclared (first use in this function) pyusb.c:408: error: conflicting types for 'new_Endpoint' pyusb.h:135: error: previous declaration of 'new_Endpoint' was here pyusb.c:246: error: 'USB_DT_CONFIG' undeclared (first use in this function) pyusb.c:247: error: 'USB_DT_STRING' undeclared (first use in this function) pyusb.c:248: error: 'USB_DT_INTERFACE' undeclared (first use in this function)pyusb.c: In function 'new_Endpoint': pyusb.c:415: warning: passing argument 2 of 'set_Endpoint_fields' from incompatible pointer type pyusb.c:249: error: 'USB_DT_ENDPOINT' undeclared (first use in this function) pyusb.c:250: error: 'USB_DT_HID' undeclared (first use in this function) pyusb.c:251: error: 'USB_DT_REPORT' undeclared (first use in this function) pyusb.c:252: error: 'USB_DT_PHYSICAL' undeclared (first use in this function) pyusb.c:253: error: 'USB_DT_HUB' undeclared (first use in this function) pyusb.c:254: error: 'USB_DT_DEVICE_SIZE' undeclared (first use in this function) pyusb.c:255: error: 'USB_DT_CONFIG_SIZE' undeclared (first use in this function) pyusb.c:256: error: 'USB_DT_INTERFACE_SIZE' undeclared (first use in this function) pyusb.c:257: error: 'USB_DT_ENDPOINT_SIZE' undeclared (first use in this function) pyusb.c:258: error: 'USB_DT_ENDPOINT_AUDIO_SIZE' undeclared (first use in this function) pyusb.c:259: error: 'USB_DT_HUB_NONVAR_SIZE' undeclared (first use in this function) pyusb.c:260: error: 'USB_MAXENDPOINTS' undeclared (first use in this function) pyusb.c:261: error: 'USB_ENDPOINT_ADDRESS_MASK' undeclared (first use in this function) pyusb.c: At top level:pyusb.c:262: error: 'USB_ENDPOINT_DIR_MASK' undeclared (first use in this function) pyusb.c:263: error: 'USB_ENDPOINT_TYPE_MASK' undeclared (first use in this function)pyusb.c:528: warning: 'struct usb_interface_descriptor' declared inside parameter list pyusb.c:529: error: conflicting types for 'set_Interface_fields' pyusb.h:140: error: previous declaration of 'set_Interface_fields' was here pyusb.c:264: error: 'USB_ENDPOINT_TYPE_CONTROL' undeclared (first use in this function) pyusb.c:265: error: 'USB_ENDPOINT_TYPE_ISOCHRONOUS' undeclared (first use in this function)pyusb.c: In function 'set_Interface_fields': pyusb.c:532: error: dereferencing pointer to incomplete type pyusb.c:266: error: 'USB_ENDPOINT_TYPE_BULK' undeclared (first use in this function)pyusb.c:533: error: dereferencing pointer to incomplete type pyusb.c:534: error: dereferencing pointer to incomplete type pyusb.c:535: error: dereferencing pointer to incomplete type pyusb.c:267: error: 'USB_ENDPOINT_TYPE_INTERRUPT' undeclared (first use in this function) pyusb.c:268: error: 'USB_MAXINTERFACES' undeclared (first use in this function)pyusb.c:536: error: dereferencing pointer to incomplete type pyusb.c:537: error: dereferencing pointer to incomplete type pyusb.c:539: error: dereferencing pointer to incomplete type pyusb.c:545: error: dereferencing pointer to incomplete type pyusb.c:546: error: dereferencing pointer to incomplete type pyusb.c:269: error: 'USB_MAXALTSETTING' undeclared (first use in this function)pyusb.c: At top level: pyusb.c:552: warning: 'struct usb_interface_descriptor' declared inside parameter list pyusb.c:553: error: conflicting types for 'new_Interface' pyusb.h:144: error: previous declaration of 'new_Interface' was here pyusb.c:270: error: 'USB_MAXCONFIG' undeclared (first use in this function) pyusb.c:271: error: 'USB_REQ_GET_STATUS' undeclared (first use in this function) pyusb.c: In function 'new_Interface': pyusb.c:272: error: 'USB_REQ_CLEAR_FEATURE' undeclared (first use in this function) pyusb.c:559: warning: passing argument 2 of 'set_Interface_fields' from incompatible pointer typepyusb.c:273: error: 'USB_REQ_SET_FEATURE' undeclared (first use in this function) pyusb.c:274: error: 'USB_REQ_SET_ADDRESS' undeclared (first use in this function) pyusb.c:275: error: 'USB_REQ_GET_DESCRIPTOR' undeclared (first use in this function) pyusb.c:276: error: 'USB_REQ_SET_DESCRIPTOR' undeclared (first use in this function) pyusb.c:277: error: 'USB_REQ_GET_CONFIGURATION' undeclared (first use in this function) pyusb.c:278: error: 'USB_REQ_SET_CONFIGURATION' undeclared (first use in this function) pyusb.c:279: error: 'USB_REQ_GET_INTERFACE' undeclared (first use in this function) pyusb.c:280: error: 'USB_REQ_SET_INTERFACE' undeclared (first use in this function) pyusb.c:281: error: 'USB_REQ_SYNCH_FRAME' undeclared (first use in this function) pyusb.c:282: error: 'USB_TYPE_STANDARD' undeclared (first use in this function) pyusb.c:283: error: 'USB_TYPE_CLASS' undeclared (first use in this function) pyusb.c:284: error: 'USB_TYPE_VENDOR' undeclared (first use in this function) pyusb.c:285: error: 'USB_TYPE_RESERVED' undeclared (first use in this function) pyusb.c:286: error: 'USB_RECIP_DEVICE' undeclared (first use in this function) pyusb.c:287: error: 'USB_RECIP_INTERFACE' undeclared (first use in this function) pyusb.c:288: error: 'USB_RECIP_ENDPOINT' undeclared (first use in this function)pyusb.c: At top level: pyusb.c:687: warning: 'struct usb_config_descriptor' declared inside parameter list pyusb.c:289: error: 'USB_RECIP_OTHER' undeclared (first use in this function)pyusb.c:688: error: conflicting types for 'set_Configuration_fields' pyusb.h:149: error: previous declaration of 'set_Configuration_fields' was here pyusb.c:290: error: 'USB_ENDPOINT_IN' undeclared (first use in this function) pyusb.c:291: error: 'USB_ENDPOINT_OUT' undeclared (first use in this function)pyusb.c: In function 'set_Configuration_fields': pyusb.c:292: error: 'USB_ERROR_BEGIN' undeclared (first use in this function)pyusb.c:692: error: dereferencing pointer to incomplete type pyusb.c:693: error: dereferencing pointer to incomplete type pyusb.c:694: error: dereferencing pointer to incomplete type pyusb.c:695: error: dereferencing pointer to incomplete type pyusb.c:696: error: dereferencing pointer to incomplete type pyusb.c:697: error: dereferencing pointer to incomplete type pyusb.c:699: error: dereferencing pointer to incomplete type pyusb.c:703: error: dereferencing pointer to incomplete type pyusb.c:704: error: dereferencing pointer to incomplete type pyusb.c:710: error: dereferencing pointer to incomplete type pyusb.c: At top level: pyusb.c:719: warning: 'struct usb_config_descriptor' declared inside parameter list pyusb.c:720: error: conflicting types for 'new_Configuration' pyusb.h:153: error: previous declaration of 'new_Configuration' was herepyusb.c: At top level: pyusb.c:395: warning: 'struct usb_endpoint_descriptor' declared inside parameter list pyusb.c:396: error: conflicting types for 'set_Endpoint_fields'pyusb.c: In function 'new_Configuration': pyusb.c:726: warning: passing argument 2 of 'set_Configuration_fields' from incompatible pointer type pyusb.h:131: error: previous declaration of 'set_Endpoint_fields' was here pyusb.c: In function 'set_Endpoint_fields': pyusb.c:397: error: dereferencing pointer to incomplete type pyusb.c:398: error: dereferencing pointer to incomplete type pyusb.c:399: error: dereferencing pointer to incomplete type pyusb.c:400: error: dereferencing pointer to incomplete type pyusb.c:401: error: dereferencing pointer to incomplete type pyusb.c: At top level: pyusb.c:407: warning: 'struct usb_endpoint_descriptor' declared inside parameter list pyusb.c:408: error: conflicting types for 'new_Endpoint' pyusb.h:135: error: previous declaration of 'new_Endpoint' was here pyusb.c: In function 'new_Endpoint': pyusb.c:415: warning: passing argument 2 of 'set_Endpoint_fields' from incompatible pointer type pyusb.c: In function 'set_Device_fields': pyusb.c:908: error: dereferencing pointer to incomplete type pyusb.c:911: error: dereferencing pointer to incomplete type pyusb.c:912: error: dereferencing pointer to incomplete type pyusb.c:914: error: dereferencing pointer to incomplete type pyusb.c:915: error: dereferencing pointer to incomplete typepyusb.c: At top level: pyusb.c:528: warning: 'struct usb_interface_descriptor' declared inside parameter list pyusb.c:529: error: conflicting types for 'set_Interface_fields' pyusb.h:140: error: previous declaration of 'set_Interface_fields' was here pyusb.c:918: error: dereferencing pointer to incomplete type pyusb.c: In function 'set_Interface_fields': pyusb.c:532: error: dereferencing pointer to incomplete type pyusb.c:919: error: dereferencing pointer to incomplete type pyusb.c:533: error: dereferencing pointer to incomplete typepyusb.c: 921: error: dereferencing pointer to incomplete type pyusb.c:922: error: dereferencing pointer to incomplete typepyusb.c: 534: error: dereferencing pointer to incomplete type pyusb.c:535: error: dereferencing pointer to incomplete type pyusb.c:925: error: dereferencing pointer to incomplete typepyusb.c: 536: error: dereferencing pointer to incomplete type pyusb.c:926: error: dereferencing pointer to incomplete typepyusb.c: 537: error: dereferencing pointer to incomplete type pyusb.c:927: error: dereferencing pointer to incomplete type pyusb.c:928: error: dereferencing pointer to incomplete typepyusb.c: 539: error: dereferencing pointer to incomplete type pyusb.c:929: error: dereferencing pointer to incomplete typepyusb.c: 545: error: dereferencing pointer to incomplete type pyusb.c:546: error: dereferencing pointer to incomplete typepyusb.c: 930: error: dereferencing pointer to incomplete type pyusb.c:931: error: dereferencing pointer to incomplete type pyusb.c:932: error: dereferencing pointer to incomplete type pyusb.c:933: error: dereferencing pointer to incomplete type pyusb.c: At top level: pyusb.c:552: warning: 'struct usb_interface_descriptor' declared inside parameter listpyusb.c:934: error: dereferencing pointer to incomplete type pyusb.c:937: error: dereferencing pointer to incomplete typepyusb.c: 553: error: conflicting types for 'new_Interface' pyusb.h:144: error: previous declaration of 'new_Interface' was here pyusb.c:942: error: dereferencing pointer to incomplete type pyusb.c:946: error: dereferencing pointer to incomplete type pyusb.c: In function 'new_Interface': pyusb.c:947: error: dereferencing pointer to incomplete type pyusb.c:559: warning: passing argument 2 of 'set_Interface_fields' from incompatible pointer type pyusb.c: At top level: pyusb.c:1056: warning: 'struct usb_bus' declared inside parameter listpyusb.c: At top level: pyusb.c:1057: error: conflicting types for 'new_Bus' pyusb.h:171: error: previous declaration of 'new_Bus' was herepyusb.c: 687: warning: 'struct usb_config_descriptor' declared inside parameter list pyusb.c: In function 'new_Bus': pyusb.c:1065: error: dereferencing pointer to incomplete type pyusb.c:1066: error: dereferencing pointer to incomplete type pyusb.c:1067: error: dereferencing pointer to incomplete type pyusb.c:1067: error: dereferencing pointer to incomplete type pyusb.c:1075: error: dereferencing pointer to incomplete type pyusb.c:1075: error: dereferencing pointer to incomplete type pyusb.c: In function 'Py_usb_DeviceHandle_controlMsg': pyusb.c:1100: error: '_self' undeclared (first use in this function) pyusb.c:1100: error: parse error before ')' token pyusb.c:1186: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a cast pyusb.c:688: error: conflicting types for 'set_Configuration_fields' pyusb.h:149: error: previous declaration of 'set_Configuration_fields' was here pyusb.c: In function 'Py_usb_DeviceHandle_setConfiguration': pyusb.c:1206: error: '_self' undeclared (first use in this function) pyusb.c: In function 'set_Configuration_fields': pyusb.c:692: error: dereferencing pointer to incomplete type pyusb.c:693: error: dereferencing pointer to incomplete type pyusb.c:694: error: dereferencing pointer to incomplete typepyusb.c: 1206: error: parse error before ')' token pyusb.c:695: error: dereferencing pointer to incomplete type pyusb.c:696: error: dereferencing pointer to incomplete type pyusb.c:697: error: dereferencing pointer to incomplete type pyusb.c:1232: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a castpyusb.c:699: error: dereferencing pointer to incomplete type pyusb.c:703: error: dereferencing pointer to incomplete type pyusb.c:704: error: dereferencing pointer to incomplete type pyusb.c:710: error: dereferencing pointer to incomplete type pyusb.c: In function 'Py_usb_DeviceHandle_claimInterface': pyusb.c:1245: error: '_self' undeclared (first use in this function) pyusb.c:1245: error: parse error before ')' token pyusb.c: At top level: pyusb.c:719: warning: 'struct usb_config_descriptor' declared inside parameter list pyusb.c:720: error: conflicting types for 'new_Configuration' pyusb.h:153: error: previous declaration of 'new_Configuration' was herepyusb.c:1266: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a cast pyusb.c: In function 'new_Configuration': pyusb.c:726: warning: passing argument 2 of 'set_Configuration_fields' from incompatible pointer type pyusb.c: In function 'Py_usb_DeviceHandle_detachKernelDriver': pyusb.c:1282: error: '_self' undeclared (first use in this function) pyusb.c:1282: error: parse error before ')' token pyusb.c: In function 'Py_usb_DeviceHandle_releaseInterface': pyusb.c:1321: error: '_self' undeclared (first use in this function) pyusb.c:1321: error: parse error before ')' token pyusb.c:1330: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a cast pyusb.c: In function 'Py_usb_DeviceHandle_setAltInterface': pyusb.c:1349: error: '_self' undeclared (first use in this function) pyusb.c:1349: error: parse error before ')' token pyusb.c:1374: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a cast pyusb.c: In function 'Py_usb_DeviceHandle_bulkWrite': pyusb.c:1393: error: '_self' undeclared (first use in this function) pyusb.c:1393: error: parse error before ')' token pyusb.c:1427: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a castpyusb.c: In function 'set_Device_fields': pyusb.c:908: error: dereferencing pointer to incomplete type pyusb.c:911: error: dereferencing pointer to incomplete type pyusb.c:912: error: dereferencing pointer to incomplete type pyusb.c:914: error: dereferencing pointer to incomplete type pyusb.c:915: error: dereferencing pointer to incomplete type pyusb.c:918: error: dereferencing pointer to incomplete type pyusb.c:919: error: dereferencing pointer to incomplete type pyusb.c:921: error: dereferencing pointer to incomplete type pyusb.c:922: error: dereferencing pointer to incomplete type pyusb.c:925: error: dereferencing pointer to incomplete type pyusb.c:926: error: dereferencing pointer to incomplete type pyusb.c:927: error: dereferencing pointer to incomplete type pyusb.c:928: error: dereferencing pointer to incomplete type pyusb.c:929: error: dereferencing pointer to incomplete type pyusb.c:930: error: dereferencing pointer to incomplete type pyusb.c:931: error: dereferencing pointer to incomplete type pyusb.c:932: error: dereferencing pointer to incomplete type pyusb.c:933: error: dereferencing pointer to incomplete type pyusb.c:934: error: dereferencing pointer to incomplete type pyusb.c:937: error: dereferencing pointer to incomplete type pyusb.c:942: error: dereferencing pointer to incomplete type pyusb.c:946: error: dereferencing pointer to incomplete type pyusb.c:947: error: dereferencing pointer to incomplete type pyusb.c: At top level: pyusb.c:1056: warning: 'struct usb_bus' declared inside parameter list pyusb.c:1057: error: conflicting types for 'new_Bus' pyusb.h:171: error: previous declaration of 'new_Bus' was here pyusb.c: In function 'new_Bus': pyusb.c:1065: error: dereferencing pointer to incomplete type pyusb.c:1066: error: dereferencing pointer to incomplete type pyusb.c:1067: error: dereferencing pointer to incomplete type pyusb.c:1067: error: dereferencing pointer to incomplete type pyusb.c:1075: error: dereferencing pointer to incomplete type pyusb.c:1075: error: dereferencing pointer to incomplete type pyusb.c: In function 'Py_usb_DeviceHandle_controlMsg': pyusb.c:1100: error: '_self' undeclared (first use in this function) pyusb.c:1100: error: parse error before ')' token pyusb.c:1186: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a cast pyusb.c: In function 'Py_usb_DeviceHandle_bulkRead': pyusb.c:1446: error: '_self' undeclared (first use in this function) pyusb.c:1446: error: parse error before ')' token pyusb.c: In function 'Py_usb_DeviceHandle_setConfiguration': pyusb.c:1206: error: '_self' undeclared (first use in this function) pyusb.c:1206: error: parse error before ')' token pyusb.c:1478: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a cast pyusb.c:1232: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a cast pyusb.c: In function 'Py_usb_DeviceHandle_interruptWrite': pyusb.c:1500: error: '_self' undeclared (first use in this function) pyusb.c:1500: error: parse error before ')' token pyusb.c:1534: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a cast pyusb.c: In function 'Py_usb_DeviceHandle_claimInterface': pyusb.c:1245: error: '_self' undeclared (first use in this function) pyusb.c:1245: error: parse error before ')' token pyusb.c: In function 'Py_usb_DeviceHandle_interruptRead': pyusb.c:1553: error: '_self' undeclared (first use in this function) pyusb.c:1553: error: parse error before ')' token pyusb.c:1585: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a cast pyusb.c:1266: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a cast pyusb.c: In function 'Py_usb_DeviceHandle_resetEndpoint': pyusb.c:1601: error: '_self' undeclared (first use in this function) pyusb.c:1601: error: parse error before ')' token pyusb.c:1619: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a cast pyusb.c: In function 'Py_usb_DeviceHandle_detachKernelDriver':pyusb.c: In function 'Py_usb_DeviceHandle_reset': pyusb.c:1634: error: parse error before ')' token pyusb.c:1638: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a cast pyusb.c:1282: error: '_self' undeclared (first use in this function) pyusb.c:1282: error: parse error before ')' token pyusb.c: In function 'Py_usb_DeviceHandle_clearHalt': pyusb.c:1651: error: '_self' undeclared (first use in this function) pyusb.c:1651: error: parse error before ')' token pyusb.c:1670: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a cast pyusb.c: In function 'Py_usb_DeviceHandle_releaseInterface': pyusb.c:1321: error: '_self' undeclared (first use in this function) pyusb.c: In function 'Py_usb_DeviceHandle_getString': pyusb.c:1690: error: '_self' undeclared (first use in this function) pyusb.c:1690: error: parse error before ')' token pyusb.c:1321: error: parse error before ')' token pyusb.c:1729: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a castpyusb.c:1330: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a cast pyusb.c: In function 'Py_usb_DeviceHandle_setAltInterface': pyusb.c:1349: error: '_self' undeclared (first use in this function) pyusb.c: In function 'Py_usb_DeviceHandle_getDescriptor': pyusb.c:1349: error: parse error before ')' token pyusb.c:1751: error: '_self' undeclared (first use in this function) pyusb.c:1751: error: parse error before ')' token pyusb.c:1374: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a cast pyusb.c: In function 'Py_usb_DeviceHandle_bulkWrite': pyusb.c:1393: error: '_self' undeclared (first use in this function) pyusb.c:1393: error: parse error before ')' token pyusb.c:1792: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a cast pyusb.c:1427: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a cast pyusb.c: In function 'Py_usb_DeviceHandle_bulkRead': pyusb.c:1446: error: '_self' undeclared (first use in this function) pyusb.c:1446: error: parse error before ')' token pyusb.c:1478: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a cast pyusb.c: In function 'Py_usb_DeviceHandle_interruptWrite': pyusb.c:1500: error: '_self' undeclared (first use in this function) pyusb.c:1500: error: parse error before ')' token pyusb.c: In function 'Py_usb_DeviceHandle_del': pyusb.c:1959: error: '_self' undeclared (first use in this function) pyusb.c:1534: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a cast pyusb.c:1959: error: parse error before ')' token pyusb.c: In function 'Py_usb_DeviceHandle_interruptRead': pyusb.c:1553: error: '_self' undeclared (first use in this function) pyusb.c:1553: error: parse error before ')' token pyusb.c:1585: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a cast pyusb.c: At top level: pyusb.c:2024: error: parse error before '*' token pyusb.c: In function 'new_DeviceHandle': pyusb.c: In function 'Py_usb_DeviceHandle_resetEndpoint': pyusb.c:1601: error: '_self' undeclared (first use in this function) pyusb.c:1601: error: parse error before ')' token pyusb.c:2028: error: 'dh' undeclared (first use in this function) pyusb.c:2031: error: parse error before ')' token pyusb.c:2034: warning: assignment makes pointer from integer without a castpyusb.c:1619: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a cast pyusb.c:2037: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a cast pyusb.c: In function 'Py_usb_DeviceHandle_reset': pyusb.c:1634: error: parse error before ')' token pyusb.c:1638: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a cast pyusb.c: In function 'Py_usb_DeviceHandle_clearHalt':pyusb.c: In function 'busses': pyusb.c:2063: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a cast pyusb.c:2068: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a cast pyusb.c:2072: warning: assignment makes pointer from integer without a cast pyusb.c:2075: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a cast pyusb.c:2079: error: dereferencing pointer to incomplete type pyusb.c:1651: error: '_self' undeclared (first use in this function) pyusb.c:2083: error: dereferencing pointer to incomplete type pyusb.c:1651: error: parse error before ')' tokenpyusb.c:2084: warning: passing argument 1 of 'new_Bus' from incompatible pointer type pyusb.c:1670: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a cast pyusb.c: In function 'Py_usb_DeviceHandle_getString': pyusb.c:1690: error: '_self' undeclared (first use in this function) pyusb.c:1690: error: parse error before ')' token pyusb.c:1729: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a cast pyusb.c: In function 'Py_usb_DeviceHandle_getDescriptor': pyusb.c:1751: error: '_self' undeclared (first use in this function) pyusb.c:1751: error: parse error before ')' token pyusb.c:1792: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a cast pyusb.c: In function 'Py_usb_DeviceHandle_del': pyusb.c:1959: error: '_self' undeclared (first use in this function) pyusb.c:1959: error: parse error before ')' token pyusb.c: At top level: pyusb.c:2024: error: parse error before '*' token pyusb.c: In function 'new_DeviceHandle': pyusb.c:2028: error: 'dh' undeclared (first use in this function) pyusb.c:2031: error: parse error before ')' token pyusb.c:2034: warning: assignment makes pointer from integer without a cast pyusb.c:2037: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a cast pyusb.c: In function 'busses': pyusb.c:2063: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a cast pyusb.c:2068: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a cast pyusb.c:2072: warning: assignment makes pointer from integer without a cast pyusb.c:2075: warning: passing argument 2 of 'PyErr_SetString' makes pointer from integer without a cast pyusb.c:2079: error: dereferencing pointer to incomplete type pyusb.c:2083: error: dereferencing pointer to incomplete type pyusb.c:2084: warning: passing argument 1 of 'new_Bus' from incompatible pointer type lipo: can't figure out the architecture type of: /var/tmp//ccEcmvUt.out error: command 'gcc' failed with exit status 1 john-fishers-computer:~/Desktop/pyusb-0.4.1 johnfisher$ END TERMINAL OUTPUT Please let me know of this points at a common error or something I can readily fix. Thanks in advance, wave_man |
From: sreeraj r <rsr...@gm...> - 2007-11-03 15:07:19
|
hello guys , i changed the requesttye to 0x33(RECIP_INTERFACE | TYPE_CLASS) now i am getting an error that cannot send control message : broken pipe the actual reaquest type i needed is this bRequestType = USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE is my value wrong( wat abt DIR_OUT) |
From: sreeraj r <rsr...@gm...> - 2007-11-02 16:23:35
|
hello guys, i am really new to usb programming so plz help i am trying to access kingsun dazzle irda via pyusb import usb from struct import * vendor_id= 0x07d0 product_id= 0x4100 supported_speeds = [2400,9600,19200,38400,57600,115200,576000,1152000,4000000,0] bRequestType= 0x21 bRequest = 0x09 wValue = 0x0200 wIndex = 0x0001 wLength = 0x0008 hello=[] buffer = pack('lhh',115200,0x03,0) def find_dazzle(): buses = usb.busses() for bus in buses : for device in bus.devices : if device.idVendor == vendor_id : if device.idProduct == product_id : print "found ksdazzle" return device if __name__=="__main__": device=find_dazzle() for alt in device.configurations[0].interfaces[0]: for ep in alt.endpoints: print "endpoint:",hex(ep.address) handle=device.open() handle.reset() handle.setConfiguration(1) handle.claimInterface(0) r=handle.controlMsg(bRequestType,bRequest,buffer,wValue,wIndex,10000) #while 1: # r=handle.interruptRead(1,2048,10000) # print r handle.releaseInterface() while running the above program ie while sending that contol message i receive the following error found ksdazzle endpoint: 0x81 endpoint: 0x2 Traceback (most recent call last): File "a.py", line 33, in ? r=handle.controlMsg(bRequestType,bRequest,buffer,wValue,wIndex,10000) usb.USBError: error sending control message: No such file or directory my demsg shows this usb 1-1: reset low speed USB device using ohci_hcd and address 2 usb 1-1: usbfs: process 16850 (python) did not claim interface 1 before use plz helppppppppp -- "it's not who i am underneath but what i do that defines me" |