Connect your USBasp to computer.
Use this command to check if the computer recognize it:
# dmesg
[ 4734.960248] usb 5-1: new low-speed USB device number 21 using uhci_hcd
[ 4735.128594] usb 5-1: New USB device found, idVendor=16c0, idProduct=05dc
[ 4735.128607] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 4735.128614] usb 5-1: Product: USBasp
[ 4735.128621] usb 5-1: Manufacturer: www.fischl.de
Check your USBasp bus# and device#:
# lsusb
Bus 003 Device 002: ID 413c:8140 Dell Computer Corp. Wireless 360 Bluetooth
Bus 005 Device 021: ID 16c0:05dc VOTI shared ID for use with libusb
Bus 005 Device 017: ID 1c4f:0034 SiGma Micro
Bus 007 Device 002: ID 0b97:7761 O2 Micro, Inc. Oz776 1.1 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 003: ID 0b97:7772 O2 Micro, Inc. OZ776 CCID Smartcard Reader
Check device info:
# udevadm info -a -p $(udevadm info -q path -n /dev/bus/usb/[bus#]/[device#])
# udevadm info -a -p $(udevadm info -q path -n /dev/bus/usb/005/021)
Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device ‘/devices/pci0000:00/0000:00:1d.0/usb5/5-1’:
KERNEL==”5-1″
SUBSYSTEM==”usb”
DRIVER==”usb”
ATTR{bDeviceSubClass}==”00″
ATTR{bDeviceProtocol}==”00″
ATTR{devpath}==”1″
ATTR{idVendor}==”16c0″
ATTR{speed}==”1.5″
ATTR{bNumInterfaces}==” 1″
ATTR{bConfigurationValue}==”1″
ATTR{bMaxPacketSize0}==”8″
ATTR{busnum}==”5″
ATTR{devnum}==”21″
ATTR{configuration}==””
ATTR{bMaxPower}==”50mA”
ATTR{authorized}==”1″
ATTR{bmAttributes}==”80″
ATTR{bNumConfigurations}==”1″
ATTR{maxchild}==”0″
ATTR{bcdDevice}==”0103″
ATTR{avoid_reset_quirk}==”0″
ATTR{quirks}==”0x0″
ATTR{version}==” 1.10″
ATTR{urbnum}==”115″
ATTR{ltm_capable}==”no”
ATTR{manufacturer}==”www.fischl.de”
ATTR{removable}==”unknown”
ATTR{idProduct}==”05dc”
ATTR{bDeviceClass}==”ff”
ATTR{product}==”USBasp”
looking at parent device ‘/devices/pci0000:00/0000:00:1d.0/usb5’:
KERNELS==”usb5″
SUBSYSTEMS==”usb”
DRIVERS==”usb”
ATTRS{bDeviceSubClass}==”00″
ATTRS{bDeviceProtocol}==”00″
ATTRS{devpath}==”0″
ATTRS{idVendor}==”1d6b”
ATTRS{speed}==”12″
ATTRS{bNumInterfaces}==” 1″
ATTRS{bConfigurationValue}==”1″
ATTRS{bMaxPacketSize0}==”64″
ATTRS{authorized_default}==”1″
ATTRS{busnum}==”5″
ATTRS{devnum}==”1″
ATTRS{configuration}==””
ATTRS{bMaxPower}==”0mA”
ATTRS{authorized}==”1″
ATTRS{bmAttributes}==”e0″
ATTRS{bNumConfigurations}==”1″
ATTRS{maxchild}==”2″
ATTRS{bcdDevice}==”0308″
ATTRS{avoid_reset_quirk}==”0″
ATTRS{quirks}==”0x0″
ATTRS{serial}==”0000:00:1d.0″
ATTRS{version}==” 1.10″
ATTRS{urbnum}==”416″
ATTRS{ltm_capable}==”no”
ATTRS{manufacturer}==”Linux 3.8.0-29-generic uhci_hcd”
ATTRS{removable}==”unknown”
ATTRS{idProduct}==”0001″
ATTRS{bDeviceClass}==”09″
ATTRS{product}==”UHCI Host Controller”
looking at parent device ‘/devices/pci0000:00/0000:00:1d.0’:
KERNELS==”0000:00:1d.0″
SUBSYSTEMS==”pci”
DRIVERS==”uhci_hcd”
ATTRS{irq}==”20″
ATTRS{subsystem_vendor}==”0x1028″
ATTRS{broken_parity_status}==”0″
ATTRS{class}==”0x0c0300″
ATTRS{consistent_dma_mask_bits}==”32″
ATTRS{dma_mask_bits}==”32″
ATTRS{local_cpus}==”00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000003″
ATTRS{device}==”0x2830″
ATTRS{msi_bus}==””
ATTRS{local_cpulist}==”0-1″
ATTRS{vendor}==”0x8086″
ATTRS{subsystem_device}==”0x01f9″
ATTRS{numa_node}==”-1″
ATTRS{d3cold_allowed}==”0″
looking at parent device '/devices/pci0000:00':
KERNELS=="pci0000:00"
SUBSYSTEMS==""
DRIVERS==""
Create file usbasp.rules in /etc/udev/rules.d with content:
SUBSYSTEM=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05dc", GROUP="adm", MODE="0666"
Resstart udev:
# sudo restart udev
Then just unplug and plug the USBasp device again.
Sumber: https://www.skiews.com/usbasp-on-ubuntu-without-sudo-2/