Unsolved Use QModbusRtuSerialMaster with RS485
-
I'm trying to modify the Modbus Master example (https://code.qt.io/cgit/qt/qtserialbus.git/tree/examples/serialbus/modbus/master?h=5.15) in order to use an RS485 serial line.
I must change the
DE
signal by hand, before and after a transmission.
I'm using thelibgpiod
and I'm able to change the state of theDE
pin.I wonder if this is going to work, because I need to set the pin high just before start a transmission (this is easy) and set it low just after the transmission ends. I'm not sure if this may be accomplished because how to know when the Qt framework has completed the transmission of methods like
connectDevice()
orsendReadRequest()
?Do you have any other suggestion?