From 1d2b32448500b107d808d7a63ae1a414fefe52c7 Mon Sep 17 00:00:00 2001 From: Steffen Pohle Date: Tue, 21 Nov 2023 20:07:37 +0100 Subject: [PATCH] on modbus tcp/ip the tansaction id should always be 0 --- Changelog | 3 +++ Makefile | 2 +- nwthread.cc | 3 ++- testmodbus-client.ui | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Changelog b/Changelog index 147593b..bfec3af 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,6 @@ +2023-11-21: +- fixed: on modbus tcp/ip the transaction id should always be 0 + 2023-09-26: - disconnect button also unselect the autoconnect and the update checkbox diff --git a/Makefile b/Makefile index 34c371a..df25021 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ .SILENT: help -VERSION = 0.1.0 +VERSION = 0.1.1 -include Makefile.rules diff --git a/nwthread.cc b/nwthread.cc index 4b0b816..744edbc 100644 --- a/nwthread.cc +++ b/nwthread.cc @@ -185,7 +185,8 @@ void NetworkThread::BuildAndSendReadReq(char *buffer, int size) { char *pos; req_mbh.length = 0; - req_mbh.transid++; + // req_mbh.transid++; // with modbus tcp/ip it should always be set to 0 + req_mbh.transid = 0; pos = modbustcp_pkt_headerrq(buffer, size, &req_mbh); tcp.Write(buffer, (pos-buffer)); }; diff --git a/testmodbus-client.ui b/testmodbus-client.ui index 95083a9..8611653 100644 --- a/testmodbus-client.ui +++ b/testmodbus-client.ui @@ -102,7 +102,7 @@ True True 6 - 1502 + 502 False