AVReAl/Linux and root privileges

Originally AVReAl/Linux worked with LPT directly, by processor in/out instructions. This method requires root privileges. Later /dev/parport support was added. It is enough to add a user in lp group for this access method. Both ways are described in AVReAl and LPT in Linux post.

Then FTDI MPSSE support was added. I noticed that without administrator rights the program can’t connect to FT2232 chip. But all AVReAl versions on my PC run with root priveleges because it is required for LPT direct acces testing. So, the program works fine with FTDI chips and I had no need to dig deeper.

Finally I decided to investigate the matter. As often happens, to do right you just stop and spend a little time to read and think.

To work with FTDI-based programmers without root priveleges add a file named, for example 55-ftdi.rules to directory /etc/udev/rules.d/. The file must have the following content:

# FTDI-based devices
# FTDI vid=0403
# FT2232, FT2232H: pid=6010
# FT4232H:  pid=6011
# FT232H:   pid=6014
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010|6011|6014", OWNER="root", GROUP="root", MODE="0666"

You need not reboot. It is enough to reconnet the programming adapter.

The rules use default vid/pid for FTDI chips. If you use an adapter with different vid/pid, add appropriate line into the file.

OpenOCD contains a file with rules for all adapters supported by this program. If FTDI-based adapter listed in the file is used with AVReAl, you can simply copy the file into /etc/udev/rules.d/ directory. OpenOCD rules use GROUP="plugdev", MODE="0664". As for me it is no difference between this two variants for desktop PC because all users are already included in plugdev group.

Of course, you must have administrator rights to create the file. After that you will be able to work with AVReAl without root privileges.

Attached Files:

AVReAl @ XP/64, Windows7/32, Windows7/64

Working of avreal with FT2232C/L/D/H has been checked for WindowsXP/64, Windows7/32 Windows7/64 and CDM 2.06.00 driver. All OK.

AVReAl update – 1.28r1

avreal v1.28r1 (Sun 2010-01-31) has been released.

  • FT2232H, FT4232H support is added. Both channels with MPSSE are allowed for programming. Allowable pin names are listed in configuration description.
  • Switch -k is added for waiting an adapter’s key being pressed before starting the programming. See key record description.
  • Switch modifier -os is added for selecting SCK frequency instead of MCU clocking frequency.

It goes in! And it comes out!

“So it does!” said Pooh. “It goes in!”
“So it does!” said Piglet. “And it comes out!”

I found out that a cover plug of Siemens ME45 mobile phone fits fairly to USB socket and can be used for dust, moisture and static electricity protection.

ME45_with_cover USB_with_cover
[flagcounter image]