LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-28-2014, 11:57 AM   #1
brodo
Member
 
Registered: Jan 2004
Location: Poland, Poznan
Distribution: Slackware current 32 / 64
Posts: 415

Rep: Reputation: 32
Problem with an USBasp programmer


I cannot force Avrdude to use a connected USB based programmer.

Invoking avrdude with -vv option yields this:

System wide configuration file is "/etc/avrdude.conf"
User configuration file is "/home/user/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/bus/usb/003/007
Using Programmer : usbasp-clone
avrdude: usbasp_open("/dev/bus/usb/003/007")
avrdude: Warning: cannot open USB device: Permission denied
avrdude: error: could not find USB device with vid=0x16c0 pid=0x5dc
avrdude: usbasp_close()

avrdude done. Thank you.


A part of my /etc/udev/rules.d/USBasp.rules is as follows:

USBasp programmer
ATTRS{vid}=="0x16c0", ATTRS{pid}=="0x5dc", GROUP="usb", MODE="0666"


dmesg according to a this programmer shows this:

[ 3052.476551] usb 3-1.2: new low-speed USB device number 8 using ehci-pci
[ 3052.562281] usb 3-1.2: New USB device found, idVendor=16c0, idProduct=05dc
[ 3052.562292] usb 3-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 3052.562298] usb 3-1.2: Product: USBasp
[ 3052.562303] usb 3-1.2: Manufacturer: www.fischl.de


port manually entered in a Burn O Mat (Gui for Avrdude) settings is:

/dev/bus/usb/003/007


How can I fix that ?
 
Old 06-28-2014, 12:14 PM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,257

Rep: Reputation: Disabled
Despite your custom udev rule, what happens if you try as root (I assume that you restarted udevd after setting that rule)?

Last edited by Didier Spaier; 06-28-2014 at 12:15 PM.
 
Old 06-29-2014, 05:01 AM   #3
brodo
Member
 
Registered: Jan 2004
Location: Poland, Poznan
Distribution: Slackware current 32 / 64
Posts: 415

Original Poster
Rep: Reputation: 32
I rebooted my machine instead restarting udevd - is this way OK ?

I also tried to run it as a root:

bash-4.3# /usr/bin/avr8-burn*
/usr/bin/avr8-burn-o-mat: line 3: java: command not found
bash-4.3#

but there's a problem (?) with invoking java as a root ; avr8-burn-o-mat is a java front-end for a
CLI avrdude.
 
Old 06-29-2014, 05:04 AM   #4
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,257

Rep: Reputation: Disabled
To try as root, just adapt root's PATH accordingly, or simply run your application like this: JAVA=<path/to/java> <command>. And check that JAVA_HOME, is set to /usr/lib/java.

PS Did you install java?

Last edited by Didier Spaier; 06-29-2014 at 05:17 AM.
 
Old 06-29-2014, 05:52 AM   #5
brodo
Member
 
Registered: Jan 2004
Location: Poland, Poznan
Distribution: Slackware current 32 / 64
Posts: 415

Original Poster
Rep: Reputation: 32
Yes, I have Java "1.7.0_51".

Invoking:

/usr/bin/avr8-burn*

as a user properly starts the software.

Invoking it as a root does not. as I've shown in my previous post.
 
Old 06-29-2014, 10:53 AM   #6
ml4711
Member
 
Registered: Aug 2012
Location: Ryomgård, Danmark
Distribution: Slackware64
Posts: 146

Rep: Reputation: 103Reputation: 103
Try "su -" to see if You then get java in your PATH!
 
Old 06-29-2014, 12:52 PM   #7
brodo
Member
 
Registered: Jan 2004
Location: Poland, Poznan
Distribution: Slackware current 32 / 64
Posts: 415

Original Poster
Rep: Reputation: 32
The "su -" worked, thanks !

Now it is the time to find a way to run it all in a user mode.
Any ideas ?
 
Old 06-29-2014, 01:28 PM   #8
ml4711
Member
 
Registered: Aug 2012
Location: Ryomgård, Danmark
Distribution: Slackware64
Posts: 146

Rep: Reputation: 103Reputation: 103
Maybe change Your udev.rules from:

ATTRS{vid}=="0x16c0", ATTRS{pid}=="0x5dc", GROUP="usb", MODE="0666"

to this (without the 0x):

ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05dc", GROUP="usb", MODE="0666"

So it matches the values from dmesg:

....
New USB device found, idVendor=16c0, idProduct=05dc
....


And probably reload the udevrules

EDIT: Why GROUP usb, it's not a group found in Slackware!

Enjoy

Last edited by ml4711; 06-29-2014 at 01:38 PM.
 
Old 06-29-2014, 02:15 PM   #9
brodo
Member
 
Registered: Jan 2004
Location: Poland, Poznan
Distribution: Slackware current 32 / 64
Posts: 415

Original Poster
Rep: Reputation: 32
Wow , this syntax correction worked well !
Thank you !!!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
I am a programmer(Student). How can i help the Linux community as a Programmer? mgsurya Linux - Newbie 11 07-21-2010 04:56 AM
Programmer to Programmer ( Long Story Of A GUI ) mdoubledragon Programming 1 10-13-2005 06:41 PM
Problem Installing 'J' Programmer's Editor (Linux) DavidMD Linux - Software 4 05-26-2003 03:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration