I am trying to use this library to make slave for master but after 268 comunications loops the mbed is frozen and not possible to continue. If I tested it with PC sw Modbus Poll it works fine and for 40k of readings I have 8 timeout errors. But this sw open MB and than only periodically read registers, but the problem with my hw master interfacing is that it always make comunication as follows.
MODBUS > DEBUG: MBTCP-ACCEPT
MODBUS > Accepted new client 192.168.1.50
MODBUS > DEBUG: MBTCP-RECV
MODBUS > | TID = 7F72 | PID = 0000 | LEN = 0006 | UID = 01|| FUNC = 03 | DATA = 07D00063 |
MODBUS > eMBRegHoldingCB
sent 207 bytes
MODBUS > DEBUG: MBTCP-CLOSE
MODBUS > Closed connection to 192.168.1.50
and if master make 268 loops like this the mbed is frozen, I have implemented WDT with 3sec delay to fully restart mbed, but I would like to know if there is some bug or something to do how can I fix this problem with counting of relations and after 268's closing connection frozing of mbed.
I some body can help me?
Thx
I am trying to port the freemodbus TCP source (http://freemodbus.berlios.de/) for mbed (http://mbed.org/users/tmav123/programs/ModbusTCP/m1pxgl).
But I am facing the following problem:
1. pc query
2. mbed responces
3. pc acks but with incorrect checksum
4. mbed is trying several times to tx the responce without success.
Is this a lwip issue?