Attiny85: avrdude: Error: Could not find USBtiny device

Hi,

I am using arduino IDE in a raspberry pi 400. I am using this attiny85 programmer (Tiny AVR Programmer Hookup Guide - SparkFun Learn) to upload a blink example and get this error:

Arduino: 1.8.19 (Linux), Board: "ATtiny25/45/85, ATtiny85, Internal 8 MHz"

Sketch uses 690 bytes (8%) of program storage space. Maximum is 8192 bytes.
Global variables use 9 bytes (1%) of dynamic memory, leaving 503 bytes for local variables. Maximum is 512 bytes.
avrdude: Warning: cannot open USB device: Permission denied
avrdude: Error: Could not find USBtiny device (0x1781/0xc9f)
avrdude: Error: Could not find USBtiny device (0x1781/0xc9f)

This programmer and the board should not be damaged because they worked before I reinstalled the OS. I already added myself to the dialout group. And installed libusb.

How can I solve this problem? Thanks in advance.

David

EDIT: I also should add that I have no problems in uploading sketches to an arduino nano every

EDIT: I also tried setting udev rules like this: Permission denied to non-root user for USB device - Ask Ubuntu but did not worked

I'd start with finding the reason behind that error message.

Hi @davidnsousa. In order for the Arduino development software to upload to the Arduino board via the SparkFun Tiny ISP programmer, your Linux user account must have write permission for that device.

Standard user accounts don't have this permission by default. This error can occur when you attempt an upload without the necessary permissions. So it is necessary to configure your system to allow the upload. This is done by creating a special file.

I'll provide instructions you can follow to create that udev rules file:

  1. Open a command line terminal.
  2. Type the following command:
    echo 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="1781", ATTRS{idProduct}=="0c9f", MODE="0660", TAG+="uaccess"' | sudo tee --append /etc/udev/rules.d/60-USBtinyISP.rules && sudo udevadm trigger && sudo udevadm control --reload-rules
    
  3. Press the Enter key.
  4. If prompted for it, enter your Linux account password and press the Enter key.

The command should complete successfully. Now try uploading again. Hopefully the error will no longer occur.

1 Like

It worked! I love you <3

I'm glad it is working now.

Regards,
Per

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.