Skip to content

Commit

Permalink
4.1.0 release
Browse files Browse the repository at this point in the history
- Fix TransactionId
- Misc documentation fixes
  • Loading branch information
emelianov committed Apr 17, 2022
1 parent b7aeef0 commit 6600ea5
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 23 deletions.
39 changes: 22 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ For more information about Modbus see:
## Last Changes

```diff
// 4.1.0-RC1
// 4.1.0
+ API: Raw Modbus frame processing functionality
+ ModbusRTU: Precise inter-frame interval control
+ Examples: True ModbusRTU to ModbusTCP Server bridge
Expand All @@ -60,7 +60,28 @@ For more information about Modbus see:
+ ModbusRTU: Add separate RE/DE pins control optional feature
+ API: Drop support of Ethernet library v1
+ Examples: Teknic ClearCore ArduinoWrapper examples added
+ Examples: ModbusTCP to ModbusRTU example added
+ ModbusRTU: Flush extra delay optional feature
// 4.0.0
+ Support of all Arduino boards
+ ModbusTLS: ESP8266 Client/Server and ESP32 Client
+ ModbusTCP: ModbusEthernet - WizNet W5x00, ENC28J60 Ethernet library support
+ 0x14 - Read File Records function
+ 0x15 - Write File Records function
+ Examples: FW update over Modbus fullfunctional example
+ 0x16 - Write Mask Register function+ Test: 0x16
+ 0x17 - Read/Write Registers function
+ ModbusRTU: ESP32 SoftwareSerial support
+ Build with no STL dependency (switchable)
+ API: ModbusIP => ModbusTCP
+ API: Access control callback for individual Modbus function
+ API: Master/Slave => Client/Server according to [PRESS RELEASE](https://modbus.org/docs/Client-ServerPR-07-2020-final.docx.pdf)
+ Lot of code refacting and small fixes
```

## Roadmap

```diff
// 4.2.0-DEV
- API: Alternative CRC calulation (reduced memory footprint)
- ModbusRTU: Static buffer allocation
Expand All @@ -82,23 +103,7 @@ For more information about Modbus see:
- API: Extend API to allow custom Modbus commands
- Examples: Basic file operations
- Examples: Revising
// 4.0.0
+ Support of all Arduino boards
+ ModbusTLS: ESP8266 Client/Server and ESP32 Client
+ ModbusTCP: ModbusEthernet - WizNet W5x00, ENC28J60 Ethernet library support
+ 0x14 - Read File Records function
+ 0x15 - Write File Records function
+ Examples: FW update over Modbus fullfunctional example
+ 0x16 - Write Mask Register function+ Test: 0x16
+ 0x17 - Read/Write Registers function
+ ModbusRTU: ESP32 SoftwareSerial support
+ Build with no STL dependency (switchable)
+ API: ModbusIP => ModbusTCP
+ API: Access control callback for individual Modbus function
+ API: Master/Slave => Client/Server according to [PRESS RELEASE](https://modbus.org/docs/Client-ServerPR-07-2020-final.docx.pdf)
+ Lot of code refacting and small fixes
```

## Contributions

https://github.com/emelianov/modbus-esp8266
Expand Down
2 changes: 1 addition & 1 deletion examples/Bridge/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Basic 'Bridge'. Indeed this sample pulling data from Modbus Server and stores it

Fullfunctional ModbusRTU to ModbusTCP bridge.

## [Multiple Server ID](MultipeServerID/MultipeServerID.ino)
## [Multiple Server ID](MultipleServerID/MultipleServerID.ino)

Respond for multiple ModbusRTU IDs from single device

Expand Down
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Examples of using callback functions.

Modbus file operations examples.

## [ModbusRTU to ModbusTCP bridge and related functions](bridge)
## [ModbusRTU to ModbusTCP bridge and related functions](Bridge)

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

Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=modbus-esp8266
version=4.1.0-RC1
version=4.1.0
author=Andre Sarmento Barbosa, Alexander Emelianov
maintainer=Alexander Emelianov<[email protected]>
sentence=Modbus Library for Arduino. ModbusRTU, ModbusTCP and ModbusTCP Security
Expand Down
6 changes: 3 additions & 3 deletions src/ModbusTCPTemplate.h
Original file line number Diff line number Diff line change
Expand Up @@ -387,9 +387,6 @@ uint16_t ModbusTCPTemplate<SERVER, CLIENT>::send(IPAddress ip, TAddress startreg
_MBAP.protocolId = __swap_16(0);
_MBAP.length = __swap_16(_len+1); //_len+1 for last byte from MBAP
_MBAP.unitId = unit;
transactionId++;
if (!transactionId)
transactionId = 1;
bool writeResult;
{ // for sbuf isolation
size_t send_len = _len + sizeof(_MBAP.raw);
Expand All @@ -413,6 +410,9 @@ uint16_t ModbusTCPTemplate<SERVER, CLIENT>::send(IPAddress ip, TAddress startreg
_frame = nullptr;
}
result = transactionId;
transactionId++;
if (!transactionId)
transactionId = 1;
cleanup:
free(_frame);
_frame = nullptr;
Expand Down

0 comments on commit 6600ea5

Please sign in to comment.