Tasmota/tasmota
Damian Wrobel bf0f7316b9
Avoid sending more then one Modbus TCP response (#22223)
Prevent from sending more then one Modbus TCP response
for a single request.

This might happen in the following scenario where,
shortly after the first response has been sent (4),
the second one will be send (8) (note the same
'TransactionId') triggered by the response to the
'ModbusSend' request issued by Berry (5).

The log excerpt from such a situation:

(1) 21:13:20.510 MBS: MBRTCP to Modbus TransactionId:520, deviceAddress:4, functionCode:3, startAddress:8193, count:1, recvCount:1, recvBytes:2
(2) 21:13:20.523 MBS: Serial Send: 04 03 20 01 00 01 DE 5F
(3) 21:13:20.647 MBS: Serial Received: 04 03 02 0A 28 72 FA
(4) 21:13:20.652 MBS: MBRTCP from Modbus TransactionId:520, deviceAddress:4, writing:11 bytes to client (error:0)
(5) 21:13:20.724 CMD: Grp 0, Cmd 'MODBUSSEND', Idx 1, Len 89, Pld -99, Data '{"deviceAddress":4, "functionCode":6, "startAddress":8192, "type":"uint16", "Values":[6]}'
(6) 21:13:20.743 MBS: Serial Send: 04 06 20 00 00 06 02 5D
(7) 21:13:21.009 MBS: Serial Received: 04 06 20 00 00 06 02 5D
(8) 21:13:21.014 MBS: MBRTCP from Modbus TransactionId:520, deviceAddress:4, writing:12 bytes to client (error:0)

Use 'tcp_transaction_id' field to denote that we already
sent a response.

Signed-off-by: Damian Wrobel <dwrobel@ertelnet.rybnik.pl>
2024-10-02 21:34:48 +02:00
..
berry Zigbee fix flashing CC2562P with latest firmware (#22117) 2024-09-09 21:56:18 +02:00
displaydesc add support for 4.2 inch epaper display from WeAct Studio (partial up… (#21717) 2024-07-08 17:25:06 +02:00
energy_modbus_configs Add entry for Growatt 12KTL-3S (#18898) 2023-06-18 20:26:42 +02:00
html_compressed Remove dash from GUI title 2024-08-26 14:20:51 +02:00
html_uncompressed Remove dash from GUI title 2024-08-26 14:20:51 +02:00
include Bump version 14.2.0.6 2024-09-26 17:38:49 +02:00
language Update changelogs 2024-09-20 12:01:15 +02:00
lvgl_berry LVGL Added OpenHASP icons to font montserrat-28 (#22048) 2024-08-29 16:57:01 +02:00
tasmota_support Final fix unknown/error 2024-09-21 13:23:14 +02:00
tasmota_xdrv_driver Avoid sending more then one Modbus TCP response (#22223) 2024-10-02 21:34:48 +02:00
tasmota_xdsp_display Minor refactor I2C 2024-09-15 15:16:18 +02:00
tasmota_xlgt_light Remove non IDF5 code 2024-05-15 16:45:42 +02:00
tasmota_xnrg_energy Fix BL906 name (#22167) 2024-09-29 14:30:54 +02:00
tasmota_xsns_sensor Add ESP8266 support for one-wire M1601 temperature sensor on DS18x20 GPIO (#21376) 2024-09-25 15:01:19 +02:00
tasmota_xx2c_global Add ESP8266 experimental support for second I2C bus 2024-09-19 14:47:18 +02:00
zigbee Zigbee DIYRuZ_Geiger (#19151) 2023-07-19 20:41:49 +02:00
CMakeLists.txt arduino idf compile prepare 2024-09-21 23:36:37 +02:00
my_user_config.h LVGL compilation of lv_menu (#22188) 2024-09-23 10:26:23 +02:00
tasmota.ino Add ESP8266 experimental support for second I2C bus 2024-09-19 14:47:18 +02:00
user_config_override_sample.h Support for second DNS server 2021-07-29 16:57:04 +02:00