http://www.combustory.com/wiki/index.php?title=Arduino_Communications_Device_Naming_with_udev&feed=atom&action=history Arduino Communications Device Naming with udev - Revision history 2024-03-29T02:07:25Z Revision history for this page on the wiki MediaWiki 1.17.0 http://www.combustory.com/wiki/index.php?title=Arduino_Communications_Device_Naming_with_udev&diff=859&oldid=prev Jvaughters: /* udev */ 2019-03-04T18:08:31Z <p><span class="autocomment">udev</span></p> <table style="background-color: white; color:black;"> <col class='diff-marker' /> <col class='diff-content' /> <col class='diff-marker' /> <col class='diff-content' /> <tr valign='top'> <td colspan='2' style="background-color: white; color:black;">← Older revision</td> <td colspan='2' style="background-color: white; color:black;">Revision as of 18:08, 4 March 2019</td> </tr><tr><td colspan="2" class="diff-lineno">Line 32:</td> <td colspan="2" class="diff-lineno">Line 32:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>===udev===</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>===udev===</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div>It can be annoying to have to look up what {{ic|/dev/ttyUSB[0-9]}} the device gets assigned, so it's a good idea to add a simple udev rule that creates <del class="diffchange diffchange-inline">and renames </del>the device when it is plugged in.</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>It can be annoying to have to look up what {{ic|/dev/ttyUSB[0-9]}} the device gets assigned, so it's a good idea to add a simple udev rule that creates <ins class="diffchange diffchange-inline">a link to </ins>the device when it is plugged in<ins class="diffchange diffchange-inline">. It used to be possible to rename the device which would leave the ttyUSB[0-9] open for other devices. If you are using a linux kernel that is old enough you can rename the device. However, the linux community has determined the link is the proper method to track the device. Below I will show both methods</ins>.</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>First of all, you will need to find out the serial number of FTDI chip on the Arduino. This can be achieved by running the following, assuming your device is plugged in and was assigned to {{ic|/dev/ttyUSB0}}:</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>First of all, you will need to find out the serial number of FTDI chip on the Arduino. This can be achieved by running the following, assuming your device is plugged in and was assigned to {{ic|/dev/ttyUSB0}}:</div></td></tr> <tr><td colspan="2" class="diff-lineno">Line 40:</td> <td colspan="2" class="diff-lineno">Line 40:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>Now add/create the following file:</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>Now add/create the following file:</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">{{hc|</del>/etc/udev/rules.d/98-arduino.rules<del class="diffchange diffchange-inline">|2=</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">&#160; </ins>/etc/udev/rules.d/98-arduino.rules</div></td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div>&lt;nowiki&gt;</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>&#160;</div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">For the old kernels put this in your file:</ins></div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>&#160;</div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">&lt;pre&gt;</ins>&lt;nowiki&gt;</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>SUBSYSTEMS==&quot;usb&quot;, ATTRS{serial}==&quot;XXXXXXXX&quot;, ATTRS{product}==&quot;FT232R USB UART&quot;, ATTRS{idProduct}==&quot;6001&quot;, ATTRS{idVendor}==&quot;0403&quot;, NAME=&quot;arduino_1&quot;</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>SUBSYSTEMS==&quot;usb&quot;, ATTRS{serial}==&quot;XXXXXXXX&quot;, ATTRS{product}==&quot;FT232R USB UART&quot;, ATTRS{idProduct}==&quot;6001&quot;, ATTRS{idVendor}==&quot;0403&quot;, NAME=&quot;arduino_1&quot;</div></td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div>&lt;/nowiki&gt;}}</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>&lt;/nowiki&gt;<ins class="diffchange diffchange-inline">&lt;/pre&gt;</ins></div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>&#160;</div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">For the new kernels put this in your file:</ins></div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>&#160;</div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">&lt;pre&gt;&lt;nowiki&gt;</ins></div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">SUBSYSTEMS==&quot;usb&quot;, ATTRS{serial</ins>}<ins class="diffchange diffchange-inline">==&quot;XXXXXXXX&quot;, ATTRS{product</ins>}<ins class="diffchange diffchange-inline">==&quot;FT232R USB UART&quot;, ATTRS{idProduct}==&quot;6001&quot;, ATTRS{idVendor}==&quot;0403&quot;, SYMLINK+=&quot;arduino_1&quot;</ins></div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">&lt;/nowiki&gt;&lt;/pre&gt;</ins></div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>Change 'ATTRS{serial}==&quot;XXXXXXXX&quot;' to the serial on your device and force udev to load the new rule:</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>Change 'ATTRS{serial}==&quot;XXXXXXXX&quot;' to the serial on your device and force udev to load the new rule:</div></td></tr> <tr><td colspan="2" class="diff-lineno">Line 49:</td> <td colspan="2" class="diff-lineno">Line 58:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>&#160;&#160; udevadm control --reload-rules</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>&#160;&#160; udevadm control --reload-rules</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div>At this point, whenever you plug in the device, the device should be renamed to {{ic|/dev/arduino_1}}. You can rename more by adding more lines to the rules file and extract the serial number for each device and of course name it what ever you like. The same process can be used for other USB-to-Serial devices as well. &#160;</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>At this point, whenever you plug in the device, the device should be renamed to {{ic|/dev/arduino_1}} <ins class="diffchange diffchange-inline">or a link created</ins>. You can rename <ins class="diffchange diffchange-inline">or link </ins>more by adding more lines to the rules file and extract the serial number for each device and of course name it what ever you like. The same process can be used for other USB-to-Serial devices as well.</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>==Communication==</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>==Communication==</div></td></tr> </table> Jvaughters http://www.combustory.com/wiki/index.php?title=Arduino_Communications_Device_Naming_with_udev&diff=850&oldid=prev Jvaughters at 12:36, 13 March 2013 2013-03-13T12:36:57Z <p></p> <table style="background-color: white; color:black;"> <col class='diff-marker' /> <col class='diff-content' /> <col class='diff-marker' /> <col class='diff-content' /> <tr valign='top'> <td colspan='2' style="background-color: white; color:black;">← Older revision</td> <td colspan='2' style="background-color: white; color:black;">Revision as of 12:36, 13 March 2013</td> </tr><tr><td colspan="2" class="diff-lineno">Line 32:</td> <td colspan="2" class="diff-lineno">Line 32:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>===udev===</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>===udev===</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div>It can be annoying to have to look up what {{ic|/dev/ttyUSB[0-9]}} the device gets assigned, so it's a good idea to add a simple udev rule that creates <del class="diffchange diffchange-inline">the </del>renames the device when it is plugged in.</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>It can be annoying to have to look up what {{ic|/dev/ttyUSB[0-9]}} the device gets assigned, so it's a good idea to add a simple udev rule that creates <ins class="diffchange diffchange-inline">and </ins>renames the device when it is plugged in.</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div>First of all, you will need to find out the serial number of FTDI chip on the <del class="diffchange diffchange-inline">bus pirate</del>. This can be achieved by running the following, assuming your device is plugged in and was assigned to {{ic|/dev/ttyUSB0}}:</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>First of all, you will need to find out the serial number of FTDI chip on the <ins class="diffchange diffchange-inline">Arduino</ins>. This can be achieved by running the following, assuming your device is plugged in and was assigned to {{ic|/dev/ttyUSB0}}:</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>&#160;&#160; udevadm info --attribute-walk -n /dev/ttyUSB0</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>&#160;&#160; udevadm info --attribute-walk -n /dev/ttyUSB0</div></td></tr> </table> Jvaughters http://www.combustory.com/wiki/index.php?title=Arduino_Communications_Device_Naming_with_udev&diff=803&oldid=prev Jvaughters at 02:54, 21 October 2012 2012-10-21T02:54:06Z <p></p> <table style="background-color: white; color:black;"> <col class='diff-marker' /> <col class='diff-content' /> <col class='diff-marker' /> <col class='diff-content' /> <tr valign='top'> <td colspan='2' style="background-color: white; color:black;">← Older revision</td> <td colspan='2' style="background-color: white; color:black;">Revision as of 02:54, 21 October 2012</td> </tr><tr><td colspan="2" class="diff-lineno">Line 61:</td> <td colspan="2" class="diff-lineno">Line 61:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>* {{ic|picocom}}</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>* {{ic|picocom}}</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>&#160;&#160; picocom -b 115200 -p n -d 8 /dev/arduino_1</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>&#160;&#160; picocom -b 115200 -p n -d 8 /dev/arduino_1</div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">* {{ic|putty}} - gui utility</ins></div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"> putty -serial /dev/arduino_1 -sercfg 115200,8,n,1,X</ins></div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;">* {{ic|plink}} - cli utility</ins></div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins style="color: red; font-weight: bold; text-decoration: none;"> plink -serial /dev/arduino_1 -sercfg 115200,8,n,1,X</ins></div></td></tr> </table> Jvaughters http://www.combustory.com/wiki/index.php?title=Arduino_Communications_Device_Naming_with_udev&diff=801&oldid=prev Jvaughters at 02:29, 21 October 2012 2012-10-21T02:29:45Z <p></p> <table style="background-color: white; color:black;"> <col class='diff-marker' /> <col class='diff-content' /> <col class='diff-marker' /> <col class='diff-content' /> <tr valign='top'> <td colspan='2' style="background-color: white; color:black;">← Older revision</td> <td colspan='2' style="background-color: white; color:black;">Revision as of 02:29, 21 October 2012</td> </tr><tr><td colspan="2" class="diff-lineno">Line 49:</td> <td colspan="2" class="diff-lineno">Line 49:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>&#160;&#160; udevadm control --reload-rules</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>&#160;&#160; udevadm control --reload-rules</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div>At this point, whenever you plug in the device, the device should be renamed to {{ic|/dev/arduino_1}}</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>At this point, whenever you plug in the device, the device should be renamed to {{ic|/dev/arduino_1}}<ins class="diffchange diffchange-inline">. You can rename more by adding more lines to the rules file and extract the serial number for each device and of course name it what ever you like. The same process can be used for other USB-to-Serial devices as well. </ins></div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>==Communication==</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>==Communication==</div></td></tr> <tr><td colspan="2" class="diff-lineno">Line 56:</td> <td colspan="2" class="diff-lineno">Line 56:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>* {{ic|minicom}}</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>* {{ic|minicom}}</div></td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div>&#160;&#160; minicom -b 115200 -8 -D /dev/<del class="diffchange diffchange-inline">buspirate</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>&#160;&#160; minicom -b 115200 -8 -D /dev/<ins class="diffchange diffchange-inline">arduino_1</ins></div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>* {{ic|screen}}</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>* {{ic|screen}}</div></td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div>&#160;&#160; screen /dev/<del class="diffchange diffchange-inline">buspirate </del>115200 8N1</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>&#160;&#160; screen /dev/<ins class="diffchange diffchange-inline">arduino_1 </ins>115200 8N1</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>* {{ic|picocom}}</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>* {{ic|picocom}}</div></td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div>&#160;&#160; picocom -b 115200 -p n -d 8 /dev/<del class="diffchange diffchange-inline">buspirate</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>&#160;&#160; picocom -b 115200 -p n -d 8 /dev/<ins class="diffchange diffchange-inline">arduino_1</ins></div></td></tr> </table> Jvaughters http://www.combustory.com/wiki/index.php?title=Arduino_Communications_Device_Naming_with_udev&diff=800&oldid=prev Jvaughters at 02:22, 21 October 2012 2012-10-21T02:22:59Z <p></p> <table style="background-color: white; color:black;"> <col class='diff-marker' /> <col class='diff-content' /> <col class='diff-marker' /> <col class='diff-content' /> <tr valign='top'> <td colspan='2' style="background-color: white; color:black;">← Older revision</td> <td colspan='2' style="background-color: white; color:black;">Revision as of 02:22, 21 October 2012</td> </tr><tr><td colspan="2" class="diff-lineno">Line 1:</td> <td colspan="2" class="diff-lineno">Line 1:</td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">[[Category</del>:<del class="diffchange diffchange-inline">Hardware detection and troubleshooting]]</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">&lt;anyweb&gt;http</ins>:<ins class="diffchange diffchange-inline">//combustory.com/wiki/ads/ad_rtc_1.html&lt;/anyweb&gt;</ins></div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>&#160;</div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">{{default}}</ins></div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>&#160;</div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">__NOTOC__</ins></div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">&lt;anyweb&gt;http://combustory.com/wiki/ads/ad_rtc_1.html&lt;/anyweb&gt;</ins></div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>{{Article summary start}}</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>{{Article summary start}}</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>{{Article summary text|This article covers the configuration of udev for Arduino Communication.}}</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>{{Article summary text|This article covers the configuration of udev for Arduino Communication.}}</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>{{Article summary end}}</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>{{Article summary end}}</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div>If you use more than one Arduino with USB or have other USB to Serial devices, then you may find it convenient to make the device have the same name every time you reboot or connect the Arduino. The technique here is shown for an FTDI device, but the same process can be used for just about any USB to <del class="diffchange diffchange-inline">serial </del>device that the system recognizes.</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">==Summary==</ins></div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>If you use more than one Arduino with USB or have other USB<ins class="diffchange diffchange-inline">-</ins>to<ins class="diffchange diffchange-inline">-</ins>Serial devices, then you may find it convenient to make the device have the same name every time you reboot or connect the Arduino. The technique here is shown for an FTDI device, but the same process can be used for just about any USB<ins class="diffchange diffchange-inline">-</ins>to<ins class="diffchange diffchange-inline">-Serial </ins>device that the system recognizes.</div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>&#160;</div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">==Assumptions==</ins></div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">* You are familiar with the Linux command line</ins></div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">* You understand basic text file configuration methods</ins></div></td></tr> <tr><td colspan="2">&#160;</td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">* You are familiar with serial communications in Linux</ins></div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>==Installation==</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>==Installation==</div></td></tr> </table> Jvaughters http://www.combustory.com/wiki/index.php?title=Arduino_Communications_Device_Naming_with_udev&diff=799&oldid=prev Jvaughters at 02:15, 21 October 2012 2012-10-21T02:15:11Z <p></p> <table style="background-color: white; color:black;"> <col class='diff-marker' /> <col class='diff-content' /> <col class='diff-marker' /> <col class='diff-content' /> <tr valign='top'> <td colspan='2' style="background-color: white; color:black;">← Older revision</td> <td colspan='2' style="background-color: white; color:black;">Revision as of 02:15, 21 October 2012</td> </tr><tr><td colspan="2" class="diff-lineno">Line 38:</td> <td colspan="2" class="diff-lineno">Line 38:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>&#160;&#160; udevadm control --reload-rules</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>&#160;&#160; udevadm control --reload-rules</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div>At this point, whenever you plug in the device, the device should be renamed to {{ic|/dev/<del class="diffchange diffchange-inline">ttyUSB0</del>}}</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>At this point, whenever you plug in the device, the device should be renamed to {{ic|/dev/<ins class="diffchange diffchange-inline">arduino_1</ins>}}</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>==Communication==</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>==Communication==</div></td></tr> </table> Jvaughters http://www.combustory.com/wiki/index.php?title=Arduino_Communications_Device_Naming_with_udev&diff=798&oldid=prev Jvaughters at 02:11, 21 October 2012 2012-10-21T02:11:17Z <p></p> <table style="background-color: white; color:black;"> <col class='diff-marker' /> <col class='diff-content' /> <col class='diff-marker' /> <col class='diff-content' /> <tr valign='top'> <td colspan='2' style="background-color: white; color:black;">← Older revision</td> <td colspan='2' style="background-color: white; color:black;">Revision as of 02:11, 21 October 2012</td> </tr><tr><td colspan="2" class="diff-lineno">Line 1:</td> <td colspan="2" class="diff-lineno">Line 1:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>[[Category:Hardware detection and troubleshooting]]</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>[[Category:Hardware detection and troubleshooting]]</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>{{Article summary start}}</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>{{Article summary start}}</div></td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div>{{Article summary text|This article covers the <del class="diffchange diffchange-inline">installation and basic usage </del>of <del class="diffchange diffchange-inline">the [http://code.google.com/p/the-bus-pirate/ Bus Pirate]</del>.}}</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>{{Article summary text|This article covers the <ins class="diffchange diffchange-inline">configuration </ins>of <ins class="diffchange diffchange-inline">udev for Arduino Communication</ins>.}}</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>{{Article summary end}}</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>{{Article summary end}}</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">The [http://code.google.com/p/the-bus-pirate/ Bus Pirate] is a versatile tool for communicating </del>with <del class="diffchange diffchange-inline">various hardware.</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">If you use more than one Arduino </ins>with <ins class="diffchange diffchange-inline">USB </ins>or <ins class="diffchange diffchange-inline">have other USB </ins>to <ins class="diffchange diffchange-inline">Serial devices, then you may find </ins>it <ins class="diffchange diffchange-inline">convenient to make the device have </ins>the <ins class="diffchange diffchange-inline">same name every time you reboot or connect the Arduino</ins>. The <ins class="diffchange diffchange-inline">technique here </ins>is <ins class="diffchange diffchange-inline">shown for an FTDI device</ins>, <ins class="diffchange diffchange-inline">but the same process </ins>can be <ins class="diffchange diffchange-inline">used </ins>for <ins class="diffchange diffchange-inline">just about any USB to serial device that </ins>the <ins class="diffchange diffchange-inline">system recognizes</ins>.</div></td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div>&#160;</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">Interfacing a new microchip can be a hassle. Breadboarding a circuit, writing code, hauling out the programmer, </del>or <del class="diffchange diffchange-inline">maybe even prototyping a PCB. We never seem </del>to <del class="diffchange diffchange-inline">get </del>it <del class="diffchange diffchange-inline">right on </del>the <del class="diffchange diffchange-inline">first try</del>.</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div>&#160;</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div>The <del class="diffchange diffchange-inline">‘Bus Pirate’ </del>is <del class="diffchange diffchange-inline">a universal bus interface that talks to most chips from a PC serial terminal</del>, <del class="diffchange diffchange-inline">eliminating a ton of early prototyping effort when working with new or unknown chips. Many serial protocols are supported at 0-5.5volts, more </del>can be <del class="diffchange diffchange-inline">added. See more at the google code site </del>for the <del class="diffchange diffchange-inline">[http://code.google.com/p/the-bus-pirate/ Bus Pirate]</del>.</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div></div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>==Installation==</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>==Installation==</div></td></tr> </table> Jvaughters http://www.combustory.com/wiki/index.php?title=Arduino_Communications_Device_Naming_with_udev&diff=797&oldid=prev Jvaughters at 01:59, 21 October 2012 2012-10-21T01:59:59Z <p></p> <table style="background-color: white; color:black;"> <col class='diff-marker' /> <col class='diff-content' /> <col class='diff-marker' /> <col class='diff-content' /> <tr valign='top'> <td colspan='2' style="background-color: white; color:black;">← Older revision</td> <td colspan='2' style="background-color: white; color:black;">Revision as of 01:59, 21 October 2012</td> </tr><tr><td colspan="2" class="diff-lineno">Line 12:</td> <td colspan="2" class="diff-lineno">Line 12:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>==Installation==</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>==Installation==</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div>{{Note|All scripts will assume that there is a '{{ic|/dev/<del class="diffchange diffchange-inline">buspirate</del>}}'.}}</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>{{Note|All scripts will assume that there is a '{{ic|/dev/<ins class="diffchange diffchange-inline">arduino_1</ins>}}'.}}</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>The drivers for the FTDI chip is included in the kernel, so it should be detected as soon as it's plugged in, and assigned to device {{ic|/dev/ttyUSB[0-9]}}.</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>The drivers for the FTDI chip is included in the kernel, so it should be detected as soon as it's plugged in, and assigned to device {{ic|/dev/ttyUSB[0-9]}}.</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>To check where it got assigned, run:</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>To check where it got assigned, run:</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div>&#160;&#160; dmesg | <del class="diffchange diffchange-inline">tail</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>&#160;&#160; dmesg | <ins class="diffchange diffchange-inline">grep FTDI</ins></div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>The output will contain a line that looks something like this:</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>The output will contain a line that looks something like this:</div></td></tr> <tr><td colspan="2" class="diff-lineno">Line 25:</td> <td colspan="2" class="diff-lineno">Line 25:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>===udev===</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>===udev===</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div>It can be annoying to have to look up what {{ic|/dev/ttyUSB[0-9]}} the device gets assigned, so it's a good idea to add a simple udev rule that creates the <del class="diffchange diffchange-inline">symlink '{{ic|/dev/buspirate}} -&gt; {{ic|/dev/ttyUSB*}}' </del>when it is plugged in.</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>It can be annoying to have to look up what {{ic|/dev/ttyUSB[0-9]}} the device gets assigned, so it's a good idea to add a simple udev rule that creates the <ins class="diffchange diffchange-inline">renames the device </ins>when it is plugged in.</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>First of all, you will need to find out the serial number of FTDI chip on the bus pirate. This can be achieved by running the following, assuming your device is plugged in and was assigned to {{ic|/dev/ttyUSB0}}:</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>First of all, you will need to find out the serial number of FTDI chip on the bus pirate. This can be achieved by running the following, assuming your device is plugged in and was assigned to {{ic|/dev/ttyUSB0}}:</div></td></tr> <tr><td colspan="2" class="diff-lineno">Line 33:</td> <td colspan="2" class="diff-lineno">Line 33:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>Now add/create the following file:</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>Now add/create the following file:</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div>{{hc|/etc/udev/rules.d/98-<del class="diffchange diffchange-inline">buspirate</del>.rules|2=</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>{{hc|/etc/udev/rules.d/98-<ins class="diffchange diffchange-inline">arduino</ins>.rules|2=</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>&lt;nowiki&gt;</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>&lt;nowiki&gt;</div></td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div>SUBSYSTEMS==&quot;usb&quot;, ATTRS{serial}==&quot;<del class="diffchange diffchange-inline">A700618T</del>&quot;, ATTRS{product}==&quot;FT232R USB UART&quot;, ATTRS{idProduct}==&quot;6001&quot;, ATTRS{idVendor}==&quot;0403&quot;, NAME=&quot;arduino_1&quot;</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>SUBSYSTEMS==&quot;usb&quot;, ATTRS{serial}==&quot;<ins class="diffchange diffchange-inline">XXXXXXXX</ins>&quot;, ATTRS{product}==&quot;FT232R USB UART&quot;, ATTRS{idProduct}==&quot;6001&quot;, ATTRS{idVendor}==&quot;0403&quot;, NAME=&quot;arduino_1&quot;</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>&lt;/nowiki&gt;}}</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>&lt;/nowiki&gt;}}</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td colspan="2" class="diff-lineno">Line 42:</td> <td colspan="2" class="diff-lineno">Line 42:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>&#160;&#160; udevadm control --reload-rules</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>&#160;&#160; udevadm control --reload-rules</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div>At this point, whenever you plug in the device, the <del class="diffchange diffchange-inline">symlink </del>should be <del class="diffchange diffchange-inline">created.</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div>At this point, whenever you plug in the device, the <ins class="diffchange diffchange-inline">device </ins>should be <ins class="diffchange diffchange-inline">renamed to {{ic|/dev/ttyUSB0}}</ins></div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>==Communication==</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>==Communication==</div></td></tr> <tr><td colspan="2" class="diff-lineno">Line 54:</td> <td colspan="2" class="diff-lineno">Line 54:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>* {{ic|picocom}}</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>* {{ic|picocom}}</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>&#160;&#160; picocom -b 115200 -p n -d 8 /dev/buspirate</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>&#160;&#160; picocom -b 115200 -p n -d 8 /dev/buspirate</div></td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;"></del></div></td><td colspan="2">&#160;</td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del style="color: red; font-weight: bold; text-decoration: none;">Type '?' and press enter and the device should reply with a list of possible commands.</del></div></td><td colspan="2">&#160;</td></tr> </table> Jvaughters http://www.combustory.com/wiki/index.php?title=Arduino_Communications_Device_Naming_with_udev&diff=796&oldid=prev Jvaughters at 01:44, 21 October 2012 2012-10-21T01:44:35Z <p></p> <table style="background-color: white; color:black;"> <col class='diff-marker' /> <col class='diff-content' /> <col class='diff-marker' /> <col class='diff-content' /> <tr valign='top'> <td colspan='2' style="background-color: white; color:black;">← Older revision</td> <td colspan='2' style="background-color: white; color:black;">Revision as of 01:44, 21 October 2012</td> </tr><tr><td colspan="2" class="diff-lineno">Line 17:</td> <td colspan="2" class="diff-lineno">Line 17:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>To check where it got assigned, run:</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>To check where it got assigned, run:</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"> # </del>dmesg | tail</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">&#160; </ins>dmesg | tail</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>The output will contain a line that looks something like this:</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>The output will contain a line that looks something like this:</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"> # </del>usb 1-4.4: FTDI USB Serial Device converter now attached to ttyUSB0</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">&#160; </ins>usb 1-4.4: FTDI USB Serial Device converter now attached to ttyUSB0</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>===udev===</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>===udev===</div></td></tr> <tr><td colspan="2" class="diff-lineno">Line 29:</td> <td colspan="2" class="diff-lineno">Line 29:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>First of all, you will need to find out the serial number of FTDI chip on the bus pirate. This can be achieved by running the following, assuming your device is plugged in and was assigned to {{ic|/dev/ttyUSB0}}:</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>First of all, you will need to find out the serial number of FTDI chip on the bus pirate. This can be achieved by running the following, assuming your device is plugged in and was assigned to {{ic|/dev/ttyUSB0}}:</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"> # </del>udevadm info --attribute-walk -n /dev/ttyUSB0 <del class="diffchange diffchange-inline"> | sed -n '/FTDI/,/serial/p'</del></div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">&#160; </ins>udevadm info --attribute-walk -n /dev/ttyUSB0</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>Now add/create the following file:</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>Now add/create the following file:</div></td></tr> <tr><td colspan="2" class="diff-lineno">Line 35:</td> <td colspan="2" class="diff-lineno">Line 35:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>{{hc|/etc/udev/rules.d/98-buspirate.rules|2=</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>{{hc|/etc/udev/rules.d/98-buspirate.rules|2=</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>&lt;nowiki&gt;</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>&lt;nowiki&gt;</div></td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline">SUBSYSTEM</del>==&quot;<del class="diffchange diffchange-inline">tty</del>&quot;, ATTRS{serial}==&quot;<del class="diffchange diffchange-inline">XXXXXXXX</del>&quot;, <del class="diffchange diffchange-inline">GROUP</del>=&quot;<del class="diffchange diffchange-inline">users</del>&quot;, <del class="diffchange diffchange-inline">MODE</del>=&quot;<del class="diffchange diffchange-inline">0660</del>&quot;, <del class="diffchange diffchange-inline">SYMLINK+</del>=&quot;<del class="diffchange diffchange-inline">buspirate</del>&quot;</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">SUBSYSTEMS</ins>==&quot;<ins class="diffchange diffchange-inline">usb</ins>&quot;, ATTRS{serial}==&quot;<ins class="diffchange diffchange-inline">A700618T</ins>&quot;, <ins class="diffchange diffchange-inline">ATTRS{product}=</ins>=&quot;<ins class="diffchange diffchange-inline">FT232R USB UART</ins>&quot;, <ins class="diffchange diffchange-inline">ATTRS{idProduct}==&quot;6001&quot;, ATTRS{idVendor}=</ins>=&quot;<ins class="diffchange diffchange-inline">0403</ins>&quot;, <ins class="diffchange diffchange-inline">NAME</ins>=&quot;<ins class="diffchange diffchange-inline">arduino_1</ins>&quot;</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>&lt;/nowiki&gt;}}</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>&lt;/nowiki&gt;}}</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>Change 'ATTRS{serial}==&quot;XXXXXXXX&quot;' to the serial on your device and force udev to load the new rule:</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>Change 'ATTRS{serial}==&quot;XXXXXXXX&quot;' to the serial on your device and force udev to load the new rule:</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"> # </del>udevadm control --reload-rules</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">&#160; </ins>udevadm control --reload-rules</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>At this point, whenever you plug in the device, the symlink should be created.</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>At this point, whenever you plug in the device, the symlink should be created.</div></td></tr> <tr><td colspan="2" class="diff-lineno">Line 49:</td> <td colspan="2" class="diff-lineno">Line 49:</td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>* {{ic|minicom}}</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>* {{ic|minicom}}</div></td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"> # </del>minicom -b 115200 -8 -D /dev/buspirate</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">&#160; </ins>minicom -b 115200 -8 -D /dev/buspirate</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>* {{ic|screen}}</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>* {{ic|screen}}</div></td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"> # </del>screen /dev/buspirate 115200 8N1</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">&#160; </ins>screen /dev/buspirate 115200 8N1</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>* {{ic|picocom}}</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>* {{ic|picocom}}</div></td></tr> <tr><td class='diff-marker'>&minus;</td><td style="background: #ffa; color:black; font-size: smaller;"><div><del class="diffchange diffchange-inline"> # </del>picocom -b 115200 -p n -d 8 /dev/buspirate</div></td><td class='diff-marker'>+</td><td style="background: #cfc; color:black; font-size: smaller;"><div><ins class="diffchange diffchange-inline">&#160; </ins>picocom -b 115200 -p n -d 8 /dev/buspirate</div></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"></td></tr> <tr><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>Type '?' and press enter and the device should reply with a list of possible commands.</div></td><td class='diff-marker'>&#160;</td><td style="background: #eee; color:black; font-size: smaller;"><div>Type '?' and press enter and the device should reply with a list of possible commands.</div></td></tr> </table> Jvaughters http://www.combustory.com/wiki/index.php?title=Arduino_Communications_Device_Naming_with_udev&diff=779&oldid=prev Jvaughters: Created page with "Category:Hardware detection and troubleshooting {{Article summary start}} {{Article summary text|This article covers the installation and basic usage of the [http://code.goog..." 2012-10-21T01:08:25Z <p>Created page with &quot;<a href="/wiki/index.php?title=Category:Hardware_detection_and_troubleshooting&amp;action=edit&amp;redlink=1" class="new" title="Category:Hardware detection and troubleshooting (page does not exist)">Category:Hardware detection and troubleshooting</a> {{Article summary start}} {{Article summary text|This article covers the installation and basic usage of the [http://code.goog...&quot;</p> <p><b>New page</b></p><div>[[Category:Hardware detection and troubleshooting]]<br /> {{Article summary start}}<br /> {{Article summary text|This article covers the installation and basic usage of the [http://code.google.com/p/the-bus-pirate/ Bus Pirate].}}<br /> {{Article summary end}}<br /> <br /> The [http://code.google.com/p/the-bus-pirate/ Bus Pirate] is a versatile tool for communicating with various hardware.<br /> <br /> Interfacing a new microchip can be a hassle. Breadboarding a circuit, writing code, hauling out the programmer, or maybe even prototyping a PCB. We never seem to get it right on the first try.<br /> <br /> The ‘Bus Pirate’ is a universal bus interface that talks to most chips from a PC serial terminal, eliminating a ton of early prototyping effort when working with new or unknown chips. Many serial protocols are supported at 0-5.5volts, more can be added. See more at the google code site for the [http://code.google.com/p/the-bus-pirate/ Bus Pirate].<br /> <br /> ==Installation==<br /> <br /> {{Note|All scripts will assume that there is a '{{ic|/dev/buspirate}}'.}}<br /> <br /> The drivers for the FTDI chip is included in the kernel, so it should be detected as soon as it's plugged in, and assigned to device {{ic|/dev/ttyUSB[0-9]}}.<br /> To check where it got assigned, run:<br /> <br /> # dmesg | tail<br /> <br /> The output will contain a line that looks something like this:<br /> <br /> # usb 1-4.4: FTDI USB Serial Device converter now attached to ttyUSB0<br /> <br /> ===udev===<br /> <br /> It can be annoying to have to look up what {{ic|/dev/ttyUSB[0-9]}} the device gets assigned, so it's a good idea to add a simple udev rule that creates the symlink '{{ic|/dev/buspirate}} -&gt; {{ic|/dev/ttyUSB*}}' when it is plugged in.<br /> <br /> First of all, you will need to find out the serial number of FTDI chip on the bus pirate. This can be achieved by running the following, assuming your device is plugged in and was assigned to {{ic|/dev/ttyUSB0}}:<br /> <br /> # udevadm info --attribute-walk -n /dev/ttyUSB0 | sed -n '/FTDI/,/serial/p'<br /> <br /> Now add/create the following file:<br /> <br /> {{hc|/etc/udev/rules.d/98-buspirate.rules|2=<br /> &lt;nowiki&gt;<br /> SUBSYSTEM==&quot;tty&quot;, ATTRS{serial}==&quot;XXXXXXXX&quot;, GROUP=&quot;users&quot;, MODE=&quot;0660&quot;, SYMLINK+=&quot;buspirate&quot;<br /> &lt;/nowiki&gt;}}<br /> <br /> Change 'ATTRS{serial}==&quot;XXXXXXXX&quot;' to the serial on your device and force udev to load the new rule:<br /> <br /> # udevadm control --reload-rules<br /> <br /> At this point, whenever you plug in the device, the symlink should be created.<br /> <br /> ==Communication==<br /> <br /> To communicate with the device, you can use any of the following, to name a few:<br /> <br /> * {{ic|minicom}}<br /> # minicom -b 115200 -8 -D /dev/buspirate<br /> * {{ic|screen}}<br /> # screen /dev/buspirate 115200 8N1<br /> * {{ic|picocom}}<br /> # picocom -b 115200 -p n -d 8 /dev/buspirate<br /> <br /> Type '?' and press enter and the device should reply with a list of possible commands.</div> Jvaughters