×

INDI Library v1.9.6 Released (21 May 2022)

Bi-monthly INDI Library released with new drivers and bug fixes.

DragonFly issue with sendCommand, trying to flush the connection

  • Posts: 11
  • Thank you received: 0
Hi,

I'm developing a new version of the dragonfly driver for indi, and I'm facing a strange issue. When I connect to the dragonfly all comands I'm sending are ok, but after some minutes, or if i disconnect and connect again, when I send a command, the dragonfly's response seems to be related for another command, is like they are mixing, and then the lights of the switches are incorrect

in this example, the response for the command !relio rldgrd 0 1# is related to !relio snanrd 0 6, so I'm asking for the state of a relay, and dragonfly is answering a sensor analog state ...

https://s3-us-west-1.amazonaws.com/groupsioattachments/43945/84994530/4598/0?AWSAccessKeyId=AKIAJECNKOVMCCU3ATNQ&Expires=1629392812&Signature=Mla8iGIo3z3rMZVeHL0yQ3yNW4w%3D

I've tried with the current release of the dragonfly's driver, and the same is happening. I've added in the bool DragonFlyDome::sendCommand

a flush withtcflush(PortFD, TCIFLUSH);before and after the execution of the command, but without luck, the issue persists. I've added a method to check if the command is related to the answer, and if not, I'm closing the connection and connection again, which works but seems not elegant...tcpConnection->Disconnect();
usleep(1000000);
tcpConnection->Connect();any help would be apreciated

jordi
10 months 1 week ago #74647

Please Log in or Create an account to join the conversation.

Time to create page: 0.273 seconds