Re: [Fx2lib-devel] Using FXLOAD with udev on SUSE
Status: Beta
Brought to you by:
mulicheng
From: Dennis M. <de...@ub...> - 2009-03-02 21:38:30
|
Eric Winsor wrote: > Hi, > > I'm trying to write a udev rule but I get the following error when I > test it: > linux-b1xe:~ # udevadm test /sys/bus/usb/2-1 > > parse_file: reading '/etc/udev/rules.d/10-evw.rules' as rules file > add_to_rules: invalid rule '/etc/udev/rules.d/10-evw.rules:4' > > The fist three lines of 10-evw.rules are comments, the fourth line is my > rule and is (in one line): > > RUN+="/sbin/fxload/ -t fx2 -D /proc/bus/usb/002/033 -I > /usr/share/RCU_02.hex" > DRIVER==”usb”, RUN+="/sbin/fxload/ -t fx2 -D /proc/bus/usb/002/033 -I > /usr/share/RCU_02.hex" > I don't use the RUN command in my udev rule. I just use ATTRS and MODE to allow all users to use the device. SUBSYSTEM=="usb", ATTRS{idVendor}=="<my vendor id>", MODE="0666" So Assuming your RUN command is not the problem, perhaps you need SUBSYSTEM instead of DRIVER. As for the RUN command, is it /sbin/fxload/ with a trailing slash? I'm working in Fedora though, I don't know if the UDEV rules have differences from platform to platform. -Dennis > Querying the device to get my attributes gives me: > > linux-b1xe:~ # udevinfo -a -p /sys/bus/usb/devices/2-1 > > Udevinfo starts with the device specified by the devpath and then > walks up the chain of parent devices. It prints for every device > found, all possible attributes in the udev rules key format. > A rule to match, can be composed by the attributes of the device > and the attributes from one single parent device. > > looking at device '/devices/pci0000:00/0000:00:11.0/0000:02:02.0/usb2/2-1': > KERNEL=="2-1" > SUBSYSTEM=="usb" > DRIVER=="usb" > ATTR{dev}=="189:129" > ATTR{configuration}=="" > ATTR{bNumInterfaces}==" 1" > ATTR{bConfigurationValue}=="1" > ATTR{bmAttributes}=="80" > ATTR{bMaxPower}=="100mA" > ATTR{urbnum}=="6" > ATTR{idVendor}=="04b4" > ATTR{idProduct}=="0082" > ATTR{bcdDevice}=="0000" > ATTR{bDeviceClass}=="ff" > ATTR{bDeviceSubClass}=="ff" > ATTR{bDeviceProtocol}=="ff" > ATTR{bNumConfigurations}=="1" > ATTR{bMaxPacketSize0}=="64" > ATTR{speed}=="480" > ATTR{busnum}=="2" > ATTR{devnum}=="2" > ATTR{version}==" 2.00" > ATTR{maxchild}=="0" > ATTR{quirks}=="0x0" > ATTR{authorized}=="1" > > looking at parent device > '/devices/pci0000:00/0000:00:11.0/0000:02:02.0/usb2': > KERNELS=="usb2" > SUBSYSTEMS=="usb" > DRIVERS=="usb" > ATTRS{dev}=="189:128" > ATTRS{configuration}=="" > ATTRS{bNumInterfaces}==" 1" > ATTRS{bConfigurationValue}=="1" > ATTRS{bmAttributes}=="e0" > ATTRS{bMaxPower}==" 0mA" > ATTRS{urbnum}=="49" > ATTRS{idVendor}=="1d6b" > ATTRS{idProduct}=="0002" > ATTRS{bcdDevice}=="0206" > ATTRS{bDeviceClass}=="09" > ATTRS{bDeviceSubClass}=="00" > ATTRS{bDeviceProtocol}=="01" > ATTRS{bNumConfigurations}=="1" > ATTRS{bMaxPacketSize0}=="64" > ATTRS{speed}=="480" > ATTRS{busnum}=="2" > ATTRS{devnum}=="1" > ATTRS{version}==" 2.00" > ATTRS{maxchild}=="6" > ATTRS{quirks}=="0x0" > ATTRS{authorized}=="1" > ATTRS{manufacturer}=="Linux 2.6.25.18-0.2-pae ehci_hcd" > ATTRS{product}=="EHCI Host Controller" > ATTRS{serial}=="0000:02:02.0" > ATTRS{authorized_default}=="1" > > looking at parent device '/devices/pci0000:00/0000:00:11.0/0000:02:02.0': > KERNELS=="0000:02:02.0" > SUBSYSTEMS=="pci" > DRIVERS=="ehci_hcd" > ATTRS{vendor}=="0x15ad" > ATTRS{device}=="0x0770" > ATTRS{subsystem_vendor}=="0x15ad" > ATTRS{subsystem_device}=="0x0770" > ATTRS{class}=="0x0c0320" > ATTRS{irq}=="16" > ATTRS{local_cpus}=="ffffffff,ffffffff,ffffffff,ffffffff" > ATTRS{modalias}=="pci:v000015ADd00000770sv000015ADsd00000770bc0Csc03i20" > ATTRS{enable}=="1" > ATTRS{broken_parity_status}=="0" > ATTRS{msi_bus}=="" > > looking at parent device '/devices/pci0000:00/0000:00:11.0': > KERNELS=="0000:00:11.0" > SUBSYSTEMS=="pci" > DRIVERS=="" > ATTRS{vendor}=="0x15ad" > ATTRS{device}=="0x0790" > ATTRS{subsystem_vendor}=="0x0000" > ATTRS{subsystem_device}=="0x0000" > ATTRS{class}=="0x060401" > ATTRS{irq}=="0" > ATTRS{local_cpus}=="ffffffff,ffffffff,ffffffff,ffffffff" > ATTRS{modalias}=="pci:v000015ADd00000790sv00000000sd00000000bc06sc04i01" > ATTRS{enable}=="1" > ATTRS{broken_parity_status}=="0" > ATTRS{msi_bus}=="1" > > looking at parent device '/devices/pci0000:00': > KERNELS=="pci0000:00" > SUBSYSTEMS=="" > DRIVERS=="" > > > Can anyone see what I'm doing wrong in my rule or missing that I may > need to do elsewhere? > > Thanks, > > Eric Winsor > > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise > -Strategies to boost innovation and cut costs with open source participation > -Receive a $600 discount off the registration fee with the source code: SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > Fx2lib-devel mailing list > Fx2...@li... > https://lists.sourceforge.net/lists/listinfo/fx2lib-devel > |