Avrdude 5.8 USB programming...

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I install avrdude 5.8 on a ubuntu.If i write avrdude -P usb, receive error so usb_open() cannot read product name; ecc..

But if i use sudo avrdude -P usb... work perfectly! I need use avrdude without sudo...how can i resolve this?
Thank you...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You don't have permissions to access that device.

Use the mechanism provided by udev to grant yourself permissions.
One way to do that is:

1) add yourself to a special group e.g. usb (create that group if necessary)
2) configure udev to change the permissions of the device file of your programmer to grant access to the usb group.

For point 2) you didn't specify what programming hardware you are using. Attach the device and issue the command dmesg. There you will find the idVendor and idProduct of your programming hardware.
Then add a line like the follwing to /etc/udev/rules.d/40-permissions.rules

SUBSYSTEM=="usb_device",SYSFS{idVendor}=="XXX",SYSFS{idProduct}=="YYY",GROUP="usb",MODE="660"

Change XXX and YYY accordingly.

HTH
Thomas

EDIT: added the GROUP="" option.

pycrc -- a free CRC calculator and C source code generator

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I create a file in a /etc/udev/rules.d/40-permissions.rules

#AVRISP mkII
SUBSYSTEM=="usb_device",SYSFS{idVendor}=="03eb",SYSFS{idProduct}=="2104",GROUP="usb",MODE="0666"

But i have take idVendor and id Product in internet becouse dmesg siplay only this message

new full speed USB device usong uhci_hdc and address 9

What is strong?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hmm, strange. I haven't access to my Debian box at the moment, but a bit of googling brought up this tutorial on avrfreaks that seems to be Ubuntu specific and quite up to date:

[TUT] [HARD] Use AVR Dragon with Linux without being root

You'll need to change the idProduct number, though.

pycrc -- a free CRC calculator and C source code generator

Last Edited: Mon. Sep 28, 2009 - 10:04 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The "quick fix" is to login as root ;-)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I put this...

SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE:="0666"
SUBSYSTEM=="usb_device",MODE:="0666"

Is not safe...but work.