<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    On 2/27/19 7:16 PM, John Vaughters via TriEmbed wrote:<br>
    <blockquote type="cite"
      cite="mid:726815240.6281177.1551313013978@mail.yahoo.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <!--[if gte mso 9]><xml><o:OfficeDocumentSettings><o:AllowPNG/><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![endif]-->
      <div class="ydpb1feb1dyahoo-style-wrap"
        style="font-family:Helvetica Neue, Helvetica, Arial,
        sans-serif;font-size:13px;">
        <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 </div>
      </div>
    </blockquote>
    Thanks. That's a nice how-to and will make it easy to differentiate
    between the TI XDS110 debug probes and Beaglebone boards that both
    manifest as /dev/ttyACMn and between instances of custom devices and
    the Arduino Nano's I'm using to run some motors that both manifest
    as /dev/ttyUSBn. But I need to go a step further. To assign a name
    like "NW-FOO" to the XDS110 in the NW corner of my "test range" I'd
    need to interpose in Udev somehow so it could do the thing to
    determine which is which. For the XDS110 there's a TI program that
    (if you repeat it enough times: flaky as heck) puts out strings
    including the ID string, but for the custom device I need to use
    expect to poke something into the port and get back the ID (and same
    for the Arduino motor controllers). <br>
    <br>
    So the question is whether there's a hook mechanism with Udev that
    would allow running a command as a side effect of the device's
    detection and name assignment under /dev. Especially if that could
    be run as root I could create the symbolic link and properly set its
    group id. Or maybe the invoked program/script could simply rename
    the device after it's probed it?<br>
    <br>
    I agree that USB has got further to go. I regret going with Ubuntu
    18.04 for my latest PC 'cause Code Composer Studio seems to be much
    less able to manage the debug probes than when it's running on
    16.04. Over on the TriLUG list there's been griping about 18.04
    having regressions and that matches my experience.<br>
    <br>
    -Pete<br>
    <blockquote type="cite"
      cite="mid:726815240.6281177.1551313013978@mail.yahoo.com">
      <div class="ydpb1feb1dyahoo-style-wrap"
        style="font-family:Helvetica Neue, Helvetica, Arial,
        sans-serif;font-size:13px;">
        <div>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" moz-do-not-send="true">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" moz-do-not-send="true">
            <table class="ydp4a2558ccard-wrapper
              ydp4a2558cyahoo-ignore-table" style="max-width:400px"
              cellspacing="0" cellpadding="0" border="0">
              <tbody>
                <tr>
                  <td width="400">
                    <table class="ydp4a2558ccard
                      ydp4a2558cyahoo-ignore-table"
style="max-width:400px;border-width:1px;border-style:solid;border-color:rgb(224,
                      228, 233);border-radius:2px" width="100%"
                      cellspacing="0" cellpadding="0" border="0">
                      <tbody>
                        <tr>
                          <td class="ydp4a2558ccard-primary-image-cell"
                            style="background-color: rgb(0, 0, 0);
                            background-size: cover; position: relative;
                            border-radius: 2px 2px 0px 0px; min-height:
                            175px;" valign="top" height="175"
                            bgcolor="#000000"
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"><!--[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
                              class="ydp4a2558ccard-overlay-container-table
                              ydp4a2558cyahoo-ignore-table"
                              style="width:100%" cellspacing="0"
                              cellpadding="0" border="0">
                              <tbody>
                                <tr>
                                  <td
                                    class="ydp4a2558ccard-overlay-cell"
                                    style="background-color:
                                    transparent; border-radius: 2px 2px
                                    0px 0px; min-height: 175px;"
                                    valign="top" bgcolor="transparent"
background="https://s.yimg.com/cv/ae/nq/storm/assets/enhancrV21/1/enhancr_gradient-400x175.png"><!--[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
                                      class="ydp4a2558cyahoo-ignore-table"
                                      style="width: 100%; min-height:
                                      175px;" height="175" border="0">
                                      <tbody>
                                        <tr>
                                          <td
                                            class="ydp4a2558ccard-richInfo2"
style="text-align:left;padding:15px 0 0 15px;vertical-align:top"><br>
                                          </td>
                                          <td
                                            class="ydp4a2558ccard-actions"
style="text-align:right;padding:15px 15px 0 0;vertical-align:top"><br>
                                          </td>
                                        </tr>
                                      </tbody>
                                    </table>
                                    <!--[if gte mso 9]></v:textbox></v:rect><![endif]--></td>
                                </tr>
                              </tbody>
                            </table>
                          </td>
                        </tr>
                        <tr>
                          <td>
                            <table class="ydp4a2558ccard-info
                              ydp4a2558cyahoo-ignore-table"
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)" cellspacing="0" cellpadding="0"
                              border="0" align="center">
                              <tbody>
                                <tr>
                                  <td
                                    style="background-color:#ffffff;padding:16px
                                    0 16px
                                    12px;vertical-align:top;border-radius:0
                                    0 0 2px"><br>
                                  </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>
                                  </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 <a class="moz-txt-link-rfc2396E" href="mailto:triembed@triembed.org"><triembed@triembed.org></a> 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"
                moz-do-not-send="true">TriEmbed@triembed.org</a><br>
            </div>
            <div dir="ltr">List info: <a
                href="http://mail.triembed.org/mailman/listinfo/triembed_triembed.org"
                target="_blank" moz-do-not-send="true">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"
                moz-do-not-send="true">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"
                moz-do-not-send="true">unsubscribe-TriEmbed@bitser.net</a>?subject=unsubscribe<br>
            </div>
            <div dir="ltr"><br>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Triangle, NC Embedded Computing mailing list

To post message: <a class="moz-txt-link-abbreviated" href="mailto:TriEmbed@triembed.org">TriEmbed@triembed.org</a>
List info: <a class="moz-txt-link-freetext" href="http://mail.triembed.org/mailman/listinfo/triembed_triembed.org">http://mail.triembed.org/mailman/listinfo/triembed_triembed.org</a>
TriEmbed web site: <a class="moz-txt-link-freetext" href="http://TriEmbed.org">http://TriEmbed.org</a>
To unsubscribe, click link and send a blank message: <a class="moz-txt-link-freetext" href="mailto:unsubscribe-TriEmbed@bitser.net?subject=unsubscribe">mailto:unsubscribe-TriEmbed@bitser.net?subject=unsubscribe</a>

</pre>
    </blockquote>
    <br>
  </body>
</html>