Ask Your Question

Altera Quartus, USB-Blaster, jtagd, udev, USB permissions

asked 2016-02-06 09:28:24 -0600

woky gravatar image


I'd like to use Quartus (Lite, 15.1) on my Fedora 23 box. To be able to program the FPGA via USB I need to use the USB-Blaster Download Cable. With Quartus's bin directory in PATH, I can run jtagconfig to list connected devices (NOT as root):

$ jtagconfig 
1) USB-Blaster variant [6-1.3]
  Unable to lock chain - Insufficient port permissions

As per I've created the udev rules file to grant the permissions to everyone on the USB device (I'll later change MODE to ONWER):

$ pwd
$ ls -lZ 51-usbblaster.rules 
-rw-rw-r--. 1 root root unconfined_u:object_r:udev_rules_t:s0 411  6. úno 15.23 51-usbblaster.rules
$ cat 51-usbblaster.rules 
# USB-Blaster
BUS=="usb", SYSFS{idVendor}=="09fb", SYSFS{idProduct}=="6001", MODE="0666"
BUS=="usb", SYSFS{idVendor}=="09fb", SYSFS{idProduct}=="6002", MODE="0666" 
BUS=="usb", SYSFS{idVendor}=="09fb", SYSFS{idProduct}=="6003", MODE="0666"   

# USB-Blaster II
BUS=="usb", SYSFS{idVendor}=="09fb", SYSFS{idProduct}=="6010", MODE="0666"
BUS=="usb", SYSFS{idVendor}=="09fb", SYSFS{idProduct}=="6810", MODE="0666"

As root I did:

# udevadm control --reload

The following appears in dmesg after I plug in the USB-Blaster cable:

[ 4489.920403] usb 6-1.3: new full-speed USB device number 7 using ehci-pci
[ 4490.010055] usb 6-1.3: New USB device found, idVendor=09fb, idProduct=6001
[ 4490.010058] usb 6-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 4490.010060] usb 6-1.3: Product: USB-Blaster
[ 4490.010061] usb 6-1.3: Manufacturer: Altera
[ 4490.010063] usb 6-1.3: SerialNumber: 91d28408

But I still can't access the device:

$ jtagconfig 
1) USB-Blaster variant [6-1.3]
  Unable to lock chain - Insufficient port permissions

jtagconfig spawns the jtagd daemon on background so I run strace on it. The USB device it touches

open("/dev/bus/usb/006/007", O_RDWR|O_NONBLOCK) = -1 EACCES (Permission denied)

has incorrect permissions:

$ ls -l /dev/bus/usb/006/007
crw-rw-r--. 1 root root 189, 646  6. úno 15.49 /dev/bus/usb/006/007

Why doesn't udev fix the permissions?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2016-02-07 08:39:06 -0600

updated 2016-02-07 08:41:31 -0600

I think you should replace BUS with SUBSYSTEMS and SYSFS whith ATTRS.

# USB-Blaster
SUBSYSTEMS=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6001", MODE="0666"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6002", MODE="0666"     
SUBSYSTEMS=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6003", MODE="0666"       

# USB-Blaster II
SUBSYSTEMS=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6010", MODE="0666"
SUBSYSTEMS=="usb", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6810", MODE="0666"

You can also check your udev rule with udevadm test /sys/<path-to-device which also should give you a hint if a rule is accepted or not.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2016-02-06 09:28:24 -0600

Seen: 2,734 times

Last updated: Feb 07 '16