[opensuse-support] Permission on USB
Hi everyone: I have a opensuse tumbleweed, and i use the chip programmer PICKIT2, PICKIT3 via usb. Sometimes at boot the permission are right 664 but when the programmer is replugged or rebooted the permissions are only root 600. I suspect that i have a problem with udev rules file atached. If i check for conflict with any other rule GREP only find manufacturer id match with: /etc/udev/rules.d/010_mchp_tools.rules DMESG say that is discovered as usb HID Best Regards. Christian Info extra: #ls -la /dev/bus/usb/002 crw------- 1 root root 189, 139 abr 2 10:31 012 #lsusb Bus 002 Device 010: ID 04d8:0033 Microchip Technology, Inc. PICkit2 Bus 002 Device 009: ID 04d8:900a Microchip Technology, Inc. PICkit3 # cd /etc/udev/rules.d # grep -irn "04d8" #dmesg 7700.360064] usb 2-4.1: new full-speed USB device number 9 using ohci-pci [ 7700.500507] usb 2-4.1: New USB device found, idVendor=04d8, idProduct=900a, bcdDevice= 0.02 [ 7700.500512] usb 2-4.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 7700.500514] usb 2-4.1: Product: PICkit 3 [ 7700.500516] usb 2-4.1: Manufacturer: Microchip Technology Inc. [ 7700.500517] usb 2-4.1: SerialNumber: BUR132571934 [ 7700.517583] hid-generic 0003:04D8:900A.0003: hiddev96,hidraw0: USB HID v1.11 Device [Microchip Technology Inc. PICkit 3] on usb-0000:00:02.0-4.1/input0 [ 7700.604074] usb 2-4.2: new full-speed USB device number 10 using ohci-pci [ 7700.750508] usb 2-4.2: New USB device found, idVendor=04d8, idProduct=0033, bcdDevice= 0.02 [ 7700.750513] usb 2-4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 7700.750515] usb 2-4.2: Product: PICkit 2 Microcontroller Programmer [ 7700.750517] usb 2-4.2: Manufacturer: Microchip Technology Inc. [ 7700.750518] usb 2-4.2: SerialNumber: Љ -- Be Free, Be Linux
02.04.2019 17:52, Christian Schmitz пишет:
Hi everyone: I have a opensuse tumbleweed, and i use the chip programmer PICKIT2, PICKIT3 via usb. Sometimes at boot the permission are right 664 but when the programmer is replugged or rebooted the permissions are only root 600.
If you can reliably reproduce it, run udevadm monitor -kue which gives you exact events together with all properties. If in doubt, post output here.
I suspect that i have a problem with udev rules file atached. If i check for conflict with any other rule GREP only find manufacturer id match with: /etc/udev/rules.d/010_mchp_tools.rules
There could be generic rule that matches this device as well.
DMESG say that is discovered as usb HID
Best Regards. Christian
Info extra: #ls -la /dev/bus/usb/002 crw------- 1 root root 189, 139 abr 2 10:31 012
#lsusb Bus 002 Device 010: ID 04d8:0033 Microchip Technology, Inc. PICkit2 Bus 002 Device 009: ID 04d8:900a Microchip Technology, Inc. PICkit3
# cd /etc/udev/rules.d # grep -irn "04d8"
#dmesg 7700.360064] usb 2-4.1: new full-speed USB device number 9 using ohci-pci [ 7700.500507] usb 2-4.1: New USB device found, idVendor=04d8, idProduct=900a, bcdDevice= 0.02 [ 7700.500512] usb 2-4.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 7700.500514] usb 2-4.1: Product: PICkit 3 [ 7700.500516] usb 2-4.1: Manufacturer: Microchip Technology Inc. [ 7700.500517] usb 2-4.1: SerialNumber: BUR132571934 [ 7700.517583] hid-generic 0003:04D8:900A.0003: hiddev96,hidraw0: USB HID v1.11 Device [Microchip Technology Inc. PICkit 3] on usb-0000:00:02.0-4.1/input0 [ 7700.604074] usb 2-4.2: new full-speed USB device number 10 using ohci-pci [ 7700.750508] usb 2-4.2: New USB device found, idVendor=04d8, idProduct=0033, bcdDevice= 0.02 [ 7700.750513] usb 2-4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 7700.750515] usb 2-4.2: Product: PICkit 2 Microcontroller Programmer [ 7700.750517] usb 2-4.2: Manufacturer: Microchip Technology Inc. [ 7700.750518] usb 2-4.2: SerialNumber: Љ
-- To unsubscribe, e-mail: opensuse-support+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-support+owner@opensuse.org
On 02/04/2019 16:52, Christian Schmitz wrote:
Hi everyone: I have a opensuse tumbleweed, and i use the chip programmer PICKIT2, PICKIT3 via usb. Sometimes at boot the permission are right 664 but when the programmer is replugged or rebooted the permissions are only root 600.
I suspect that i have a problem with udev rules file atached. If i check for conflict with any other rule GREP only find manufacturer id match with: /etc/udev/rules.d/010_mchp_tools.rules
DMESG say that is discovered as usb HID
Best Regards. Christian
Hi Christian, I work with a pickit3 all the time and on my Leap:15 box I have no problem. The permissions are taken care of by the installation of Mplab x, I have it on my Tumbleweed Laptop as well but I haven't used it since I installed Tumleweed but I'll check later. The rule that looks like it does the job is: /etc/udev/rules.d/z010_mchp_tools.rules and it contains: 2017.09.25 Added check for Microchip product IDs. # 2017.03,03 Added check for Atmel tools. # 2012.01.23 Changed SYSFS reference(s) to ATTR. # 2011.12.15 Note: Reboot works on all systems to have rules file recognized. # 2010.01.26 Add reference to "usb" for Ubuntu. # 2010.01.22 Attempt to further simplify rules files requirements. # 2009.08.18 Rules file simplified. # 2009.07.15 Rules file created. ENV{hotplugscript}="/etc/.mplab_ide/mchplinusbdevice" ACTION!="add", GOTO="check_remove" SUBSYSTEM=="usb_device", GOTO="check_add" SUBSYSTEM!="usb", GOTO="rules_end" LABEL="check_add" ATTR{idVendor}=="04d8", ATTR{idProduct}=="8???", MODE="666", RUN+="%E{hotplugscript} add" ATTR{idVendor}=="04d8", ATTR{idProduct}=="9???", MODE="666", RUN+="%E{hotplugscript} add" ATTR{idVendor}=="04d8", ATTR{idProduct}=="a0??", MODE="666", RUN+="%E{hotplugscript} add" ATTR{idVendor}=="04d8", ATTR{idProduct}=="00e0", MODE="666", RUN+="%E{hotplugscript} add" ATTR{idVendor}=="04d8", ATTR{idProduct}=="00e1", MODE="666", RUN+="%E{hotplugscript} add" ATTR{idVendor}=="03eb", ATTR{idProduct}!="6124", MODE="666", RUN+="%E{hotplugscript} add" GOTO="rules_end" LABEL="check_remove" ACTION=="remove", RUN+="%E{hotplugscript} remove %E{PRODUCT}" LABEL="rules_end" -- To unsubscribe, e-mail: opensuse-support+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-support+owner@opensuse.org
participants (3)
-
Andrei Borzenkov
-
Christian Schmitz
-
Dave Plater