How can I comunicate with this device using pyusb?

前端 未结 1 1674
执笔经年
执笔经年 2021-01-15 13:55

I have a Netware uniFlow device. When I plug it in it shows up in dmesg:

[ 2962.369905] usb 2-1.4: new full-speed USB device number 11 using ehci-pci
[ 2962.         


        
1条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-15 14:44

    In my experience, you have to have set up a rules file for the device for the udev system

    1. Something along the lines of:

      ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="171b", ATTRS{idProduct}=="2001", MODE="660", GROUP="plugdev"
      

      in a file called /lib/udev/rules.d/50-YourSoftwareName.rules (for example, dig around in man udev for file naming rules but 50-usbhax.rules should do)

    2. Add your username to the plugdev group

      adduser username plugdev
      
    3. Reload rules

      sudo udevadm control --reload (that is minus minus reload)
      sudo udevadm trigger

    4. Unplug and replug the device or reboot your machine and see if it works.

    NOTE: Some systems use the group input rather than plugdev, so edit the above accordingly.
    To check what your system uses have a look at the group name for the relevant entries in /dev/usb or /dev/input

    0 讨论(0)
提交回复
热议问题