Skip to content
Tcl Source Code History Of Ticket ea53aa804d4ef48b
Login

History Of Ticket ea53aa804d4ef48b

Artifacts Associated With Ticket ea53aa804d4ef48b

  1. Ticket change [c3cdfd61de] (rid 146952) by ggros on 2016-06-16 08:56:37:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. 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!
      
    5. foundin initialized to: "8.5.19"
    6. is_private initialized to: "0"
    7. login: "ggros"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "a313ebdb87fc8fe7e01137df5f31ae2a66d49c6e"
    10. resolution initialized to: "None"
    11. severity initialized to: "Severe"
    12. status initialized to: "Open"
    13. submitter initialized to: "ggros"
    14. subsystem initialized to: "18. Commands M-Z"
    15. title initialized to: "[Serial port] Ignore BREAK condition on read"
    16. type initialized to: "Support"
  2. Ticket change [0b222e9b8f] (rid 146953) by ggros on 2016-06-16 10:13:14:

    1. login: "ggros"
    2. mimetype: "text/plain"
    3. subsystem changed to: "24. Channel Commands"
  3. Ticket change [d5813a1390] (rid 258071) by serhiy.storchaka on 2026-10-14 18:48:19:

    1. 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>
      
    2. login: "serhiy.storchaka"
    3. mimetype: "text/x-fossil-wiki"
    4. resolution changed to: "Invalid"
    5. status changed to: "Closed"
  4. Ticket change [34886bd23c] (rid 259921) by serhiy.storchaka on 2026-10-22 17:19:26:

    1. closedate changed to: "2461328.283556852"
    2. closer changed to: "serhiy.storchaka"
    3. login: "serhiy.storchaka"