{"id":2910,"date":"2010-03-30T14:31:36","date_gmt":"2010-03-30T21:31:36","guid":{"rendered":"http:\/\/mightyohm.com\/blog\/?p=2910"},"modified":"2015-09-26T11:11:03","modified_gmt":"2015-09-26T18:11:03","slug":"run-avrdude-without-root-privs-in-ubuntu","status":"publish","type":"post","link":"https:\/\/mightyohm.com\/blog\/2010\/03\/run-avrdude-without-root-privs-in-ubuntu\/","title":{"rendered":"Run avrdude on Ubuntu without root"},"content":{"rendered":"<h3>A quick tip for Ubuntu users:<\/h3>\n<p>As installed by the <a href=\"http:\/\/packages.ubuntu.com\/search?keywords=avrdude&amp;searchon=names&amp;suite=karmic&amp;section=all\">avrdude package<\/a> on Ubuntu, <a href=\"http:\/\/www.bsdhome.com\/avrdude\/\">avrdude<\/a> needs root priveledges to work properly with the Adafruit <a href=\"http:\/\/www.ladyada.net\/make\/usbtinyisp\/index.html\">USBTinyISP<\/a> AVR programmer.\u00a0 This gets annoying pretty fast because to program an AVR you need to run avrdude (or make) with sudo every time or log in as root (not recommended).\u00a0 Without sudo, avrdude will return an error:<\/p>\n<pre>avrdude: error: usbtiny_transmit: error sending control message: Operation not permitted<\/pre>\n<pre>avrdude: initialization failed, rc=-1<\/pre>\n<pre> Double check connections and try again, or use -F to override<\/pre>\n<pre> this check.<\/pre>\n<pre>avrdude: error: usbtiny_transmit: error sending control message: Operation not permitted\r\navrdude done.\u00a0 Thank you.<\/pre>\n<p>LadyAda points out in <a href=\"http:\/\/www.ladyada.net\/make\/usbtinyisp\/avrdude.html\">her avrdude tutorial<\/a> that there is a way around this behavior by setting up some <a href=\"http:\/\/hackaday.com\/2009\/09\/18\/how-to-write-udev-rules\/\">udev rules<\/a> for the USBTinyISP.\u00a0 However, I found that the rules given in her tutorial did not work with my stock Ubuntu 9.10 installation.\u00a0 The problem arises because the user Ubuntu creates on install is not part of the &#8220;users&#8221; group.<\/p>\n<h3>The fix:<\/h3>\n<p>Create a file called <strong>10-usbtinyisp.rules<\/strong> in directory <strong>\/etc\/udev\/rules.d<\/strong><\/p>\n<pre> SUBSYSTEM==\"usb\", SYSFS{idVendor}==\"1781\", SYSFS{idProduct}==\"0c9f\", GROUP=\"adm\", MODE=\"0666\"<\/pre>\n<p>Then execute:<\/p>\n<pre> sudo restart udev<\/pre>\n<p>That&#8217;s it.\u00a0 Unplug and replug in the USB cable to your USBTinyISP programmer.\u00a0 Now avrdude should be able to access the USBTinyISP without root privileges.<\/p>\n<p>If your account is part of another group, just change the GROUP= flag to that group instead.\u00a0 New users in Ubuntu are assigned to a group named after their username by default, so that is another option (ie. GROUP=&#8221;yourusername&#8221;).\u00a0 Interestingly, new users are not assigned to the &#8220;users&#8221; group, for reasons that escape me (and no doubt some of our more Linux-savvy readers can enlighten us about).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A quick tip for Ubuntu users: As installed by the avrdude package on Ubuntu, avrdude needs root priveledges to work properly with the Adafruit USBTinyISP AVR programmer.\u00a0 This gets annoying pretty fast because to program an AVR you need to run avrdude (or make) with sudo every time or log in as root (not recommended).\u00a0 &hellip; <a href=\"https:\/\/mightyohm.com\/blog\/2010\/03\/run-avrdude-without-root-privs-in-ubuntu\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Run avrdude on Ubuntu without root<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[10],"tags":[61,66,332],"class_list":["post-2910","post","type-post","status-publish","format-standard","hentry","category-microcontrollers","tag-avr","tag-linux","tag-ubuntu"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pioCd-KW","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":822,"url":"https:\/\/mightyohm.com\/blog\/2008\/12\/building-a-wifi-radio-part-7-building-an-lcd-display\/","url_meta":{"origin":2910,"position":0},"title":"Building a Wifi Radio &#8211; Part 7, Building an LCD Display","author":"Jeff","date":"December 18, 2008","format":false,"excerpt":"This is the seventh part of an ongoing series about building a low cost, open source streaming internet radio.\u00a0 If you haven\u2019t already, check out the previous parts (see the links at the end of this article) for some background about the project. In part six, we used OpenWrt's UNIX-style\u2026","rel":"","context":"In &quot;Electronics&quot;","block_context":{"text":"Electronics","link":"https:\/\/mightyohm.com\/blog\/category\/electronics\/"},"img":{"alt_text":"","src":"http:\/\/www.lduhtrp.net\/image-3238164-10440897","width":350,"height":200},"classes":[]},{"id":3333,"url":"https:\/\/mightyohm.com\/blog\/2010\/11\/atmel-avrisp-mkii-working-in-virtualbox\/","url_meta":{"origin":2910,"position":1},"title":"Atmel AVRISP mkII working in Virtualbox","author":"Jeff","date":"November 17, 2010","format":false,"excerpt":"In the past I have had problems getting the Atmel AVRISP mkII to work with Virtualbox. \u00a0This can be really irritating if, like me, you want to write code in Linux but are forced to run Windows for Skype and various closed-source development tools (ugh). Today, it seems to be\u2026","rel":"","context":"In &quot;Microcontrollers&quot;","block_context":{"text":"Microcontrollers","link":"https:\/\/mightyohm.com\/blog\/category\/microcontrollers\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3076,"url":"https:\/\/mightyohm.com\/blog\/2010\/09\/avrisp-mkii-libusb-drivers-for-windows-7-vista-x64\/","url_meta":{"origin":2910,"position":2},"title":"AVRISP mkII libusb drivers for Windows 7 \/ Vista x64","author":"Jeff","date":"September 16, 2010","format":false,"excerpt":"Continuing on the theme of my last post, here are libusb-win32 drivers for the Atmel AVRISP mkII. Unlike the Atmel-supplied drivers, these support avrdude, and as a bonus they will install on the 64-bit version of Windows 7 without digital signature errors. Yes! avrispmkii_libusb-win32_1.2.1.0.zip Note that if you want to\u2026","rel":"","context":"In &quot;Microcontrollers&quot;","block_context":{"text":"Microcontrollers","link":"https:\/\/mightyohm.com\/blog\/category\/microcontrollers\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3090,"url":"https:\/\/mightyohm.com\/blog\/2010\/09\/improved-firmware-for-usbtinyisp-fixes-usb-issues-in-virtualbox\/","url_meta":{"origin":2910,"position":3},"title":"Improved firmware for USBTinyISP fixes USB issues","author":"Jeff","date":"September 20, 2010","format":false,"excerpt":"I am a big fan of VirtualBox. \u00a0I have used it in various forms over the past couple years: to run Windows within Linux, Linux within Windows, Linux within OSX, Windows within OSX, etc. \u00a0It is fast, powerful, configurable, and best of all, free. However, there is one major disadvantage\u2026","rel":"","context":"In &quot;Microcontrollers&quot;","block_context":{"text":"Microcontrollers","link":"https:\/\/mightyohm.com\/blog\/category\/microcontrollers\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mightyohm.com\/blog\/wp-content\/uploads\/2010\/09\/virtualbox-500x394.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":3068,"url":"https:\/\/mightyohm.com\/blog\/2010\/09\/fixed-usbtinyisp-drivers-for-64-bit-windows-7\/","url_meta":{"origin":2910,"position":4},"title":"Fixed USBTinyISP drivers for 64-bit Windows 7 \/ Vista x64","author":"Jeff","date":"September 9, 2010","format":false,"excerpt":"For some time now, those wanting to use the Adafruit Industries USBTinyISP with the 64-bit versions of Windows 7 or Vista were faced with the following errors when attempting to install the device drivers supplied by Adafruit: For some reason, the 32-bit versions of these operating systems don't prevent the\u2026","rel":"","context":"In &quot;Microcontrollers&quot;","block_context":{"text":"Microcontrollers","link":"https:\/\/mightyohm.com\/blog\/category\/microcontrollers\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/mightyohm.com\/blog\/wp-content\/uploads\/2010\/09\/unsigned-driver-500x382.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":3045,"url":"https:\/\/mightyohm.com\/blog\/2010\/08\/fix-for-broken-avr-size-in-ubuntu-10-04-lucid\/","url_meta":{"origin":2910,"position":5},"title":"Fix for broken avr-size in Ubuntu 10.04 (Lucid Lynx)","author":"Jeff","date":"August 31, 2010","format":false,"excerpt":"If you have never used it before,\u00a0avr-size is a very useful command that\u00a0does a relatively simple thing - it tells you how large your compiled avr-gcc programs are. \u00a0This is very useful knowledge when you are trying to fit as much code as possible into a part with only a\u2026","rel":"","context":"In &quot;Microcontrollers&quot;","block_context":{"text":"Microcontrollers","link":"https:\/\/mightyohm.com\/blog\/category\/microcontrollers\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/posts\/2910","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/comments?post=2910"}],"version-history":[{"count":10,"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/posts\/2910\/revisions"}],"predecessor-version":[{"id":7836,"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/posts\/2910\/revisions\/7836"}],"wp:attachment":[{"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/media?parent=2910"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/categories?post=2910"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mightyohm.com\/blog\/wp-json\/wp\/v2\/tags?post=2910"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}