Artifacts Associated With Ticket 218465
Ticket change [f1b8046d66] (rid 109406) by nobody on 2000-10-26 01:00:47:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 625 Bug Version: 8.0p2 SubmitDate: '1998-05-25' LastModified: '1999-03-12' Severity: MED Status: Released Submitter: hershey ChangedBy: stanton OS: All OSVersion: NA Machine: NA FixedDate: '1999-03-12' FixedInVersion: 8.1b2 ClosedDate: '2000-10-25' > I've seen a few queries about problems using Windows NT > serial/comN ports, but no definitive answers on what > is going on. I have boiled my problem down to two > short Tcl scripts that "should" exchange integer data over > two com ports connected with a Null modem cable. > These don't cooperate. > > This state evolved from trying to control a modem from > Tcl over a serial port. We then found that > "copy con comX" would allow manual entry of control > sequences that worked, but "type cntrlStringsInFile.txt > comX" > does not work - may take the phone off hook with certain > settings at best. > > It appears that the NT serial ports' drivers don't deal well with > the hand-shaking of RS-232E. > > I'll provide the scripts to anyone interested and report any > definitive results. > I posted a query a while back about the serial ports. I'll pass along what I learned to get serial out of Tcl under windows.I've been using Tck/Tk 8.1 with serial I/O working at 115.2K for NT and Windows 95 on portables and desktops. I was told serial IO wasn't functioning in versions prior to Tcl/Tk 8.0. To paraphrase some of my code. #Open the serial port as if {[catch {open "COM1:" "RDWR"} sid]} then { tk_dialog .dialog "Serial IO Error" "Unable to open serial port COM1:" error 0 OK unset sid return "" } # configure for speed and binary data transfer fconfigure $sid -mode {115200 n 8 1} -translation binary # I don't think this was supposed to work, but since it kind of does # I used it for asynchronous reads. fileevent $sid readable { if {![catch {read $sid} val} { binary scan $val H* data # fileevent is called even though there is no data, so check for # valid string if {[string length $data] > 0} { #do something with your data # } } #otherwise for synchronous sends and receives try puts -nonewline $sid [binary format H* $dataout] # flush the buffer so you know it sent flush $sid if {![catch {read $sid 1} val]} { binary scan $val H* datain } With 8.0, you have fconfigure for setting baudrate, comport, and binary mode. I'd like to see filevent work (better). I am also curious on how to send a break from Tcl. I have found interference from internal dial up modem cards when there shouldn't be. I might start by making sure there is no hardware or software handshaking performed in the control panel. 03/12/1999 11:09 - stanton - in 8.1, file events on serial I/O should be working - foundin initialized to: "obsolete: 8.0p2"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "62. (unused)"
- title initialized to: "serial ports don't seem to work"
- type initialized to: "Bug"
Ticket change [e387f8f222] (rid 87814) by welch on 2000-10-26 08:22:17:
- closedate changed to: "2000-10-26T01:22:17"
- closer changed to: "welch"
- priority changed to: "2"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [bcddffcbd5] (rid 101823) by dgp on 2001-04-03 06:39:59:
- closedate changed to: "2001-04-02T23:39:59"
- closer changed to: "dgp"
- subsystem changed to: "27. Channel Types"