How to handle I/O error (Overrun), while reading from COM1

Posted by sphurti on 2010-07-21 20:59

I have encountered I/O error (Overrun), while reading continuous data from UART :COM1:
I have configured as:
"
set port_handler [open "COM1:" "RDWR"]
fconfigure $port_handler -mode 115200,n,8,1
fconfigure $port_handler -blocking 0 -buffering none

set port_data [gets $port_handler]
"
This happens after reading for a while...

I have tried :-buffersize 4096 -sysbuffer {4096 4096} , but didnt help!!!!!
Also tried to send data at slower rate 9600 from other side of the UART. but didnt help!

jeffh
ActiveState Staff
Mon, 2010-07-26 09:08

Please reread the docs for 'open' which clearly state how to improve handling of overrun conditions on Windows.
http://docs.activestate.com/activetcl/8.5/tcl/TclCmd/open.htm