Menu

#43 CR+LF if idle for x milliseconds

V3.0.0.32
awaiting-testing
nobody
None
5
2019-04-02
2016-09-02
No

This would provide some (rough) packet delineation on the basis of inter-byte time delay. If the RX line is idle for x milliseconds, then do an automatic CR+LF in the display.

Discussion

  • Simon Bridger

    Simon Bridger - 2016-09-02

    if X was quite a big number it might work. I suspect that modern serial ports (usb) with big buffers & traffic reduction algorithms, usb framing, driver blocks etc etc etc, the data doesn't arrive at RT with timing aven vaguely resembling what it is on the wire.

    What sort of data do you think this is useful for?
    How does the receiving system normally frame it?

     
  • Simon Bridger

    Simon Bridger - 2017-03-07

    Any reply to question above?

    What delay is useful for this feature?
    (i.e. 1ms is going to be unworkable, 1sec workable, 100ms maybe)

     
    • Craig McQueen

      Craig McQueen - 2017-03-08

      For the last project I was working on: 100ms would be great, 200ms pretty good. 1s would still be helpful, though not as good as 200ms.

      It wouldn't have to be perfect. 90% would be good enough for a rough first inspection of packets coming from an RF device. For more accurate work I end up writing a Python pyserial program to parse packets once I'm past the "initial inspection" stage of the work.

       
  • Simon Bridger

    Simon Bridger - 2017-03-09

    Not sure how to fit it into the UI, but I am thinking it an extra timestamp checkbox,

    It seems to me that it is more generally useful to other people as part of timestamping.

    Perhaps a right-click hidden selector for the timeout period like the timestamp checkbox has

     
  • Simon Bridger

    Simon Bridger - 2017-03-09

    What DisplayAs mode are you normally using?

     
  • Simon Bridger

    Simon Bridger - 2017-05-19
    • status: open --> accepted
    • In Version: Next Release (example) --> V3.0.0.32
     
  • Simon Bridger

    Simon Bridger - 2017-05-19

    V3.0.0.32, added checkbox for "idle" and hidden timeout selector

     
  • Simon Bridger

    Simon Bridger - 2017-05-19
    • status: accepted --> awaiting-testing
     
  • Simon Bridger

    Simon Bridger - 2017-05-19

    Added "idle" checkbox

     
  • Frantisek Rysanek

    I'd love to add more than one upvote :-) This is exactly what I've been missing in RealTerm. Years ago I've written a simple piece of software for Linux (serial line hex-dumper with Curses output) that does exactly that same thing, but I don't have the time to port that to Windows and for various reasons I have to live in Windows most of the time. In Linux I could often detect timeouts as short as 10 ms.

    When debugging various serial-based communication protocols and fieldbusses, most of them request-response based, the delays between two consecutive requests or responses are often plenty long enough for a PC with a bloated OS to detect a timeout. Certainly if the slave is not available, so that the master has to time out before trying the next node. Or if you have multiple slave nodes, maybe there's a chance to eavesdrop on one particular slave's TX only, which only gets the relay token once every so often. Some protocols just ask once every some time quantum and don't try to squeeze maximum time out of the serial link. The chances to utilize a timeout for frame separation is actually pretty good, in my daily practice.

    If memory serves, in terms of WinAPI all you need to do is SetCommTimeouts(handle, ...) to some desired value and the subsequent call to ReadFile(handle, ...) will inherently apply the timeout, likely with support from the kernel. All you need to do is catch the "timeout" errors from ReadFile() and add a visual newline when a timeout occurs (for the first time after some data has been read).

    I'm currently at RealTerm 2.0.0.70, and I haven't noticed any public "nightly" or "testing" builds... I'd like to volunteer as a beta-tester :-)

     
  • Frantisek Rysanek

    BTW, is there a chance to add a "manual" line break in the displayed data? When debugging some serial comms, often the communication is "on demand", and it would help me to separate subsequent "instances" of activity visually on the screen. AFAIU, in 2.0.0.70, I have no option to just hit enter a couple times (with the newline getting "locally echoed"). Not in a hex display mode.

     
    • Simon Bridger

      Simon Bridger - 2019-04-02

      development versions at https://realterm.i2cchip.com

      Look for IDLE checkbox on display tab.

      \N button at right under terminal window inserts a newline into terminal

       

Log in to post a comment.

MongoDB Logo MongoDB