[racket] open-input-output-file, serial port, threads and Windows

From: Rüdiger Asche (rac at ruediger-asche.de)
Date: Tue Apr 10 15:49:38 EDT 2012


  Any suggestions for solving this problem are welcomed :)  


yeah, I tried and gave up. Support for serial ports is really poor. I have a network redirctor device which is a little box with an ethernet adapter on one side and a DSub9 on the other; you configure it to map a serial stream 1:1 onto a network connection, hook up your serial device to the box, open a network port to the box and run your communictation over it and it works like a charm. Try communicating directly and you'll never really get it to work.

I believe the problem is that the logic isn't quite sure when to return #eof, a timeout or or a valid character. Then, again, it really can't. I don't have any problems with the Racket developers deciding that serial ports are nothing to spend a lot of effort supporting. It's sort of an ancient technology - still heavily used but really hard to get right. 

On a write, you must flush the device whenever you're done writing and expect characters to come in.



  Finally, I would also like to report that when opening a serial port (only on windows) with a number greater than 9 
  so for example "COM12" a file is created instead of opening the serial port. 
  I guess this should be an easy fix ...


  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. 


open the port as "\\\\?\\COM13" and you'll be fine. That's a Windows restriction, has got nothing to do with Racket...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120410/72a88c7c/attachment.html>

Posted on the users mailing list.