i saw this message:

usb.core.USBError: [Errno 13] Access denied (insufficient permissions)


when i was using a wrong driver in Windows 10. I could also see the whole
usb device descriptor, just could not interact with it.

my suggestion is to try to re install or update the libusb driver

On Thu, Jan 17, 2019 at 9:01 PM charles wilson <cmf.wil...@gmail.com> wrote:

> Hi,
> I usually manage to solve my problems by hitting my head against them
> until I get a breakthrough. This time nothing.
> I am new to trying PYUSB. I have the same problem with 2 installations.
> 1) Ubuntu Mate 16.04 on Kernel Linux 4.15.0-43-generic x86_64running on
> AMD Ryzen 5 2600X
> 2) Raspbian (Jessie) on Raspberry Pi 3B+
>
> Also I confirm that libusb-1.0-0 <https://pkgs.org/download/libusb-1.0-0>
> is there on both.
>
> After installation I started the tutorial (why not?) but did not get far:
>
> import usb.core
> import usb.util
>
> dev = usb.core.find(idVendor=0x1d6b, idProduct=0x0003)
> print(dev)
>  *OK so far and I get:*
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *================== RESTART: /home/wilson/temPY/USBtest01.py
> ==================DEVICE ID 1d6b:0003 on Bus 004 Address 001
> ================= bLength                :   0x12 (18
> bytes) bDescriptorType        :    0x1 Device bcdUSB                 :
> 0x300 USB 3.0 bDeviceClass           :    0x9 Hub bDeviceSubClass
> :    0x0 bDeviceProtocol        :    0x3 bMaxPacketSize0        :    0x9 (9
> bytes) idVendor               : 0x1d6b idProduct              :
> 0x0003 bcdDevice              :  0x415 Device 4.15 iManufacturer
> :    0x3 Error Accessing String iProduct               :    0x2 Error
> Accessing String iSerialNumber          :    0x1 Error Accessing
> String bNumConfigurations     :    0x1  CONFIGURATION 1: 0 mA
> ====================================   bLength              :    0x9 (9
> bytes)   bDescriptorType      :    0x2 Configuration   wTotalLength
> :   0x1f (31 bytes)   bNumInterfaces       :    0x1   bConfigurationValue
> :    0x1   iConfiguration       :    0x0    bmAttributes         :   0xe0
> Self Powered, Remote Wakeup   bMaxPower            :    0x0 (0 mA)
> INTERFACE 0: Hub =======================================
> bLength            :    0x9 (9 bytes)     bDescriptorType    :    0x4
> Interface     bInterfaceNumber   :    0x0     bAlternateSetting  :
> 0x0     bNumEndpoints      :    0x1     bInterfaceClass    :    0x9 Hub
> bInterfaceSubClass :    0x0     bInterfaceProtocol :    0x0
> iInterface         :    0x0       ENDPOINT 0x81: Interrupt IN
> ==========================       bLength          :    0x7 (7 bytes)
> bDescriptorType  :    0x5 Endpoint       bEndpointAddress :   0x81 IN
> bmAttributes     :    0x3 Interrupt       wMaxPacketSize   :    0x4 (4
> bytes)       bInterval        :    0xc*
>
> which tells me that pyusb is installed and is finding USB.core and seems
> to be working.
> When I take the next step in the tutorial:
> dev.set_configuration()
>
> it all turns to custard and I get:
>
> raceback (most recent call last):
>   File "/home/wilson/temPY/USBtest01.py", line 11, in <module>
>     dev.set_configuration()
>   File "/usr/lib/python3/dist-packages/usb/core.py", line 799, in
> set_configuration
>     self._ctx.managed_set_configuration(self, configuration)
>   File "/usr/lib/python3/dist-packages/usb/core.py", line 127, in
> managed_set_configuration
>     self.managed_open()
>   File "/usr/lib/python3/dist-packages/usb/core.py", line 105, in
> managed_open
>     self.handle = self.backend.open_device(self.dev)
>   File "/usr/lib/python3/dist-packages/usb/backend/libusb1.py", line 722,
> in open_device
>     return _DeviceHandle(dev)
>   File "/usr/lib/python3/dist-packages/usb/backend/libusb1.py", line 600,
> in __init__
>     _check(_lib.libusb_open(self.devid, byref(self.handle)))
>   File "/usr/lib/python3/dist-packages/usb/backend/libusb1.py", line 552,
> in _check
>     raise USBError(_strerror(ret), ret, _libusb_errno[ret])
> usb.core.USBError: [Errno 13] Access denied (insufficient permissions)
>
> This on the AMD system, the diagnostic on the Raspi is similar but not
> identical.
>
> I have worked through the other similar postings on the mailing list -
> while similar their problems were at a more complex level --- I am at step
> 1 with the tutorial ...
> I have also worked through the occurrences of set_configuration() in the
> ...usb/core.py module and could see no reason for dev.set_configuration()
> to bomb-out.
>
> I have racked my brains and consulted my local gurus with no joy .... so
> any help would be appreciated - I have a feeling it is something dumb that
> I have missed.
>
> Cheers
> Charles
>
>
>
> _______________________________________________
> pyusb-users mailing list
> pyusb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyusb-users
>


-- 
SQ
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users

Reply via email to