<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://baszerr.eu/lib/exe/css.php?s=feed" type="text/css"?>
<rss version="2.0">
    <channel xmlns:g="http://base.google.com/ns/1.0">
        <title>BaSzErr - blog:2013:11:21</title>
        <description></description>
        <link>https://baszerr.eu/</link>
        <lastBuildDate>Sun, 12 Apr 2026 03:04:08 +0000</lastBuildDate>
        <generator>FeedCreator 1.8</generator>
        <image>
            <url>https://baszerr.eu/lib/exe/fetch.php?media=wiki:dokuwiki.svg</url>
            <title>BaSzErr</title>
            <link>https://baszerr.eu/</link>
        </image>
        <item>
            <title>avr_programming_as_non-root</title>
            <link>https://baszerr.eu/doku.php?id=blog:2013:11:21:avr_programming_as_non-root</link>
            <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;avr_programming_as_non-root&quot;&gt;2013.11.21 - avr programming as non-root&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
&lt;a href=&quot;https://baszerr.eu/lib/exe/detail.php?id=blog%3A2013%3A11%3A21%3Aavr_programming_as_non-root&amp;amp;media=blog:2013:11:21:avrprog.jpg&quot; class=&quot;media&quot; title=&quot;blog:2013:11:21:avrprog.jpg&quot;&gt;&lt;img src=&quot;https://baszerr.eu/lib/exe/fetch.php?w=400&amp;amp;tok=c13f6a&amp;amp;media=blog:2013:11:21:avrprog.jpg&quot; class=&quot;mediaright&quot; align=&quot;right&quot; loading=&quot;lazy&quot; title=&quot;avr prog&quot; alt=&quot;avr prog&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;
i use usb &lt;a href=&quot;http://and-tech.pl/programator-avrprog-usb-v2&quot; class=&quot;urlextern&quot; title=&quot;http://and-tech.pl/programator-avrprog-usb-v2&quot; rel=&quot;ugc nofollow&quot;&gt;avr prog&lt;/a&gt; for flashing &lt;a href=&quot;https://en.wikipedia.org/wiki/Atmel AVR&quot; class=&quot;interwiki iw_wp&quot; title=&quot;https://en.wikipedia.org/wiki/Atmel AVR&quot;&gt;AVRs&lt;/a&gt; for some time now. what has always been annoying is that this was done from root account, since direct r/w access to &lt;a href=&quot;https://en.wikipedia.org/wiki/Human Interface Device&quot; class=&quot;interwiki iw_wp&quot; title=&quot;https://en.wikipedia.org/wiki/Human Interface Device&quot;&gt;hid&lt;/a&gt; /dev/ was required. there is however a nice way to overcome this, since udev allows to define per-device rules.
&lt;/p&gt;

&lt;p&gt;
first step is to create group, that will have access to this device:
&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;addgroup --system avrdev&lt;/pre&gt;

&lt;p&gt;
then add your user to this group:
&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;adduser johndoe avrdev&lt;/pre&gt;

&lt;p&gt;
next step is to check what are the device&amp;#039;s vendor and product IDs:
&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;# make sure the device is unplugged
$ lsusb | sort &amp;gt; PRE
# plug in the device and wait 1-3 seconds, until it is visible in the system
$ lsusb | sort &amp;gt; POST
$ diff --suppress-common-lines PRE POST
12a13                            
&amp;gt; Bus 008 Device 007: ID 16c0:05df Van Ooijen Technische Informatica HID device except mice, keyboards, and joysticks&lt;/pre&gt;

&lt;p&gt;
so the vendor ID is 16c0 and product ID is 05df.
&lt;/p&gt;

&lt;p&gt;
next create dedicated rule file for this device – say &lt;em&gt;/etc/udev/rules.d/49-avrprog.rules&lt;/em&gt; – for udev, with the following content:
&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;# AVRPROG USB v2
SUBSYSTEMS==&amp;quot;usb&amp;quot;, ATTRS{idVendor}==&amp;quot;16c0&amp;quot;, ATTRS{idProduct}==&amp;quot;05df&amp;quot;, \
  GROUP:=&amp;quot;avrdev&amp;quot;, \
  MODE:=&amp;quot;0660&amp;quot;, \
  SYMLINK+=&amp;quot;avrprog_%n&amp;quot;&lt;/pre&gt;

&lt;p&gt;
now reload udev&amp;#039;s rules:
&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;udevadm control --reload&lt;/pre&gt;

&lt;p&gt;
next time you plug your programmer in, system will detect it, assign proper group and permissions and add a nice link, like this:
&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;$ l /dev/avrprog_1 
lrwxrwxrwx 1 root root 11 Nov 21 10:27 /dev/avrprog_1 -&amp;gt; usb/hiddev1
$ l `readlink -e /dev/avrprog_1`
crw-rw---- 1 root avrdev 180, 1 Nov 21 10:27 /dev/usb/hiddev1&lt;/pre&gt;

&lt;p&gt;
now you&amp;#039;re able to flash software as non-root. note that you need to relog in order to make yourself visible as a member of the new group, visible to the system. or
&lt;/p&gt;
&lt;pre class=&quot;code&quot;&gt;exec su - -c &amp;quot;su - johndoe&amp;quot;&lt;/pre&gt;

&lt;p&gt;
on the console you want to program on.
&lt;/p&gt;

&lt;p&gt;
have fun! :)
&lt;/p&gt;

&lt;/div&gt;
</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 15 Jun 2021 20:09:04 +0000</pubDate>
        </item>
    </channel>
</rss>
