pylon:
No, not really. I don't see in your pictures what bytes were sent from the PC to the Arduino. Please add a line to the sketch that gives that out.I would also try to snoop the packets on the network with a tool like WireShark, that helps to see what's really being sent or not.
Hello, I did a record with wireshark and i found no communication with the IP 192.168.178.12. I think the problem is, it gives no connection between Arduino and the heating system IP 192.168.178.54.
cause in the MgsModbus.cpp I found the lines:
//****************** ?? ******************
if (MbmClient.connect(ServerIp,502)) {
//#ifdef DEBUG
Serial.println("connected with modbus slave");
Serial.print("Master request: ");
for(int i=0;i<MbmByteArray[5]+6;i++) {
if(MbmByteArray < 16){Serial.print("0");}
_ Serial.print(MbmByteArray*,HEX);_
_ if (i != MbmByteArray[5]+5) {Serial.print(".");} else {Serial.println();}_
_ }_
_ //#endif _
_ for(int i=0;i<MbmByteArray[5]+6;i++) {_
_ MbmClient.write(MbmByteArray);
}
MbmCounter = 0;
MbmByteArray[7] = 0;
MbmPos = Pos;
MbmBitCount = Count;
} else {
#ifdef DEBUG*
* Serial.println("connection with modbus master failed");
#endif
MbmClient.stop();
}
}
so in the Arduino-COM-terminal must display "connected with modbus slave"
but it isn´t. Only the line 54.0.0.0 stands in the terminal.
Other Persons got the same problem, see Modbus TCP (not serial) master help needed - Networking, Protocols, and Devices - Arduino Forum
_@pylon: You answered at this topic on Oct 31, 2014, 04:57 pm.
I did the suggestion with "Remove line 18 and replace "ServerIp" in line 82 by "remSlaveIP"." but it doesn´t work.
wish everybody Merry christmas _