Hmm, guess I should have read the whole thread before I posted. ;-)
I see the openocd.udev patch is worrying about permissions for the USB
devices.  For my FT2232 based OpenOCD USB device the tty devices are
also important.

This becomes a real headache when you have multiple ttyUSB devices
(OpenOCD USB, RS232<>USB, Arduino USB board, etc) since they all get
ttyUSB devices and the number changes depending on what order they
attach/detach in.  What my rule does is create a symlink based on the
device name so I can depend on /dev/openocd00 and openocd01 being the
first and second serial interfaces on my OpenOCD USB adapter.

A few other observations:

  - is the SUBSYSTEM!=="usb_device" condition a typo for '!=' or
    a special udev condition?

  - neither of Fedora/RHEL/CentOS have a plugdev group
      + can't see a good alternative so maybe the openocd packagers
        will have to add it when they install
      + my rule lets the system rules set perms/group for the ttyUSB*
        dev (group uucp on Redhat)

  - at least on Fedora, the KERNEL=="ttyUSB*" is the magic to match ttys
      + is this the same on debian?
      + we should add a ttyUSB symlinks section for rules like mine

If you agree I can put together a patch with my rule.  Generally these
rules should also create a symlink based on the serial number for the
case of multiple devices being attached.  Unfortunately, as programmed
my device only returns serial #0.  Once I get time to figure out how to
program the FT2232 EEPROM I'll fix that (and update my rule).

What do you think?


Cheers,
John McCarthy.


On Wed, 2009-01-21 at 21:44 -0500, John McCarthy wrote:
> how about this one for the OpenOCD USB from Embedded-Projects.net:
> 
> SUBSYSTEMS=="usb", ATTRS{product}=="Dual RS232",      
> ATTRS{idProduct}=="6010", ATTRS{idVendor}=="0403", KERNEL=="ttyUSB*", 
> SYMLINK+="openocd$attr{bInterfaceNumber}"
> 
> creates /dev/openocd00 and /dev/openocd01 for the two serial interfaces.
> 
> 
> Cheers,
> John McC.
> 
> 
> On Mon, 2009-01-19 at 21:10 -0600, Dean Glazeski wrote:
> > Let's not forget the little Olimex OpenOCD JTAG TINY.
> > 
> > # Olimex ARM-USB-OCD-TINY
> > SYSFS{idVendor}=="15ba", SYSFS{idProduct}=="0004", MODE="664",
> > GROUP="plugdev"
> > 
> > // Dean
> > 
> > Zach Welch wrote: 
> > > On Tue, 2009-01-20 at 03:43 +0100, Uwe Hermann wrote:
> > >   
> > > > here's a short udev rules file for OpenOCD which I'm using in the Debian
> > > > package. It should probably be added to svn, together with some
> > > > autotools hooking so that it gets installed somewhere upon 'make 
> > > > install'
> > > > (or not, and leave that step to the user).
> > > >     
> > > 
> > > Yup, this would be a good thing to have; here is another line for the
> > > programmer that I am using under Ubuntu:
> > > 
> > > # IAR J-Link USB
> > > SYSFS{idVendor}=="1366", SYSFS{idProduct}=="0101", MODE="664", 
> > > GROUP="plugdev"
> > > 
> > > Cheers,
> > > 
> > > Zach
> > > 
> > > _______________________________________________
> > > Openocd-development mailing list
> > > [email protected]
> > > https://lists.berlios.de/mailman/listinfo/openocd-development
> > >   
> > _______________________________________________
> > Openocd-development mailing list
> > [email protected]
> > https://lists.berlios.de/mailman/listinfo/openocd-development

_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to