Artifacts Associated With Ticket ea53aa804d4ef48b
Ticket change [c3cdfd61de] (rid 146952) by ggros on 2016-06-16 08:56:37:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Is it possible to ignore "BREAK" condition when reading a serial port channel ? I'm using a RS-485 line and disabling my HALF-CTRL pin causes a BREAK condition but I would like to be able to read my buffer channel anyway. Below, a capture of a Tkcon console of what I'm talking about ******************************************** ******************************************** (xxxxxx) 197 % fconfigure $rh -queue 30 0 (xxxxxx) 197 % fconfigure $rh -queue 33 0 (xxxxxx) 197 % fconfigure $rh -lasterror (xxxxxx) 198 % read $rh error reading "file3de1490": I/O error (xxxxxx) 199 % fconfigure $rh -lasterror BREAK ********************************************* ********************************************* Thanks for your support!
- foundin initialized to: "8.5.19"
- is_private initialized to: "0"
- login: "ggros"
- priority initialized to: "5 Medium"
- private_contact initialized to: "a313ebdb87fc8fe7e01137df5f31ae2a66d49c6e"
- resolution initialized to: "None"
- severity initialized to: "Severe"
- status initialized to: "Open"
- submitter initialized to: "ggros"
- subsystem initialized to: "18. Commands M-Z"
- title initialized to: "[Serial port] Ignore BREAK condition on read"
- type initialized to: "Support"
Ticket change [0b222e9b8f] (rid 146953) by ggros on 2016-06-16 10:13:14:
- login: "ggros"
- mimetype: "text/plain"
- subsystem changed to: "24. Channel Commands"
Ticket change [d5813a1390] (rid 258071) by serhiy.storchaka on 2026-10-14 18:48:19:
- icomment:
On Windows a serial error such as BREAK is reported by one <nowiki>[read]</nowiki> as an I/O error, with the details in <code>fconfigure $chan -lasterror</code>, and then cleared; the data in the queue is not discarded. So you can catch the error and read again: <verbatim> if {[catch {read $rh} data] && "BREAK" in [fconfigure $rh -lasterror]} { set data [read $rh] } </verbatim> - login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Invalid"
- status changed to: "Closed"
- icomment:
Ticket change [34886bd23c] (rid 259921) by serhiy.storchaka on 2026-10-22 17:19:26:
- closedate changed to: "2461328.283556852"
- closer changed to: "serhiy.storchaka"
- login: "serhiy.storchaka"