0

When running lattice diamond 3.11 the installation instructions to get the usb programmer to work are ineffective.

libusb couldn't open USB device /dev/bus/usb/003/023: Permission denied.
libusb requires write access to USB device nodes.

The permissions are supposed to be set by a udev rule.

The rule is supposed to be something like:

SUBSYSTEM=="usb",ATTRS{idVendor}=="1134",ATTRS{idProduct}=="8001",MODE="0666",SYMLINK+="lattice-%n"

But it's not actually getting set to 0666. What is wrong with lattice's instructions?

poleguy
  • 151
  • 4

1 Answers1

0

To fix it, I had to track down that the rule was firing.

How to check if a udev rule fired?

It was, but then the default rule took precedent because lattice suggests putting the rule in /etc/udev/rules.d/10-lattice.rules which is lower priority than /usr/lib/udev/rules.d/50-udev-default.rules

It can't be 10, it must be > 50 because of 50-udev-default.rules

So I put it in 51-lattice.rules and now everything is working smoothly. The key command to debug this was something like:

udevadm test /devices/pci0000:00/0000:00:14.0/usb3/3-5/3-5.2

Which told me that this was the last rule applied, not mine!

MODE 0664 /usr/lib/udev/rules.d/50-udev-default.rules:38

It's now working as intended with no warning "Permission denied."

poleguy
  • 151
  • 4