Overview
| Artifact ID: | fc668c390fbea5c9287dc12f86b7307973088ea4 |
|---|---|
| Ticket: | 656112ffffffffffffffffffffffffffffffffff
fconfigure -ttycontrol -mode problem |
| User & Date: | dkf on 2016-07-10 08:14:16 |
Changes
- assignee changed to: "aku"
- closedate changed to: "2457579.84324782"
- closer changed to: "dkf"
- 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." - icomment:
Win98 not supported. If the problem still exists with one of the versions of Windows built on the NT kernel, maybe we can reexamine?
- login: "dkf"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Out of Date"
- severity changed to: "Minor"
- status changed to: "Closed"