<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="font-family: serif; "><span class="Apple-style-span" style="font-family: Helvetica; ">Hello everyone,</span></span><div><br></div><div>I am struggling with the behavior of open-input-output-file on Windows for communicating with the serial port.</div><div>It seems to me that write operations on the output-port are blocked when issuing a read operation on the input-port (in a different thread).</div><div>Only when something is read on the input-port the write operation is performed.</div><div><div>On OSX and Linux this problem does not manifest itself as write operations are not blocked by read operations in a different thread.</div></div><div><br></div><div>In my particular application I worked around this problem by adjusting the software on the external device which is connected to the serial port. </div><div>This device is currently adjusted to send dummy data in order to make sure that there is always something to read (from the computer's point of view).</div><div>By doing this the write operations from the computer to the external device are no longer blocked and seemingly instantaneous.</div><div>As you can imagine, sending this dummy data is just a hack and I would like to find a more structured way to solve this problem.</div><div><br></div><div><div>Any suggestions for solving this problem are welcomed :) </div></div><div><br></div><div><div>Finally, I would also like to report that when opening a serial port (only on windows) with a number greater than 9 </div><div>so for example "COM12" a file is created instead of opening the serial port. </div></div><div>I guess this should be an easy fix ...</div><div><br></div><div>If anybody would have experienced that problem you can currently work around that problem by assigning a different (lower than 9 of course) number to the serial port via the device manager. </div><div><br></div><div><br></div><div>Thanks,</div><div>Christophe</div><div><br></div><div>When searching for a solution I saw that other people had problems with setting the baud-rate of the serial port.</div><div>With my setup the following commands configure the serial port (where port-name is for example "COM1"): </div><div><br></div><div>//Windows</div><div>(system (string-append "mode " port-name ": baud=57600 parity=N data=8 stop=1")) </div><div><br></div><div>//Mac OSX</div><div>(system (string-append "stty -f " port-name " 57600 cs8 cread clocal"))</div><div><br></div><div>//Linux </div><div>(system (string-append "stty -F " port-name " 57600 -parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts -ignbrk -brkint ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -iutf8 -opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 -isig -icanon -iexten -echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke"))</div></body></html>