Rules and Permissions for USB Blaster Setup in Linux Virtual Machine
SOURCE: https://stackoverflow.com/questions/18704913/unable-to-lock-chain-insufficient-port-permissions
If when jtagconfig is ran
1) USB-Blaster varient [2-1]
unable to lock chain(Insufficient port permissions)
is returned and Quartus cant program your FPGA. The following steps should fix this problem. An amazing resource on setting up Quartus and other Altera related design software is Altera Design Software
Before a USB Blaster can be used its jtag rules and permissions must be configured.
First kill jtagd.
sudo killall -9 jtagd
If jtagconfig is ran whilst jtagd is already running then jtagconfig will have no effect. jtagd and jtagconfig can be found in
/altera/3.1/quartus/bin
And can be executed using
./jtagd
./jtagconfig
As root create file /etc/udev/rules.d/51-altera-usb-blaster.rules
Inside the file, include
SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6001", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6002", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6003", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6010", MODE="0666"
SUBSYSTEM=="usb", ATTR{idVendor}=="09fb", ATTR{idProduct}=="6810", MODE="0666"
The five idProducts are all the known USB-Blaster Download Cable USB product IDs (for the Altera vendor ID, 0x09fb).
Then run
sudo udevadm control --reload
Now run jtagd.
./jtagd
Before jtagconfig returned
- USB-Blaster varient [2-1] unable to lock chain(Insufficient port permissions)
Now, it returns
- USB-Blaster [2-1] 020F70DD EP3C120/EP4CE115
Go to Quartus II and open tools -> programming
In hardware setup the USB Blaster should be found as USB-Blaster and not USB-Blaster varient.
Other useful resources
https://blog.atomminer.com/fighting-altera-usb-blaster-on-ubuntu/
https://rileywood.me/2017/02/19/fpga_setup/