Serial Com port looses characters. 
Author Message
 Serial Com port looses characters.

Tcl 8.1b3 Bug:  Generated by Scriptics' bug entry form at
        http://www.*-*-*.com/
Responses to this post are encouraged.
------

Submitted by:  Brian O'Brien
OperatingSystem:  Windows 98
Synopsis:  Serial Com port looses characters.

ReproducibleScript:
       if [eof $comport] {
          puts "caught eof on $comport."
          catch {close $comport}
       } else {
          set n [gets $comport line]
          if {$n != -1} {
             puts $line
          }
       }
    }

    proc openport {} {

       global comport

       set comport [open com2: r+]
       fconfigure $comport -blocking 0 -buffering line -mode 2400,n,8,1
       fileevent $comport readable [list incomming $comport]
    }

ObservedBehavior:
    Characters are lost regardless of the baud rate...

DesiredBehavior:
    No loss of data or an error indicating serial overrun...



Thu, 27 Sep 2001 03:00:00 GMT  
 Serial Com port looses characters.
Hmmm...must have been a recent change, I was getting overrun errors
before...

I'll take a look at the code.

-- Scott Redman

Quote:

> Tcl 8.1b3 Bug:  Generated by Scriptics' bug entry form at
>         http://www.scriptics.com/support/bugForm.html
> Responses to this post are encouraged.
> ------

> Submitted by:  Brian O'Brien
> OperatingSystem:  Windows 98
> Synopsis:  Serial Com port looses characters.

> ReproducibleScript:
>        if [eof $comport] {

>           puts "caught eof on $comport."

>           catch {close $comport}

>        } else {

>           set n [gets $comport line]

>           if {$n != -1} {

>              puts $line

>           }

>        }

>     }

>     proc openport {} {

>        global comport

>        set comport [open com2: r+]

>        fconfigure $comport -blocking 0 -buffering line -mode 2400,n,8,1

>        fileevent $comport readable [list incomming $comport]

>     }

> ObservedBehavior:
>     Characters are lost regardless of the baud rate...

> DesiredBehavior:
>     No loss of data or an error indicating serial overrun...



Fri, 28 Sep 2001 03:00:00 GMT  
 Serial Com port looses characters.
Fixed the problem...seems that ClearCommError() nukes data out
of the queue.

-- Scott

Quote:

> Tcl 8.1b3 Bug:  Generated by Scriptics' bug entry form at
>         http://www.scriptics.com/support/bugForm.html
> Responses to this post are encouraged.
> ------

> Submitted by:  Brian O'Brien
> OperatingSystem:  Windows 98
> Synopsis:  Serial Com port looses characters.

> ReproducibleScript:
>        if [eof $comport] {

>           puts "caught eof on $comport."

>           catch {close $comport}

>        } else {

>           set n [gets $comport line]

>           if {$n != -1} {

>              puts $line

>           }

>        }

>     }

>     proc openport {} {

>        global comport

>        set comport [open com2: r+]

>        fconfigure $comport -blocking 0 -buffering line -mode 2400,n,8,1

>        fileevent $comport readable [list incomming $comport]

>     }

> ObservedBehavior:
>     Characters are lost regardless of the baud rate...

> DesiredBehavior:
>     No loss of data or an error indicating serial overrun...



Sat, 06 Oct 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Serial Error 0x4002 (Error 16386, character was lost by overwrite / serial port overrun error)

2. Com port and command with serial port

3. Win32/Python serial port event character problem

4. Serial ports, control characters, sgitcl

5. Win32/Python serial port event character problem

6. Win32all serial port event character problem.

7. newbie : working with INTERRUPTS with SERIAL com port ?

8. ANN: SENDSMS.COM to explore AT command of a serial port modem

9. Data acquisition via serial port (COM)

10. working with INTERRUPTS with SERIAL com port ?

11. COM (Serial) Port Access in REXX?

12. Using serial Com Port

 

 
Powered by phpBB® Forum Software