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-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: 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: 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 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-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-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 > > |