User Tools

Site Tools


arduino:arduino_on_linux

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
arduino:arduino_on_linux [2019/12/28 20:06] mithatarduino:arduino_on_linux [2019/12/29 05:37] (current) – [USBtiny/USBtinyISP permissions] mithat
Line 1: Line 1:
 ====== Arduino on Linux ====== ====== Arduino on Linux ======
  
-===== Serial port permissions =====+===== Managing permissions ===== 
  
-Depending on your distribution, you might need to add permission to your user so it can access ''/dev/ttyACM*'' or whatever. On my Debian system, the following worked (as root):+ 
 +==== Serial port permissions ==== 
 + 
 +Depending on your distribution, you may need to add permission to your user so it can access ''/dev/ttyACM*'' or whatever. On my Debian sid system, all I needed to do was add my user to the ''dialout'' group. The following did the trick (as root):
 <code> <code>
 # usermod -a -G dialout <username> # usermod -a -G dialout <username>
 </code> </code>
  
-===== USBtiny permissions =====+==== USBtiny/USBtinyISP permissions ====
  
-If you plan to use a USBtiny on Linux to program your Arduino, you are likely to encounter a different permission error. On my Debian sid system, I encountered a “Warning: cannot open USB device: Permission denied” error. Adding my user to the ''dialout'' group didn't fix this issue+If you plan to use a USBtiny or USBtinyISP to program your Arduino instead of the more conventional approaches, you are likely to encounter a different permission error. On my Debian sid system, I encountered a “Warning: cannot open USB device: Permission denied” error that adding my user to the ''dialout'' group didn't fix. 
  
-I was able to clear it by adding the suggestion at the end of this [[https://learn.adafruit.com/usbtinyisp/avrdude|Adafruit page]]. +I was able to clear it by adding the suggestion at the end of this [[https://learn.adafruit.com/usbtinyisp/avrdude|Adafruit page]]. Specifically, as root create a file ''/etc/udev/rules.d/99-USBtiny.rules'' with the following single line:
- +
-Specifically, as root create a file ''/etc/udev/rules.d/99-USBtiny.rules'' with the following single line:+
 <code> <code>
 SUBSYSTEM=="usb", ATTR{product}=="USBtiny", ATTR{idProduct}=="0c9f", ATTRS{idVendor}=="1781", MODE="0660", GROUP="dialout" SUBSYSTEM=="usb", ATTR{product}=="USBtiny", ATTR{idProduct}=="0c9f", ATTRS{idVendor}=="1781", MODE="0660", GROUP="dialout"
 </code> </code>
-The next time you log in, your USBtiny //should// work as expectedunless the ''product'', ''idProduct'', and/or ''idVendor'' aren't as expected. +The next time you log in, your programmer //should// work as expected --- unless the ''product'', ''idProduct'', and/or ''idVendor'' attributes aren't as expected. You can confirm their values by plugging in your USBtiny and running ''dmesg'' (as root):
- +
-You can confirm the ''ATTR{idProduct}'' and ''ATTRS{idVendor}'' values by plugging in your USBtiny and running dmesg (as root):+
 <code> <code>
 # dmesg # dmesg
Line 28: Line 27:
 </code> </code>
  
-USBtiny from a different vendor I tried identified itself as “USBtinyISP” rather than “USBtiny”, and so the udev rule above didn’t work. The solution was to add a new rule in a second line to ''/etc/udev/rules.d/99-USBtiny.rules'':+USBtinyISP from a different vendor I used identified itself as “USBtinyISP” rather than “USBtiny”, and so the udev rule above didn’t work. The solution was to add an additional rule in a second line to ''/etc/udev/rules.d/99-USBtiny.rules'':
 <code> <code>
 SUBSYSTEM=="usb", ATTR{product}=="USBtiny", ATTR{idProduct}=="0c9f", ATTRS{idVendor}=="1781", MODE="0660", GROUP="dialout" SUBSYSTEM=="usb", ATTR{product}=="USBtiny", ATTR{idProduct}=="0c9f", ATTRS{idVendor}=="1781", MODE="0660", GROUP="dialout"
Line 34: Line 33:
 </code> </code>
  
-Modify as needed for your USBtiny.+Modify as needed for your USBtiny or USBtinyISP.
arduino/arduino_on_linux.1577563570.txt.gz · Last modified: 2019/12/28 20:06 by mithat

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki