I added a semaphore for fun and output the command being sent when acquiring it.
I then noticed what appears to be the problem. Seems the waitForReadyRead is misbehaving. Here's the trace log with my added debug statements. The semaphore is acquired just before the hrd_->write It took 8 seconds for the first "get context" to get a reply in wsjt-x where the packet capture shows 2.2 seconds. There seem to be a lot of bugs on waitForReadyRead This one in particular now https://bugreports.qt-project.org/browse/QTBUG-14975 I then changed the waitForReadyRead to check bytesAvailable and it never shows any bytes available on the first command sent out. I would assume one should be able to check this way. I did this: auto retries2 = 200; replied = (hrd_->bytesAvailable()!=0); while((!replied) && (retries2 > 0)) { if (hrd_->bytesAvailable() > 0) { replied=true; } else { --retries2; QThread::msleep(50); // 200*50 = 10 seconds } } qDebug () << "HRDTransceiver::bytesAvailable:replied:retries2" << replied << ":" << hrd_->bytesAvailable() << ":" << retries2; //replied = hrd_->waitForReadyRead (socket_wait_time); And this always times out never seeing any bytres. This is before I changed to bytesAvailable where you can see the HRD reply come in but the "get id" still times out. Sat Sep 6 17:17:31 2014 GMT(C:\JTSDK-QT\src\wsjtx\HRDTransceiver.cpp:106)Debug: HRDTransceiver::start Sat Sep 6 17:17:31 2014 GMT(C:\JTSDK-QT\src\wsjtx\HamlibTransceiver.cpp:262)Debug: HamlibTransceiver::do_start rig: "Hamlib Dummy" Sat Sep 6 17:17:31 2014 GMT(C:\JTSDK-QT\src\wsjtx\HamlibTransceiver.cpp:48)Debug: rig:rig_open called Sat Sep 6 17:17:31 2014 GMT(C:\JTSDK-QT\src\wsjtx\HamlibTransceiver.cpp:48)Debug: dummy_open called Sat Sep 6 17:17:31 2014 GMT(C:\JTSDK-QT\src\wsjtx\HamlibTransceiver.cpp:48)Debug: dummy_get_vfo called: VFOA Sat Sep 6 17:17:31 2014 GMT(C:\JTSDK-QT\src\wsjtx\HamlibTransceiver.cpp:423)Debug: HamlibTransceiver::init_rig exit Transceiver::TransceiverState(online: no Frequency {0Hz, 0Hz} UNK; SPLIT: unknown; PTT: off) reversed = false Sat Sep 6 17:17:31 2014 GMT(C:\JTSDK-QT\src\wsjtx\HRDTransceiver.cpp:731)Debug: HRDTransceiver::semaphore: 1 :" "get context" " Sat Sep 6 17:17:39 2014 GMT(C:\JTSDK-QT\src\wsjtx\HRDTransceiver.cpp:785)Debug: HRDTransceiver::semaphore released: 0 Sat Sep 6 17:17:39 2014 GMT(C:\JTSDK-QT\src\wsjtx\HRDTransceiver.cpp:790)Debug: HRDTransceiver::send_command: reply byte count: 28 Sat Sep 6 17:17:39 2014 GMT(C:\JTSDK-QT\src\wsjtx\HRDTransceiver.cpp:819)Debug: HRDTransceiver::send_command( "get context" ): -> "745" Sat Sep 6 17:17:39 2014 GMT(C:\JTSDK-QT\src\wsjtx\HRDTransceiver.cpp:731)Debug: HRDTransceiver::semaphore: 1 :" "get id" " Sat Sep 6 17:17:49 2014 GMT(C:\JTSDK-QT\src\wsjtx\HRDTransceiver.cpp:755)Debug: HRDTransceiver::send_command " "get id" " timeout "Network operation timed out" Sat Sep 6 17:17:49 2014 GMT(C:\JTSDK-QT\src\wsjtx\HRDTransceiver.cpp:731)Debug: HRDTransceiver::semaphore: 1 :" "get id" " Sat Sep 6 17:17:59 2014 GMT(C:\JTSDK-QT\src\wsjtx\HRDTransceiver.cpp:785)Debug: HRDTransceiver::semaphore released: 0 Sat Sep 6 17:17:59 2014 GMT(C:\JTSDK-QT\src\wsjtx\HRDTransceiver.cpp:790)Debug: HRDTransceiver::send_command: reply byte count: 54 Sat Sep 6 17:17:59 2014 GMT(C:\JTSDK-QT\src\wsjtx\HRDTransceiver.cpp:819)Debug: HRDTransceiver::send_command( "get id" ): -> "Ham Radio Deluxe" Sat Sep 6 17:17:59 2014 GMT(C:\JTSDK-QT\src\wsjtx\HRDTransceiver.cpp:160)Debug: "Ham Radio Deluxe" Sat Sep 6 17:17:59 2014 GMT(C:\JTSDK-QT\src\wsjtx\HRDTransceiver.cpp:731)Debug: HRDTransceiver::semaphore: 1 :" "get version" " Sat Sep 6 17:17:59 2014 GMT(C:\JTSDK-QT\src\wsjtx\HRDTransceiver.cpp:785)Debug: HRDTransceiver::semaphore released: 0 Sat Sep 6 17:17:59 2014 GMT(C:\JTSDK-QT\src\wsjtx\HRDTransceiver.cpp:790)Debug: HRDTransceiver::send_command: reply byte count: 54 Sat Sep 6 17:17:59 2014 GMT(C:\JTSDK-QT\src\wsjtx\HRDTransceiver.cpp:819)Debug: HRDTransceiver::send_command( "get version" ): -> "Ham Radio Deluxe" Sat Sep 6 17:17:59 2014 GMT(C:\JTSDK-QT\src\wsjtx\HRDTransceiver.cpp:161)Debug: "Ham Radio Deluxe" Sat Sep 6 17:17:59 2014 GMT(C:\JTSDK-QT\src\wsjtx\HRDTransceiver.cpp:731)Debug: HRDTransceiver::semaphore: 1 :" "get radios" " Sat Sep 6 17:18:02 2014 GMT(C:\JTSDK-QT\src\wsjtx\HRDTransceiver.cpp:785)Debug: HRDTransceiver::semaphore released: 0 Sat Sep 6 17:18:02 2014 GMT(C:\JTSDK-QT\src\wsjtx\HRDTransceiver.cpp:790)Debug: HRDTransceiver::send_command: reply byte count: 54 Sat Sep 6 17:18:02 2014 GMT(C:\JTSDK-QT\src\wsjtx\HRDTransceiver.cpp:819)Debug: HRDTransceiver::send_command( "get radios" ): -> "v6.2.72.293 b293" 07:17:39.713001 IP 127.0.0.1.50273 > 127.0.0.1.7809: P 41:71(30) ack 29 win 31 0x0000: 4500 0046 6880 4000 8006 0000 7f00 0001 E..Fh.@......... 0x0010: 7f00 0001 c461 1e81 f150 d6d5 021b f8f6 .....a...P...... 0x0020: 5018 001f bcf3 0000 1e00 0000 cdab 3412 P.............4. 0x0030: 3412 cdab 0000 0000 6700 6500 7400 2000 4.......g.e.t... 0x0040: 6900 6400 0000 i.d... 07:17:39.713001 IP 127.0.0.1.7809 > 127.0.0.1.50273: . ack 71 win 127 0x0000: 4500 0028 6881 4000 8006 0000 7f00 0001 E..(h.@......... 0x0010: 7f00 0001 1e81 c461 021b f8f6 f150 d6f3 .......a.....P.. 0x0020: 5010 007f 0b1a 0000 P....... 07:17:41.903220 IP 127.0.0.1.7809 > 127.0.0.1.49910: P 1620:1674(54) ack 1921 win 124 0x0000: 4500 005e 6882 4000 8006 0000 7f00 0001 E..^h.@......... 0x0010: 7f00 0001 1e81 c2f6 dc36 f367 df6e 6fc2 .........6.g.no. 0x0020: 5018 007c 5251 0000 3600 0000 cdab 3412 P..|RQ..6.....4. 0x0030: 3412 cdab 0000 0000 3100 3400 3000 3700 4.......1.4.0.7. 0x0040: 3600 3000 3000 3000 2d00 3700 3000 3400 6.0.0.0.-.7.0.4. 0x0050: 3300 3800 3000 3000 0000 0000 0000 3.8.0.0....... 07:17:41.906220 IP 127.0.0.1.49910 > 127.0.0.1.7809: . ack 1674 win 128 0x0000: 4500 0028 6883 4000 8006 0000 7f00 0001 E..(h.@......... 0x0010: 7f00 0001 c2f6 1e81 df6e 6fc2 dc36 f39d .........no..6.. 0x0020: 5010 0080 b0d4 0000 P....... But the command times out and retransmits anyways 07:17:49.714001 IP 127.0.0.1.50273 > 127.0.0.1.7809: P 71:101(30) ack 29 win 31 0x0000: 4500 0046 689e 4000 8006 0000 7f00 0001 E..Fh.@......... 0x0010: 7f00 0001 c461 1e81 f150 d6f3 021b f8f6 .....a...P...... 0x0020: 5018 001f bcd5 0000 1e00 0000 cdab 3412 P.............4. 0x0030: 3412 cdab 0000 0000 6700 6500 7400 2000 4.......g.e.t... 0x0040: 6900 6400 0000 i.d... 07:17:49.714001 IP 127.0.0.1.7809 > 127.0.0.1.50273: . ack 101 win 127 0x0000: 4500 0028 689f 4000 8006 0000 7f00 0001 E..(h.@......... 0x0010: 7f00 0001 1e81 c461 021b f8f6 f150 d711 .......a.....P.. 0x0020: 5010 007f 0afc 0000 P....... 07:17:50.374067 IP 127.0.0.1.7809 > 127.0.0.1.49910: P 1944:1998(54) ack 2305 win 123 0x0000: 4500 005e 68a4 4000 8006 0000 7f00 0001 E..^h.@......... 0x0010: 7f00 0001 1e81 c2f6 dc36 f4ab df6e 7142 .........6...nqB 0x0020: 5018 007b 4f8e 0000 3600 0000 cdab 3412 P..{O...6.....4. 0x0030: 3412 cdab 0000 0000 3100 3400 3000 3700 4.......1.4.0.7. 0x0040: 3600 3000 3000 3000 2d00 3700 3000 3400 6.0.0.0.-.7.0.4. 0x0050: 3300 3800 3000 3000 0000 0000 0000 3.8.0.0....... 07:17:50.375067 IP 127.0.0.1.49910 > 127.0.0.1.7809: . ack 1998 win 126 0x0000: 4500 0028 68a5 4000 8006 0000 7f00 0001 E..(h.@......... 0x0010: 7f00 0001 c2f6 1e81 df6e 7142 dc36 f4e1 .........nqB.6.. 0x0020: 5010 007e ae12 0000 P..~.... 07:17:50.375067 IP 127.0.0.1.49910 > 127.0.0.1.7809: P 2305:2369(64) ack 1998 win 126 0x0000: 4500 0068 68a6 4000 8006 0000 7f00 0001 E..hh.@......... 0x0010: 7f00 0001 c2f6 1e81 df6e 7142 dc36 f4e1 .........nqB.6.. 0x0020: 5018 007e f846 0000 4000 0000 cdab 3412 P..~.F..@.....4. 0x0030: 3412 cdab 0000 0000 5b00 3700 3400 3500 4.......[.7.4.5. 0x0040: 5d00 2000 6700 6500 7400 2000 6600 7200 ]...g.e.t...f.r. 0x0050: 6500 7100 7500 6500 6e00 6300 6900 6500 e.q.u.e.n.c.i.e. ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ wsjt-devel mailing list wsjt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wsjt-devel