PyUSB dev.set_configuration()

前端 未结 2 1862
醉梦人生
醉梦人生 2021-01-14 13:15

I am trying to send data to a usb stick using the python library PyUSB. The code I am using is the following:

import usb.core
import usb.util

# find our dev         


        
2条回答
  •  走了就别回头了
    2021-01-14 13:50

    you have to do - on ubuntu:

    sudo usermod -a -G uucp YOURUSER
    sudo usermod -a -G dialout YOURUSER
    

    and then

    sudo echo "SUBSYSTEM==\"usb\", ATTR{idVendor}==\"YOURVENDOR\", ATTR{idProduct}==\"YOURID\", MODE=\"666\"">/etc/udev/rules.d/99-YOURDEVICENAME.rules
    

    in Your example:

     sudo echo "SUBSYSTEM==\"usb\", ATTR{idVendor}==\"090c\", ATTR{idProduct}==\"1000\", MODE=\"666\"">/etc/udev/rules.d/99-YOURDEVICENAME.rules
    

提交回复
热议问题