You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cg...@apache.org on 2024/07/17 02:54:13 UTC
(plc4x) branch develop updated: Odot (#1704)
This is an automated email from the ASF dual-hosted git repository.
cgarcia pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
The following commit(s) were added to refs/heads/develop by this push:
new f357a3194b Odot (#1704)
f357a3194b is described below
commit f357a3194b524a7b10ecaeb01ec011199475e257
Author: César José García León <ce...@gmail.com>
AuthorDate: Tue Jul 16 22:54:08 2024 -0400
Odot (#1704)
* Correct connection with Gateway Odot.
* The 'COTP - TPDU nnumber' field must always be zero.
---------
Co-authored-by: César García <ce...@ceos.com.ve>
---
.../apache/plc4x/java/s7/readwrite/protocol/S7ProtocolLogic.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/protocol/S7ProtocolLogic.java b/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/protocol/S7ProtocolLogic.java
index c2aee3e10f..74145e786a 100644
--- a/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/protocol/S7ProtocolLogic.java
+++ b/plc4j/drivers/s7/src/main/java/org/apache/plc4x/java/s7/readwrite/protocol/S7ProtocolLogic.java
@@ -1449,8 +1449,8 @@ public class S7ProtocolLogic extends Plc4xProtocolBase<TPKTPacket> {
// Get the tpduId from the S7 message.
int tpduId = request.getTpduReference();
-
- TPKTPacket tpktPacket = new TPKTPacket(new COTPPacketData(null, request, true, (byte) tpduId));
+ //The "COTP - TPDU nnumber" field must always be zero.
+ TPKTPacket tpktPacket = new TPKTPacket(new COTPPacketData(null, request, true, (byte) 0));
// Start a new request-transaction (Is ended in the response-handler)
RequestTransactionManager.RequestTransaction transaction = tm.startRequest();
@@ -1663,7 +1663,7 @@ public class S7ProtocolLogic extends Plc4xProtocolBase<TPKTPacket> {
s7DriverContext.getMaxAmqCaller(), s7DriverContext.getMaxAmqCallee(), s7DriverContext.getPduSize());
S7Message s7Message = new S7MessageRequest(0, s7ParameterSetupCommunication,
null);
- COTPPacketData cotpPacketData = new COTPPacketData(null, s7Message, true, (byte) 1);
+ COTPPacketData cotpPacketData = new COTPPacketData(null, s7Message, true, (byte) 0);
return new TPKTPacket(cotpPacketData);
}