2012/7/9  <p...@gmx.li>:
> Hello everybody,
>
> this is my first post to this list, so let me apologize this question:
> Am I blind or is there really no search-this-list (apart from using google)? 
> I'm pretty sure that I'll gain from other user's contributions, if I could 
> only search for them reasonably.
>

http://sourceforge.net/search/?group_id=145185&type_of_search=mlists

> And now for something completely different:
> I want to use pyusb together with Win-XP, Python 2.7, libusb 1.2.6.0 and a 
> piece of hardware like the one described under 
> http://www.harbaum.org/till/i2c_tiny_usb/index.shtml
> Is this setup reasonable?
>
> I started with the example under "Let's get it started" on 
> https://github.com/walac/pyusb/blob/master/docs/tutorial.rst
>
> libusb named its .dll-file libusb0.dll — despite its version 1.x. Therefore, 
> during call of usb.core.find, when pyusb looks for the backend, the backend 
> will be found by usb.backend.libusb01. Therefore, I guess, pyusb treats the 
> usblib 1.x like an 0.x version.
>
> Should I worry about that?
>
> The example program travels on until line
> "alternate_setting = usb.control.get_interface…"
> and then it stops with
> "USBError: [Errno None] libusb0-dll:err [control_msg] sending control message 
> failed, win error: Die Anforderung wird nicht unterstützt." (I think the 
> latter sentence translates to "The request is not supported", full error 
> message follows at the bottom.)
>
> Is this a problem regarding libusb (as it naïvely sounds like)?
> May it due to libusb 1.x be treated like an 0.x version?
> May it due to limited communication capabilities of the hardware?
>
> Thanks for any suggestions – Peter
>
>
>
> Full error output:
>
> ERROR, UNEXPECTED EXCEPTION
> [Errno None] libusb0-dll:err [control_msg] sending control message failed, 
> win error: Die Anforderung wird nicht unterstützt.
>
> Traceback (most recent call last):
>   File "O:\I²C\USB-I²C mit ATtiny45\SW, Treiber für Python\test.py", line 
> 104, in <module>
>     main()
>   File "O:\I²C\USB-I²C mit ATtiny45\SW, Treiber für Python\test.py", line 68, 
> in main
>     alternate_setting = usb.control.get_interface(dev, interface_number)
>   File "C:\Programme\Python27\lib\site-packages\usb\control.py", line 242, in 
> get_interface
>     data_or_wLength = 1
>   File "C:\Programme\Python27\lib\site-packages\usb\core.py", line 695, in 
> ctrl_transfer
>     self.__get_timeout(timeout)
>   File "C:\Programme\Python27\lib\site-packages\usb\backend\libusb01.py", 
> line 536, in ctrl_transfer
>     timeout
>   File "C:\Programme\Python27\lib\site-packages\usb\backend\libusb01.py", 
> line 384, in _check
>     raise USBError(errmsg, ret)
> USBError: [Errno None] libusb0-dll:err [control_msg] sending control message 
> failed, win error: Die Anforderung wird nicht unterstützt.
>
>
>

Probably you device does not have a alternate interface, so it refuses
SET/GET_INTERFACE requests. Therefore, you should remove this line
from your code and go ahead.


-- 
Best Regards,
Wander Lairson Costa

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to