Re: [avrdude-dev] usb-iss support

2013-10-15 Thread Per Dalgas Jakobsen

Arg, never mind...

USB-ISS cannot be used as a programmer after all. With current firmware 
the SPI mode does not allow the reset to stay down between SPI-transactions.


~Per


On 2013-10-15 10:18, Per Dalgas Jakobsen wrote:

Hi

I've pruchased a Devantech USB-ISS multi-protocol USB-module, and I 
would like to add it to the avrdude. Plugging the module into the 
USB-port automatically creates a serial port, through which the device 
can be accessed.


I plan to use the virtual serial port to communicate with the programmer.

The module just needs to be initialized for SPI, after which each 
SPI-command is prefixed with a SPI-command-byte (a constant).


The stk500 seem too advanced to be used as starting point for this 
simple device.

Which module would be the best starting point for this device?

~Per


___
avrdude-dev mailing list
avrdude-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avrdude-dev



___
avrdude-dev mailing list
avrdude-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avrdude-dev


Re: [avrdude-dev] USB

2009-11-16 Thread Russell Shaw

Joerg Wunsch wrote:

As Russell Shaw wrote:


I just got a usb AVRISP. What permission should i fix?


You need read/write permission.

As these devices are created dynamically, you cannot do that with a
plain chmod, but you have to consult your systems dynamic device
facilitie's documentation.  Most Linux systems use udev for that
purpose, so you'd have to add another udev rule for the VID/PID pairs
you are interested in.


Hi,
The udev rules are intended for modifying the files in /dev only.

However, avrdude is reading stuff in /proc, which has no way
of configuring the permissions of dynamically created files
from what i can see.


___
avrdude-dev mailing list
avrdude-dev@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avrdude-dev


Re: [avrdude-dev] USB

2009-11-16 Thread Michal Ludvig
On 11/16/2009 09:12 PM, Russell Shaw wrote:

 The udev rules are intended for modifying the files in /dev only.
 However, avrdude is reading stuff in /proc

According to your original post it's clearly accessing /dev:

 open(/dev/bus/usb/007/001, O_RDWR) = -1 EACCES (Permission denied)

Modifying udev rules should help.

Michal





___
avrdude-dev mailing list
avrdude-dev@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avrdude-dev


Re: [avrdude-dev] USB

2009-11-16 Thread Russell Shaw

Joerg Wunsch wrote:

As Russell Shaw wrote:


I just got a usb AVRISP. What permission should i fix?


You need read/write permission.

As these devices are created dynamically, you cannot do that with a
plain chmod, but you have to consult your systems dynamic device
facilitie's documentation.  Most Linux systems use udev for that
purpose, so you'd have to add another udev rule for the VID/PID pairs
you are interested in.


Hi,
Avrdude runs ok as root, but not as a normal user.

I traced in to libusb:

(gdb) bt
#0  usb_control_msg (dev=0x82437a8, requesttype=128, request=6, value=768, 
index=0, bytes=0xbfffd245 \333, incomplete sequence \373\267, size=255, 
timeout=1000) at ../linux.c:143


#1  0xb7fbeaea in usb_get_string (dev=0x82437a8, index=0, langid=0, 
buf=0xbfffd245 \333, incomplete sequence \373\267, buflen=255) at ../usb.c:226


#2  0xb7fbeb32 in usb_get_string_simple (dev=0x82437a8, index=3, buf=0xbfffd484 
\1, buflen=256) at ../usb.c:242


#3  0x08073d1d in usbdev_open (port=0xb985 usb, baud=8452, fd=0x8099528) 
at usb_libusb.c:117


#4  0x0806d95a in stk500v2_open (pgm=0x8098468, port=0xb985 usb) at 
stk500v2.c:1271


#5  0x0804b239 in main (argc=9, argv=0xb7c4) at main.c:778


usb.c:242

char tbuf[255];   /* Some devices choke on size  255 */
...
ret = usb_get_string(dev, 0, 0, tbuf, sizeof(tbuf));


This returns -1 and i can't figure out why. The system hasn't
read anything out of /dev yet.

Just to make sure of things, i also tried:

# chown -R root:avrdude /dev/usb*
# chown -R root:avrdude /dev/bus/usb
# chmod -R 660 /dev/usb*
# chmod -R 660 /dev/bus/usb

and i'm in group avrdude. I have the avrisp plugged in.


___
avrdude-dev mailing list
avrdude-dev@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avrdude-dev


Re: [avrdude-dev] USB

