lx200_classic INDI driver over a TCP link
For my setup it is failing in what seems to be subsequent to isSlewComplete
driver sends down the :D# command using tty_nread_section
Prior to receiving the whole response driver sends down :GR#
Now when tty_nread_section completes then isSlewComplete executes a
tcflush(fd, TCIOFLUSH);
This flush seems to be flushing out the response in the packet that also contains the response to :GR#
Example:
Send :D# wanting Y (Y=33) bytes returned
First response packet contains 8 bytes of response to :D#
Driver sends down :GR#
Second response packet to :D# contains 16 bytes
Third response packet contains remained of :D# response plus the response to :GR#
isSlewComplete flushes after seeing the Y bytes of the :D# so :GR# never sees its data?
The attached PCAP file shows the interchange
Also, for a classic lx200 the response length to :D# is 33 bytes versus the 8 as coded in lx200driver.cpp