IrDA on WinCE tcl/tk works just fine

"jaliane88" <alfa2364-S0/[email protected]> Fri, 15 Apr 2005 19:01:51 -0000
Newsgroups gmane.comp.windows.ce.freeware
Message-ID <[email protected]>

Hello together,

after fiddeling around with some rebuilds of both WinCE tcl/tk ports 
I got the result that IrDA is working with Rainer Keuchels port 
without any changes of the port itself. It works in both directions, 
TX and RX.
Just TX is not working with fileevent. Here is small example:

# Example (1): Poll the comport periodically
 set serial [open com3: r+]
 fconfigure $serial -mode "9600,n,8,1"
 fconfigure $serial -blocking 1 -buffering none

 button .b -text Exit -command {close $serial; exit}
 pack .b

 puts $serial "Hallo IrDA"
 set data ""
 while {1} {
     set char [read $serial]       ;# read ALL incoming bytes        
     set size [string length $char];# number of received byte, may 
be 0
     if { $size } {
         if {$char == "\n"} {
           puts $data
           set data ""
         } else {
           append data $char
         }
     }
     update      ;# Display output, allow to close wish-window
}

Have fun