2009-11-16 Thread Joerg Wunsch
As Russell Shaw wrote:

 Avrdude runs ok as root, but not as a normal user.

Sure, device permission problems.

 This returns -1 and i can't figure out why.

That's the way permission problems manifest under Linux: you can still
open the USB device in libusb (apparently, this is done through
something else than the actual device node), but it fails as soon as
you try sending a message to it (which is needed in order to request a
string descriptor entry from the device).

 Just to make sure of things, i also tried:
 
 # chown -R root:avrdude /dev/usb*
 # chown -R root:avrdude /dev/bus/usb
 # chmod -R 660 /dev/usb*
 # chmod -R 660 /dev/bus/usb

Doesn't help.  All these devices are created by your system
dynamically.  As soon as you say Goodbye! to the AVRISPmkII, it
disconnects from and reconnects to the USB, and voila, you've got a
new /dev/bus/usb/... entry -- again with the wrong permissions.

Why do you insist on ignoring the udev hints that have been given to
you?

-- 
cheers, Jorg   .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)


___
avrdude-dev mailing list
avrdude-dev@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avrdude-dev


Re: [avrdude-dev] USB

2009-11-16 Thread Russell Shaw

Joerg Wunsch wrote:

As Russell Shaw wrote:


Avrdude runs ok as root, but not as a normal user.


Sure, device permission problems.


This returns -1 and i can't figure out why.


That's the way permission problems manifest under Linux: you can still
open the USB device in libusb (apparently, this is done through
something else than the actual device node), but it fails as soon as
you try sending a message to it (which is needed in order to request a
string descriptor entry from the device).


Just to make sure of things, i also tried:

# chown -R root:avrdude /dev/usb*
# chown -R root:avrdude /dev/bus/usb
# chmod -R 660 /dev/usb*
# chmod -R 660 /dev/bus/usb


Doesn't help.  All these devices are created by your system
dynamically.  As soon as you say Goodbye! to the AVRISPmkII, it
disconnects from and reconnects to the USB, and voila, you've got a
new /dev/bus/usb/... entry -- again with the wrong permissions.


I did that temporarily while the device was plugged in to see
what effect it had. If that didn't work (which it didn't), then
no amount of udev rules will help either.


Why do you insist on ignoring the udev hints that have been given to
you?


I tried that as well as my own, and various combinations, but it
didn't work.


I currently have a udev rule:

  SUBSYSTEMS==usb, ATTRS{product}==AVRISP mkII, GROUP=avrdude


ls -l /dev/usb*

  ...
  crw-rw  1 root avrdude 252,  17 2009-11-17 00:34 usbdev8.8_ep02
  crw-rw  1 root avrdude 252,  18 2009-11-17 00:34 usbdev8.8_ep00
  crw-rw  1 root avrdude 252,  16 2009-11-17 00:34 usbdev8.8_ep82


Works ok: sudo avrdude -p m8535 -c avrispmkII -P usb -U flash:w:proj.hex
Doesn't work:  avrdude -p m8535 -c avrispmkII -P usb -U flash:w:proj.hex

  avrdude: usb_open(): cannot read serial number error sending control message:
Operation not permitted
  avrdude: usb_open(): cannot read product name error sending control message:
Operation not permitted
  avrdude: usbdev_open(): error setting configuration 1: could not set config 1:
Operation not permitted
  avrdude: usbdev_open(): did not find any USB device usb



___
avrdude-dev mailing list
avrdude-dev@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avrdude-dev


Re: [avrdude-dev] USB

2009-11-16 Thread Russell Shaw

Russell Shaw wrote:

Joerg Wunsch wrote:

As Russell Shaw wrote:


Avrdude runs ok as root, but not as a normal user.


Sure, device permission problems.


I got it working now. Directory permissions must have been wrong.
I did: sudo chmod -R +X /dev/bus


___
avrdude-dev mailing list
avrdude-dev@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avrdude-dev


Re: [avrdude-dev] USB

2009-11-15 Thread Joerg Wunsch
As Russell Shaw wrote:

 I just got a usb AVRISP. What permission should i fix?

You need read/write permission.

As these devices are created dynamically, you cannot do that with a
plain chmod, but you have to consult your systems dynamic device
facilitie's documentation.  Most Linux systems use udev for that
purpose, so you'd have to add another udev rule for the VID/PID pairs
you are interested in.

-- 
cheers, Jorg   .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)


___
avrdude-dev mailing list
avrdude-dev@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avrdude-dev