How do I set baud/parity/stop in Racket for a serial port in Windows/Linux/Mac. Eg for "\\.\COM4"<div><br></div><div><div><font class="Apple-style-span" face="'courier new', monospace">(new button% [parent ButtonPanel] [label "Test USB"]</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> [callback </font></div><div><font class="Apple-style-span" face="'courier new', monospace"> (lambda (e b)</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> (let-values </font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> ([(in-com out-com)</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> (open-input-output-file </font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> "\\\\.\\COM4" #:mode 'binary #:exists 'append) ])</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> (displayln (list "open-input-output-file" in-com out-com))</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> (displayln (write-string " cold \\r " out-com))</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> ))])</font></div>
<div><div>The above seems to work. It blows up iff COM4 is absent. It prints</div><div><div><font class="Apple-style-span" face="'courier new', monospace">(open-input-output-file #<input-port:\\.\COM4> #<output-port:\\.\COM4>)</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace">9</font></div></div></div><div><font class="Apple-style-span" face="'courier new', monospace"><span class="Apple-style-span" style="font-family: arial; ">iff COM4 is present. But receiving device apparently gets nothing.</span></font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"><span class="Apple-style-span" style="font-family: arial; "><br></span></font></div><div><font class="Apple-style-span" face="'courier new', monospace"><span class="Apple-style-span" style="font-family: arial; ">Thanks,</span></font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"><span class="Apple-style-span" style="font-family: arial; ">Steve</span></font></div><div style="text-align:center"><span style="font-family:'times new roman', serif"><font color="#C0C0C0">--------------------------------</font></span></div>
<font face="'times new roman', serif"><div style="text-align:center">Steven Zins </div><div style="text-align:center">575-621-0950</div></font><div style="text-align:center"><a href="http://LEDybug.com" target="_blank"><font face="'times new roman', serif">LEDybug.com</font></a></div>
<font face="'times new roman', serif"><div style="text-align:center">Las Cruces, NM USA</div><div style="text-align:center"><font color="#C0C0C0">--------------------------------</font></div></font><br>
</div>