Overview
| Artifact ID: | 82bbfd4a52a1038dadafa64591954720f601d422 |
|---|---|
| Ticket: | 656112ffffffffffffffffffffffffffffffffff
fconfigure -ttycontrol -mode problem |
| User & Date: | parnass on 2002-12-19 03:53:56 |
Changes
- assignee changed to: "dkf"
- cmimetype changed to: "text/plain"
- comment changed to:
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." - foundin changed to: "obsolete: 8.4.1"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "parnass"
- subsystem changed to: "16. Commands A-H"
- title changed to: "fconfigure -ttycontrol -mode problem"
- type changed to: "Bug"