title: Qt modbus serial port flow control handling
body: <p>I'm writing a small program using QModbusDevice over the serial port (using the <code>QModbusRtuSerialMaster</code> class) and have some problems.</p>
  
  <p>One of the problems seems to be that the flow control of the serial port is incorrect. Checking in a serial port sniffer I see that a working client sets RTS on when it sends requests, and then RTS off to receive replies. When I use <code>QModbusRtuSerialMaster</code> to send messages that doesn't happen.</p>
  
  <p>The message is sent correctly (sometimes, subject for another question) compared to the working client. It's just the control flow that doesn't work and which causes the servers to be unable to reply.</p>
  
  <p>I have set the Windows port settings for the COM-port in question to hardware flow control but it doesn't matter, the sniffer still reports no flow control.</p>
  
  <p>Is there a way to get <code>QModbusRtuSerialMaster</code> to set the flow control as I would like? Or is there a way to manually handle the flow control (which is what the working client does)? Or is the only solution to skip the Qt modbus classes and make up my own using the serial port directly?</p>
  
  <hr>
  
  <p>A short summary of what I'm doing...</p>
  
  <p>First the initialization of the <code>QModbusRtuSerialMaster</code> object:</p>
  
  <pre><code>QModbusDevice* modbusDevice = new QModbusRtuSerialMaster(myMainWindow);
  
  modbusDevice-&gt;setConnectionParameter(QModbusDevice::SerialPortNameParameter, "COM3");
  modbusDevice-&gt;setConnectionParameter(QModbusDevice::SerialParityParameter, QSerialPort::NoParity);
  modbusDevice-&gt;setConnectionParameter(QModbusDevice::SerialBaudRateParameter, QSerialPort::Baud115200);
  modbusDevice-&gt;setConnectionParameter(QModbusDevice::SerialDataBitsParameter, QSerialPort::Data8);
  modbusDevice-&gt;setConnectionParameter(QModbusDevice::SerialStopBitsParameter, QSerialPort::OneStop);
  modbusDevice-&gt;setTimeout(100);
  modbusDevice-&gt;setNumberOfRetries(3);
  
  modbusDevice-&gt;connectDevice();
  </code></pre>
  
  <p>Then how I send a request:</p>
  
  <pre><code>auto response = modbusDevice-&gt;sendReadRequest(QModbusDataUnit(QModbusDataUnit::Coils, 0, 1), 1);
  </code></pre>