From: <no...@so...> - 2002-12-19 03:53:37
|
Bugs item #656112, was opened at 2002-12-18 21:53 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=656112&group_id=10894 Category: 15. Commands A-H Group: 8.4.1 Status: Open Resolution: None Priority: 5 Submitted By: Bob Parnass (parnass) Assigned to: Donal K. Fellows (dkf) Summary: fconfigure -ttycontrol -mode problem Initial Comment: The order of the arguments for the fconfigure command affects the outcome of the operation on WIndows 98. I am using ActiveTcl 8.4.1 on both Linux and Windows 98 Second Edition to run a program I wrote which uses the serial port. My program communicates with the peripheral device ok on Linux but not Windows and I've traced the problem to fconfigure's new -ttycontrol option. Using a simple line monitor, I can see that the RTS line is not being held low on Windows when I execute this command: if { [catch {fconfigure $Sid \ -buffering none \ -translation binary \ -ttycontrol {DTR 1 RTS 0} \ -mode 4800,$parity,8,2 -blocking 1}] } \ { set code -1 } The RTS line is held low on Red Hat Linux 7.3. I consulted with Rolf Schroedter, who responded: "...Yes I see the problem. In Windows the -mode "string" interpretation resets all TTY states to their default values. A simple workaround for you is to set the baud rate first and only then the -ttycontrol. The following should work: fconfigure $Sid -buffering none -translation binary -blocking 1 \ -mode 4800,$parity,8,2 -ttycontrol {DTR 1 RTS 0} Or even fconfigure $Sid -buffering none -translation binary -blocking 1 fconfigure $id -mode 4800,$parity,8,2 fconfigure $id -ttycontrol {DTR 1 RTS 0} I'll have a look whether there is a way to correct this for future Tcl versions. On the other hand setting -mode is an elementary thing which reconfigures the UART hardware and should not be done during communication. Thank you for pointing out the problem." ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110894&aid=656112&group_id=10894 |