Hi!
libmodbus is very useful tool for beginners like me.
I am testing unit-test-server & unit-test-client on the same
machine and same port but on different terminals in order to make a
loopback test. After trying for three days I am getting following error:
Opening /dev/ttyS0 at 115200 bauds (N, 8, 1)
** UNIT TESTING **
TEST WRITE/READ:
[01][05][01][30][FF][00][8D][C9]
Waiting for a confirmation...
ERROR Connection timed out: select
Bytes flushed (0)
1/2 modbus_write_bit: FAILED
at client side &
Opening /dev/ttyS0 at 115200 bauds (N, 8, 1)
Waiting for a indication...
ERROR Connection timed out: select
Quit the loop: Connection timed out
at server side.
I have shorted TX and RX pins of the DB 9 connector. I have set the set_slave(ctx, 1) server id to 1 in both programs.
Though I have searched on net. I couldn't find the solution. Please help me.