Do you have LibUSB installed? You'll need a binary backend in addition to
the Python bindings.

You can follow the installation instructions located at
http://sourceforge.net/apps/trac/libusb-win32/wiki.

On Tue, Nov 29, 2011 at 11:11, Barney, Bryson <bbar...@sandia.gov> wrote:

>  Hi,
>
> I am new here, and a new user of PyUSB.  I have a very simple HID
> Isochronous application to use this for, so I thought that I would start
> out by running the example that is shown in the “Programming with PyUSB
> 1.0” tutorial.  I am running this on windows 7 with python27
>
> I get through the following lines:
>
> import usb.core
> import usb.util
>
> # find our device
> dev = usb.core.find(idVendor=0xfffe, idProduct=0x0001)
>
> Then “ValueError: no backend abailable” appears, which is an error from
> line 846 in core.py.  It looks like I have all three backends (libusb01.py,
> libusb10.py, and openusb.py) in the usb/backend directory.  Do you by any
> chance know why it cannot find a backend?  Any help with this would be much
> appreciated.
>
> Thanks,
> Bryson
>
> Just in case, here is the script that I am trying to run:
>
>
> import usb.core
> import usb.util
>
> # find our device
> dev = usb.core.find(idVendor=0x0B40, idProduct=0x0133)
>
> # was it found?
> if dev is None:
>     raise ValueError('Device not found')
>
> # set the active configuration. With no arguments, the first
> # configuration will be the active one
> dev.set_configuration()
>
> # get an endpoint instance
> cfg = dev.get_active_configuration()
> interface_number = cfg[0].bInterfaceNumber
> alternate_settting = usb.control.get_interface(interface_number)
> intf = usb.util.find_descriptor(
>     cfg, bInterfaceNumber = interface_number,
>     bAlternateSetting = alternate_setting
> )
>
> ep = usb.util.find_descriptor(
>     intf,
>     # match the first OUT endpoint
>     custom_match = \
>     lambda e: \
>         usb.util.endpoint_direction(e.bEndpointAddress) == \
>         usb.util.ENDPOINT_OUT
> )
>
> assert ep is not None
>
> # write the data
> ep.write('test')
>
>
>
>
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure
> contains a definitive record of customers, application performance,
> security threats, fraudulent activity, and more. Splunk takes this
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
> _______________________________________________
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>
>
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to