Tcl with serial ports

Jon Schneider jon at axismilton.ltd.uk
Thu Jun 13 23:59:03 BST 2002


I have a wish script prototyped on windows to be moved via 
FreeBSD to linux. Tcl 8.3.

The code does something like this

global comm
   if {[info hostname] == "gobshite"} {set portname "com2:"} {set 
portname "/dev/ttyS1"}

set comm [open "$portname" "r+"]

fconfigure $comm -mode 38400,n,8,1 -blocking 0 -buffering none -
encoding binary -translation binary -eofchar {}

Problem is I get this
==
Error in startup script: bad option "-mode": should be one of -
blocking, -buffering, -buffersize, -encoding, -eofchar, or -translation
    while executing
fconfigure ...
==

It is as if it has not been recognised as a serial port though has 
been opened. It also happens to another script I have _definately_ 
had working in the past under a unix though possibly not FreeBSD.

The cuaas do work 'cos I've used them for something else.

Any ideas ?

	Jon





More information about the Ukfreebsd mailing list