Page 1 of 1

udev rules script not working, ideas why?

Posted: Fri Jan 25, 2013 12:23 pm
by wb666greene
This works on Ubuntu 10.04 but not LM13.

I'm trying to add the "drivers" for an Acces I/O Products USB A/D, D/A, & DIO device. The company's instructions are poor and their scripts on the installation CD are incorrect for the device I ordered, so I don't recommend them. But I fixed the scripts and got it working on Ubuntu 10.04.

On LM13 the udev script does not appear to run :(
All my file permisions match what is on the rules files setup by the installation.

The relavant part of my 10-acces_usb.rules script in /etc/udev/rules.d:

Code: Select all

# USB-AIO16-16A
SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", SYSFS{idVendor}=="1605", SYSFS{idProduct}=="0140", RUN+="/sbin/fxload -t fx2 -D $tempnode -I /usr/share/usb/USB-AIO16-16A.hex"
SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", SYSFS{idVendor}=="1605", SYSFS{idProduct}=="8140", RUN+="/bin/chmod 0666 $tempnode"

The fxload package has been installed. If I run their perl installation script (which I correced as well) the firmware loads and the device works.

I need the udev hotplug system to work for this device, any ideas what might be wrong?

lsusb output after device insertion:
Bus 001 Device 005: ID 1605:0140

lsusb output after firmware is loaded by the perl script:
Bus 001 Device 006: ID 1605:8140


On Ubuntu 10.04 you never really see the 1605.0140 as once udev loads the firmware the device disconnects and reconnects as 1605:8140.

Re: udev rules script not working, ideas why?

Posted: Sat Jan 26, 2013 7:24 am
by viking777
Could this be down to the version changes in udev between Ubuntu 10.04 and Mint 13 (based on 12.04)? Of course maybe you have the latest udev version in 10.04, I don't know, but if you haven't it was shipped with udev 151.12 whereas 12.04 comes with 175.0. The changes since then are massive:

https://launchpad.net/ubuntu/+source/udev/+changelog

Any one of those changes could have altered the syntax for the rule you created on Lucid - but don't ask me which one, or how to change it :?

Re: udev rules script not working, ideas why?

Posted: Tue Jan 29, 2013 10:38 am
by wb666greene
Looks like SYSFS{} has been changed to ATTR{}

This is supposed to be progress??