unable to test modbus rtu

109 views
Skip to first unread message

Khaja minhaj

unread,
Dec 26, 2013, 1:33:54 AM12/26/13
to libm...@googlegroups.com

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.

Sun XiaoXiong

unread,
Mar 22, 2016, 11:34:33 PM3/22/16
to libmodbus
How to you solve this problem, I have the same problem with you

在 2013年12月26日星期四 UTC+8下午2:33:54,Khaja minhaj写道:
Reply all
Reply to author
Forward
0 new messages