USBasp Works in Windows but not working in Linux

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
abd

USBasp Works in Windows but not working in Linux

Post by abd » Thu Feb 28, 2008 6:42 pm

Hello all
I have strange problem with my USBasp board. Board works well in windows XP but in linux (ubuntu 7.10) doesn't work???
Thanks in advanced

dmesg:

Code: Select all

[ 2782.000000] usb 3-1: USB disconnect, address 4
[ 2784.576000] usb 3-1: new low speed USB device using uhci_hcd and address 5
[ 2784.744000] usb 3-1: configuration #1 chosen from 1 choice


lsusb:

Code: Select all

Bus 005 Device 002: ID 0c45:627f Microdia 
Bus 005 Device 001: ID 0000:0000 
Bus 002 Device 001: ID 0000:0000 
Bus 004 Device 002: ID 093a:2510 Pixart Imaging, Inc.
Bus 004 Device 001: ID 0000:0000 
Bus 001 Device 001: ID 0000:0000 
Bus 003 Device 005: ID 16c0:05dc 
Bus 003 Device 002: ID 08ff:2580 AuthenTec, Inc.
Bus 003 Device 001: ID 0000:0000 

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Post by christian » Thu Feb 28, 2008 11:08 pm

Is this the same computer? If not, it may be a hardware problem, e.g. missing zener diodes.

Guest

Post by Guest » Fri Feb 29, 2008 8:20 am

christian wrote:Is this the same computer? If not, it may be a hardware problem, e.g. missing zener diodes.

Yes same computer with dual boot! Also my circuit have 3.3v zener diodes:(

abd

[SOLVED]

Post by abd » Fri Feb 29, 2008 5:27 pm

Hi all
After googling for a day I found out the problem was permissions. I should call avrdude as root!!! really crazy problem!


Code: Select all

 sudo avrdude -c usbasp -p m8 

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Post by christian » Fri Feb 29, 2008 8:25 pm

This depends on your Linux configuration. As far as I know, you can configure hotplug to set less restrictive permissions for particular USB devices. By default, only root has full access.

Abd

add permission to your usb device.

Post by Abd » Sat Mar 01, 2008 12:13 pm

christian wrote:This depends on your Linux configuration. As far as I know, you can configure hotplug to set less restrictive permissions for particular USB devices. By default, only root has full access.

Hi all, with christian suggestions and some googling I used these simple instructions for adding permissions to users for using usb device:


How to add user permission for USBasp (I have tested this method in ubuntu 7.10):
source:http://www.bitpim.org/help/

1. Create new rule for udev

Code: Select all

sudo gedit /etc/udev/rules.d/60-objdev.rules

2. Edit new rule in gedit and add following:

Code: Select all

   SUBSYSTEM!="usb_device", ACTION!="add", GOTO="objdev_rules_end"
   # USBasp
   SYSFS{idVendor}=="16c0", SYSFS{idProduct}=="05dc", GROUP="users", MODE="666"
   LABEL="objdev_rules_end"

3. Restart udev.

Code: Select all

   sudo /etc/init.d/udev restart

nickoe
Posts: 1
Joined: Fri May 01, 2009 11:32 pm

Re: USBasp Works in Windows but not working in Linux

Post by nickoe » Fri May 01, 2009 11:35 pm

Abd wrote:How to add user permission for USBasp (I have tested this method in ubuntu 7.10):

source:http://www.bitpim.org/help/


1. Create new rule for udev

Code: Select all

sudo gedit /etc/udev/rules.d/60-objdev.rules

2. Edit new rule in gedit and add following:

Code: Select all

   SUBSYSTEM!="usb_device", ACTION!="add", GOTO="objdev_rules_end"
   # USBasp
   SYSFS{idVendor}=="16c0", SYSFS{idProduct}=="05dc", GROUP="users", MODE="666"
   LABEL="objdev_rules_end"

3. Restart udev.

Code: Select all

   sudo /etc/init.d/udev restart


Thankyou!

Olof

Re: USBasp Works in Windows but not working in Linux

Post by Olof » Sun Oct 13, 2013 2:23 pm

In Ubuntu 12-04 LTS udev rules using SYSFS do not work. ATTRS(..) do work.

Post Reply