<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><head><!--[if gte mso 9]><xml><o:OfficeDocumentSettings><o:AllowPNG/><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![endif]--></head><body><div class="ydpb1feb1dyahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div></div>
        <div><br></div><div>Pete,</div><div><br></div><div>If you are using the same USB devices all the time and do not expect changes, consider doing udev rules. Below is an article I wrote about it. Basically it recognizes your USB device based on certain ID's and you can name the device whatever you want. As far as communicating, "expect" scripts is as good as any tool I can think of. The only thing that is probably better is Tera-Term, but that is strictly windows. It is quite good though and I wrote a tool to run scripts to 300 edge routers using Tera-Term. One thing I used to do is use "socat" to send the serial device to a raw TCP port and communicate over the network. In general I do everything I can to not communicate to USB devices due to their constant connection issues. I prefer using UART if possible. </div><div><br></div><div>Good Luck,</div><div><br></div><div>John Vaughters</div><div><br></div><div><a href="http://combustory.com/wiki/index.php/Arduino_Communications_Device_Naming_with_udev" rel="nofollow" target="_blank" class="enhancr_card_1654028628">Arduino Communications Device Naming with udev - Combustory</a><br></div><div><br></div><div id="ydp4a2558cenhancr_card_1654028628" class="ydp4a2558cyahoo-link-enhancr-card ydp4a2558cymail-preserve-class ydp4a2558cymail-preserve-style" style="max-width:400px;font-family:Helvetica Neue, Segoe UI, Helvetica, Arial, sans-serif" data-url="http://combustory.com/wiki/index.php/Arduino_Communications_Device_Naming_with_udev" data-type="YENHANCER" data-size="MEDIUM" contenteditable="false"><a href="http://combustory.com/wiki/index.php/Arduino_Communications_Device_Naming_with_udev" style="text-decoration:none !important;color:#000 !important" class="ydp4a2558cyahoo-enhancr-cardlink" rel="nofollow" target="_blank"><table border="0" class="ydp4a2558ccard-wrapper ydp4a2558cyahoo-ignore-table" cellpadding="0" cellspacing="0" style="max-width:400px"><tbody><tr><td width="400"><table border="0" class="ydp4a2558ccard ydp4a2558cyahoo-ignore-table" cellpadding="0" cellspacing="0" width="100%" style="max-width:400px;border-width:1px;border-style:solid;border-color:rgb(224, 228, 233);border-radius:2px"><tbody><tr><td class="ydp4a2558ccard-primary-image-cell" background="https://s.yimg.com/lo/api/res/1.2/0JuqABn.q7h8Y4tT6WUzcA--~A/Zmk9ZmlsbDt3PTQwMDtoPTIwMDthcHBpZD1pZXh0cmFjdA--/http://combustory.com/wiki/skins/common/images/poweredby_mediawiki_88x31.png.cf.jpg" bgcolor="#000000" valign="top" height="175" style="background-color: rgb(0, 0, 0); background-size: cover; position: relative; border-radius: 2px 2px 0px 0px; min-height: 175px;"><!--[if gte mso 9]><v:rect fill="true" stroke="false" style="width:396px;height:175px;position:absolute;top:0;left:0;"><v:fill type="frame" color="#000000" src="https://s.yimg.com/lo/api/res/1.2/0JuqABn.q7h8Y4tT6WUzcA--~A/Zmk9ZmlsbDt3PTQwMDtoPTIwMDthcHBpZD1pZXh0cmFjdA--/http://combustory.com/wiki/skins/common/images/poweredby_mediawiki_88x31.png.cf.jpg"/></v:rect><![endif]--><table border="0" class="ydp4a2558ccard-overlay-container-table ydp4a2558cyahoo-ignore-table" cellpadding="0" cellspacing="0" style="width:100%"><tbody><tr><td class="ydp4a2558ccard-overlay-cell" background="https://s.yimg.com/cv/ae/nq/storm/assets/enhancrV21/1/enhancr_gradient-400x175.png" bgcolor="transparent" valign="top" style="background-color: transparent; border-radius: 2px 2px 0px 0px; min-height: 175px;"><!--[if gte mso 9]><v:rect fill="true" stroke="false" style="width:396px;height:175px;position:absolute;top:-18px;left:0;"><v:fill type="pattern" color="#000000" src="https://s.yimg.com/cv/ae/nq/storm/assets/enhancrV21/1/enhancr_gradient-400x175.png"/><v:textbox inset="0,0,20px,0"><![endif]--><table border="0" class="ydp4a2558cyahoo-ignore-table" height="175" style="width: 100%; min-height: 175px;"><tbody><tr><td class="ydp4a2558ccard-richInfo2" style="text-align:left;padding:15px 0 0 15px;vertical-align:top"></td><td class="ydp4a2558ccard-actions" style="text-align:right;padding:15px 15px 0 0;vertical-align:top"><div class="ydp4a2558ccard-share-container"></div></td></tr></tbody></table><!--[if gte mso 9]></v:textbox></v:rect><![endif]--></td></tr></tbody></table></td></tr><tr><td><table border="0" align="center" class="ydp4a2558ccard-info ydp4a2558cyahoo-ignore-table" cellpadding="0" cellspacing="0" style="background:#fff;position:relative;z-index:2;width:100%;max-width:400px;border-radius:0 0 2px 2px;border-top:1px solid rgb(224, 228, 233)"><tbody><tr><td style="background-color:#ffffff;padding:16px 0 16px 12px;vertical-align:top;border-radius:0 0 0 2px"></td><td style="vertical-align:middle;padding:12px 24px 16px 12px;width:99%;font-family:Helvetica Neue, Segoe UI, Helvetica, Arial, sans-serif;border-radius:0 0 2px 0"><h2 class="ydp4a2558ccard-title" style="font-size: 14px; line-height: 19px; margin: 0px 0px 6px; font-family: Helvetica Neue, Segoe UI, Helvetica, Arial, sans-serif; color: rgb(38, 40, 42);">Arduino Communications Device Naming with udev - Combustory</h2><p class="ydp4a2558ccard-description" style="font-size: 12px; line-height: 16px; margin: 0px; color: rgb(151, 155, 167);"></p></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></a></div><div><br></div><div><br></div>
        
        </div><div id="yahoo_quoted_1531166218" class="yahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                    On Wednesday, February 27, 2019, 4:41:50 PM EST, Pete Soper via TriEmbed <triembed@triembed.org> wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div dir="ltr">It's been many years since I used the Unix "expect" command but that was <br></div><div dir="ltr">the industrial strength solution for automated interaction with a serial <br></div><div dir="ltr">connection such as via ssh where you specify a "script" of "this is <br></div><div dir="ltr">sent, this is what's received back", interactions and the logic to take <br></div><div dir="ltr">actions based on the interaction details. What's out there now that I <br></div><div dir="ltr">should be using, or is this still the best way to go? My host <br></div><div dir="ltr">environment choices are Linux or Cygwin (inside a VM).<br></div><div dir="ltr"><br></div><div dir="ltr">My situation is that I have three or four flavors of device that I need <br></div><div dir="ltr">to connect to with either ssh or a terminal emulator where a script of <br></div><div dir="ltr">some sort dictates what I have to send and what I expect back. This, in <br></div><div dir="ltr">turn, is to deal with the musical chair situation with USB connections <br></div><div dir="ltr">such as when I get intermittent electrical service from Duke Energy (at <br></div><div dir="ltr">no extra cost!) I've got an automated test system where there are, for <br></div><div dir="ltr">example, /dev/ttyACM{0,1,2,3,4,5,6,7}, /dev/USB{0,1,2,3}, etc, and I <br></div><div dir="ltr">need to establish and keep fresh meaninfully named symlinks that get <br></div><div dir="ltr">associated with the right devices assigned randomly by system startups, <br></div><div dir="ltr">being forced to unconnect/reconnect cables, etc.<br></div><div dir="ltr"><br></div><div dir="ltr">.<br></div><div dir="ltr">Thanks,<br></div><div dir="ltr">Pete<br></div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr">_______________________________________________<br></div><div dir="ltr">Triangle, NC Embedded Computing mailing list<br></div><div dir="ltr"><br></div><div dir="ltr">To post message: <a ymailto="mailto:TriEmbed@triembed.org" href="mailto:TriEmbed@triembed.org">TriEmbed@triembed.org</a><br></div><div dir="ltr">List info: <a href="http://mail.triembed.org/mailman/listinfo/triembed_triembed.org" target="_blank">http://mail.triembed.org/mailman/listinfo/triembed_triembed.org</a><br></div><div dir="ltr">TriEmbed web site: <a href="http://TriEmbed.org" target="_blank">http://TriEmbed.org</a><br></div><div dir="ltr">To unsubscribe, click link and send a blank message: mailto:<a ymailto="mailto:unsubscribe-TriEmbed@bitser.net" href="mailto:unsubscribe-TriEmbed@bitser.net">unsubscribe-TriEmbed@bitser.net</a>?subject=unsubscribe<br></div><div dir="ltr"><br></div></div>
            </div>
        </div></body></html>