Skip to content

Commit 6600ea5

Browse files
committed
4.1.0 release
- Fix TransactionId - Misc documentation fixes
1 parent b7aeef0 commit 6600ea5

File tree

5 files changed

+28
-23
lines changed

5 files changed

+28
-23
lines changed

README.md

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ For more information about Modbus see:
4747
## Last Changes
4848

4949
```diff
50-
// 4.1.0-RC1
50+
// 4.1.0
5151
+ API: Raw Modbus frame processing functionality
5252
+ ModbusRTU: Precise inter-frame interval control
5353
+ Examples: True ModbusRTU to ModbusTCP Server bridge
@@ -60,7 +60,28 @@ For more information about Modbus see:
6060
+ ModbusRTU: Add separate RE/DE pins control optional feature
6161
+ API: Drop support of Ethernet library v1
6262
+ Examples: Teknic ClearCore ArduinoWrapper examples added
63+
+ Examples: ModbusTCP to ModbusRTU example added
6364
+ ModbusRTU: Flush extra delay optional feature
65+
// 4.0.0
66+
+ Support of all Arduino boards
67+
+ ModbusTLS: ESP8266 Client/Server and ESP32 Client
68+
+ ModbusTCP: ModbusEthernet - WizNet W5x00, ENC28J60 Ethernet library support
69+
+ 0x14 - Read File Records function
70+
+ 0x15 - Write File Records function
71+
+ Examples: FW update over Modbus fullfunctional example
72+
+ 0x16 - Write Mask Register function+ Test: 0x16
73+
+ 0x17 - Read/Write Registers function
74+
+ ModbusRTU: ESP32 SoftwareSerial support
75+
+ Build with no STL dependency (switchable)
76+
+ API: ModbusIP => ModbusTCP
77+
+ API: Access control callback for individual Modbus function
78+
+ API: Master/Slave => Client/Server according to [PRESS RELEASE](https://modbus.org/docs/Client-ServerPR-07-2020-final.docx.pdf)
79+
+ Lot of code refacting and small fixes
80+
```
81+
82+
## Roadmap
83+
84+
```diff
6485
// 4.2.0-DEV
6586
- API: Alternative CRC calulation (reduced memory footprint)
6687
- ModbusRTU: Static buffer allocation
@@ -82,23 +103,7 @@ For more information about Modbus see:
82103
- API: Extend API to allow custom Modbus commands
83104
- Examples: Basic file operations
84105
- Examples: Revising
85-
// 4.0.0
86-
+ Support of all Arduino boards
87-
+ ModbusTLS: ESP8266 Client/Server and ESP32 Client
88-
+ ModbusTCP: ModbusEthernet - WizNet W5x00, ENC28J60 Ethernet library support
89-
+ 0x14 - Read File Records function
90-
+ 0x15 - Write File Records function
91-
+ Examples: FW update over Modbus fullfunctional example
92-
+ 0x16 - Write Mask Register function+ Test: 0x16
93-
+ 0x17 - Read/Write Registers function
94-
+ ModbusRTU: ESP32 SoftwareSerial support
95-
+ Build with no STL dependency (switchable)
96-
+ API: ModbusIP => ModbusTCP
97-
+ API: Access control callback for individual Modbus function
98-
+ API: Master/Slave => Client/Server according to [PRESS RELEASE](https://modbus.org/docs/Client-ServerPR-07-2020-final.docx.pdf)
99-
+ Lot of code refacting and small fixes
100106
```
101-
102107
## Contributions
103108

104109
https://github.com/emelianov/modbus-esp8266

examples/Bridge/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Basic 'Bridge'. Indeed this sample pulling data from Modbus Server and stores it
88

99
Fullfunctional ModbusRTU to ModbusTCP bridge.
1010

11-
## [Multiple Server ID](MultipeServerID/MultipeServerID.ino)
11+
## [Multiple Server ID](MultipleServerID/MultipleServerID.ino)
1212

1313
Respond for multiple ModbusRTU IDs from single device
1414

examples/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Examples of using callback functions.
2424

2525
Modbus file operations examples.
2626

27-
## [ModbusRTU to ModbusTCP bridge and related functions](bridge)
27+
## [ModbusRTU to ModbusTCP bridge and related functions](Bridge)
2828

2929
Very basic example of accessing ModbusRTU slave device connected to ESP8266/ESP32 via ModbusTCP server.
3030

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=modbus-esp8266
2-
version=4.1.0-RC1
2+
version=4.1.0
33
author=Andre Sarmento Barbosa, Alexander Emelianov
44
maintainer=Alexander Emelianov<[email protected]>
55
sentence=Modbus Library for Arduino. ModbusRTU, ModbusTCP and ModbusTCP Security

src/ModbusTCPTemplate.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -387,9 +387,6 @@ uint16_t ModbusTCPTemplate<SERVER, CLIENT>::send(IPAddress ip, TAddress startreg
387387
_MBAP.protocolId = __swap_16(0);
388388
_MBAP.length = __swap_16(_len+1); //_len+1 for last byte from MBAP
389389
_MBAP.unitId = unit;
390-
transactionId++;
391-
if (!transactionId)
392-
transactionId = 1;
393390
bool writeResult;
394391
{ // for sbuf isolation
395392
size_t send_len = _len + sizeof(_MBAP.raw);
@@ -413,6 +410,9 @@ uint16_t ModbusTCPTemplate<SERVER, CLIENT>::send(IPAddress ip, TAddress startreg
413410
_frame = nullptr;
414411
}
415412
result = transactionId;
413+
transactionId++;
414+
if (!transactionId)
415+
transactionId = 1;
416416
cleanup:
417417
free(_frame);
418418
_frame = nullptr;

0 commit comments

Comments
 (0)