USBASP, Arduino IDE, Linux

Make sure USBasb plugged into USB Port and check whenever its conected or not by typing lsusb in terminal.

stufi1983@latif-laptop:~$ lsusb
Bus 001 Device 003: ID 0db0:6877 Micro Star International RT2573
Bus 001 Device 004: ID 058f:6387 Alcor Micro Corp. Flash Drive
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 003: ID 16c0:05dc Van Ooijen Technische Informatica shared ID for use with libusb
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

USBasp should detected with VendorID 16c0 and ProductID 05dc. Look at bus address. It says Bus 002 Device 003. See permission on Bus 002 Device 001 by typing ls -l /dev/bus/usb/002/003 in terminal.

stufi1983@latif-laptop:~$ ls -l /dev/bus/usb/002/003
crw-rw-r-- 1 root root 189, 130 Sep  6 10:05 /dev/bus/usb/002/003

Current permission is crw-rw-r– mean user dont have permission to write at the bus. So, change permission to 777 with chmod command.

stufi1983@latif-laptop:~$ sudo chmod 777 /dev/bus/usb/002/003
[sudo] password for stufi1983:

OK, Done. USBasp now already to use with Arduino. Select in Arduino  menu Tool>Progammer>USBasp. Make new file New>Examples>Basic>Blink. Then upload by using menu: File>Upload using Programer