<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Jon,<br>
    <br>
    it used to work exactly like this.<br>
    <br>
    I have two methods from March 2015 to control a servo controller via
    RS232C. One is:<br>
    initSystem<br>
        (self serialPortName: '/dev/ttyAMA0') ifNil: [0 halt "can't init
    serial port"].<br>
        self getErrors<br>
    which calls:<br>
    serialPortName: aString<br>
        "return nil if opening failed"<br>
        ^serial openPort: aString<br>
    and in initialize I do:<br>
    initialize<br>
        "super uses two SerialPorts, so no super initialize here"<br>
        serial := SerialPort new.<br>
        serial baudRate: 115200.<br>
        serialCommand := serial.<br>
    <br>
    No access to my Pi's I just copied this from a backup of the Squeak
    4.5 image with the old VM which I have on my laptop. I haven't used
    this software since last October (youngest method stamp). So maybe
    one of the raspbian updates broke it or the new VM or image need
    different incantations. I didn't use sudo but missing access rights
    can also cause problems. <br>
    <br>
    Cheers,<br>
    <br>
    Herbert<br>
    <br>
    So maybe you try on 4.5 and the old VM. <br>
    <br>
    <div class="moz-cite-prefix">Am 18.01.2016 um 13:50 schrieb Jon
      Hylands:<br>
    </div>
    <blockquote
cite="mid:CA+=am+XtGkg+G7SN7k0kDnj0qXodEN-50newG+izM1qCYyfDgw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>
                <div>
                  <div>
                    <div>
                      <div>
                        <div>You don't need a device to test it - Serial
                          doesn't require a second device if all you're
                          doing is sending bytes.<br>
                          <br>
                        </div>
                        The issue I'm having is when I try and open the
                        port - that part is failing.<br>
                        <br>
                      </div>
                      Tim, not sure if you have Scratch set up to access
                      the underlying Squeak code, but if you do:<br>
                      <br>
                    </div>
                    <div>| serialPort |<br>
                    </div>
                    serialPort := SerialPort new.<br>
                  </div>
                  serialPort baudrate: 115200.<br>
                </div>
                serialPort openPort: '/dev/ttyAMA0'.<br>
              </div>
              serialPort inspect<br>
              <br>
            </div>
            the port instance variable in serialPort will be nil if it
            failed, and something else if it didn't fail.<br>
            <br>
          </div>
          Thanks,<br>
        </div>
        Jon<br>
        <br>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Sun, Jan 17, 2016 at 6:38 PM, tim
          Rowledge <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:tim@rowledge.org" target="_blank">tim@rowledge.org</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex"><span
              class=""><br>
              &gt; On 14-01-2016, at 5:51 AM, Jon Hylands &lt;<a
                moz-do-not-send="true" href="mailto:jon@huv.com"><a class="moz-txt-link-abbreviated" href="mailto:jon@huv.com">jon@huv.com</a></a>&gt;
              wrote:<br>
              &gt;<br>
              &gt;<br>
              &gt; Hi everyone,<br>
              &gt;<br>
              &gt; I'm trying to use the SerialPort class on my
              Raspberry pi 2, to access the UART on the pi.<br>
              &gt;<br>
              &gt; I've successfully accessed the port from python,
              using pyserial. On the pi, the port name is
              '/dev/ttyAMA0’.<br>
              <br>
            </span>The only thing I can offer is that Scratch finds a
            serial port as /dev/ttyAMA0 as well, implying that on at
            least one Pi it finds the same port that python does. I
            don’t think I have any devices that I could even try to
            connect to. Any suggestions for things that might be around
            the office?<br>
            <br>
            I do faintly recall some discussions about Pi serial stuff
            and having to use the rasp-config utility but that was a
            long time ago and I don’t seem to have any emails referring
            to it.<br>
            <br>
            <br>
            tim<br>
            --<br>
            tim Rowledge; <a moz-do-not-send="true"
              href="mailto:tim@rowledge.org">tim@rowledge.org</a>; <a
              moz-do-not-send="true" href="http://www.rowledge.org/tim"
              rel="noreferrer" target="_blank"><a class="moz-txt-link-freetext" href="http://www.rowledge.org/tim">http://www.rowledge.org/tim</a></a><br>
            Strange OpCodes: EOS: Erase Operating System<br>
            <br>
            <br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">
</pre>
    </blockquote>
    <br>
  </body>
</html>