Loading ...
Sorry, an error occurred while loading the content.
 

tcl/tk serial port access on PocketPC: fconfigure -mode does not work

Expand Messages
  • hs089
    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 system).
    Message 1 of 2 , Dec 12, 2004
      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
      system).
      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
      close $chan
      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
      while executing
      "fconfigure $chan -mode $mode"
      (file "\SD-MMCard\tcl\nmea.tcl" line 3)


      I have found other users reporting similar problems at
      http://wiki.tcl.tk/11134
      and
      http://aspn.activestate.com/ASPN/Mail/Message/Tcl-bugs/816708
      but no solution for the problem.

      Could anybody help me with a solution or a work-around?

      Thank you very much in Advance,

      Helmut Schmidt
    • Jeff Hobbs
      ... There are some issues with the CE port and serial port access. It is not fully implemented. This looks like the channel was not recognized as a serial
      Message 2 of 2 , Dec 13, 2004
        > 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:
        > bad option "-mode":
        > should be one of -blocking, -buffering, -buffersize,
        > -encoding, -eofchar, or -translation

        There are some issues with the CE port and serial port access.
        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
      Your message has been successfully submitted and would be delivered to recipients shortly.