tcl/tk serial port access on PocketPC: fconfigure -mode does not work
- Dear tcl/tk experts,
I need some help in accessing the serial port on my Pocket PC
(Fujitsu Siemens Pocket Loox 410 with Windows Mobile 2003 operating
I am running the tcltk846ce-arm installation from sourceforge and in
principle it works quite well.
Thanks to the tcltk community!
Now I want to connect to my GPS receiver via the serial port (over
bluetooth) with the following code:
set mode "4800,n,8,1"
set chan [open "com6:" r+]
fconfigure $chan -mode $mode
This code works on my desktop PC running Windows98 without problems.
But on the Pocket PC it fails:
It seems that the serial port is opened successfully but then I get
the following error message:
Error in startup script:
bad option "-mode":
should be one of -blocking, -buffering, -buffersize, -encoding,
-eofchar, or -translation
"fconfigure $chan -mode $mode"
(file "\SD-MMCard\tcl\nmea.tcl" line 3)
I have found other users reporting similar problems at
but no solution for the problem.
Could anybody help me with a solution or a work-around?
Thank you very much in Advance,
> I need some help in accessing the serial port on my Pocket PC...
> (Fujitsu Siemens Pocket Loox 410 with Windows Mobile 2003
> operating system). I am running the tcltk846ce-arm
> installation from sourceforge and in principle it works quite
> well. Thanks to the tcltk community!
> fconfigure $chan -mode $mode...
> But on the Pocket PC it fails:There are some issues with the CE port and serial port access.
> bad option "-mode":
> should be one of -blocking, -buffering, -buffersize,
> -encoding, -eofchar, or -translation
It is not fully implemented. This looks like the channel was
not recognized as a serial port, but even if it was, looking in
the sources I see that BuildCommDCB does not appear to be
implemented, so this wouldn't work anyways. Ah yes, in
tcl/win/tclWinChan.c, FILE_TYPE_SERIAL detection is explicitly
commented out for CE.
If someone has the code for serial port handling on CE, they
could look at plugging that support back in.
Jeff Hobbs, The Tcl Guy
http://www.ActiveState.com/, a division of Sophos