Artifacts Associated With Ticket 08872796bc
Ticket change [2a6bcb24ea] (rid 141128) by fenugrec on 2015-01-28 15:47:39:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
I'm having a strange problem reading a serial port on winXP. In short, I can only perform one "read", all the following attempts fail. Here's an example, with TX and RX shorted to echo everything back : > ***** > (tuner-ctl) 306 % catch {set curchan [open $curport r+ ]} > 0 > (tuner-ctl) 307 % chan configure $curchan -buffering none -translation binary -mode 9600,n,8,1 -handshake none -timeout 100 > (tuner-ctl) 308 % puts -nonewline $curchan \x55 > (tuner-ctl) 309 % read $curchan > U > (tuner-ctl) 310 % puts -nonewline $curchan \x55 > (tuner-ctl) 311 % read $curchan > (tuner-ctl) 312 % close $curchan > ***** If I close+open the same port right after, I will get the same result : first read works regardless, second read gives nothing! Here's what I tried : - different serial ports (USB->FTDI adapter, com0com software virtual port); either configured/wired as simple loopback devices or connected with a known-good, responding device. (I see the responses come in on the RXD line with a scope) - various combinations of blocking = 1, =0, buffering = full (and calling "flush $curchan" when required) - sending a longer string with puts : if I do, the first read will correctly give back the entire string echo. Second read still fails. - [eof $curchan] ==1, and [chan pending input $curchan] ==0 before the second read. So the data is getting lost somewhere before the second read is called ? - "set errorInfo" after every command shows nothing (no errors) Other terminal software (realterm, etc) works fine of course. I can run ollydbg for simple debugging if needed. - foundin initialized to: "8.6.3.1"
- is_private initialized to: "0"
- login: "fenugrec"
- priority initialized to: "5 Medium"
- private_contact initialized to: "5aa950fce2ca1705453aec59adc8d0c3c9186502"
- resolution initialized to: "None"
- severity initialized to: "Important"
- status initialized to: "Open"
- submitter initialized to: "fenugrec"
- subsystem initialized to: "24. Channel Commands"
- title initialized to: "win: serial port read works only once"
- type initialized to: "Bug"
Ticket change [ecd77fa66e] (rid 141132) by dgp on 2015-01-29 18:35:00:
- icomment:
See new test io-73.4 on 8.5 and trunk to demo the trouble. [gets] was properly fixed to operated after EOF everywhere, but the [read] fix only got done right on the 8.5 branch, not the trunk.
- login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [149a228a4c] (rid 141136) by dgp on 2015-01-29 18:40:31:
- assignee changed to: "dgp"
- closedate changed to: "2457052.27814107"
- closer changed to: "dgp"
- icomment:
fixed on trunk for 8.6.4.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"