I&#39;ve been experimenting with Racket v5.2 and a GW Instek 8212 meter connected to my PC via COM1 (running WinXP SP3).<div><br></div><div>The meter responds to simple commands (e.g., &quot;V00&quot;  terminated with a line feed is read voltage) and I&#39;ve written simple programs in Python, VB, and even QuickBasic  to query the device.</div>
<div><br></div><div>However, I&#39;ve had no success in getting the device to respond from inside the Racket REPL.</div><div><br></div><div>I&#39;ve pasted the code I&#39;m using below:</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div><div>#lang racket</div></div><div><div><br></div></div><div><div><div>(let*-values </div><div>    (((in out) (open-input-output-file &quot;COM1&quot;  #:mode &#39;binary)))</div></div></div></blockquote><blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div><div><div>  (displayln &quot;V00&quot; out)</div></div></div><div><div><div>  (printf &quot;~C~a~n&quot; #\tab (read-bytes 1 in))</div></div></div><div><div><div>  (close-input-port in)</div></div></div><div><div><div>
  (close-output-port out)) </div></div></div></blockquote><div><br></div><div><br></div><div>Running from the interpreter just gives me the output below:</div><blockquote style="margin:0 0 0 40px;border:none;padding:0px">
<div><div><span class="Apple-tab-span" style="white-space:pre">        </span></div>#&lt;eof&gt;</div><div><div>&gt; </div></div></blockquote><div><br></div><div>A tester in-line with the serial cable shows I am actually writing to the port (I see a square-wave signal), so I know that I am at least writing to the port. </div>
<br><div>Any hints or pointers would be appreciated.</div>