Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTU ModBus unexpected event triggered 0x02 / Timeout before any socket was ready! (IDFGH-14408) #88

Open
3 tasks done
sorinvn opened this issue Jan 12, 2025 · 3 comments

Comments

@sorinvn
Copy link

sorinvn commented Jan 12, 2025

Checklist

  • Checked the issue tracker for similar issues to ensure this is not a duplicate
  • Read the documentation to confirm the issue is not addressed there and your configuration is set correctly
  • Tested with the latest version to ensure the issue hasn't been fixed

How often does this bug occurs?

always

Expected behavior

I am using ESP32-C3 Modbus RTU with modbus version 2.0.1 for communication with Schneider iem3150 energy meter.
Every 3 seconds I get an " unexpected event triggered", nevertheless both reading and writing registers work fine.

Actual behavior (suspected bug)

Please see below error log (debug enabled). Timeout messages start to occur immediately after modbus initialization. Before any write or read operation, the error message is "unexpected event triggered 0x02", after performing a write operation the error message changes to "unexpected event triggered 0x40".

This error occurs aftert getting "transport_base: poll_read: select - Timeout before any socket was ready!" every second. From what see, this message is triggered by the TCP communication stack (?!) and is present both with Modbus TCP enabled or disabled in sdkconfig (only RTU is used).

Additionally (independent issue), the first write message also shows the behavior described in IDFGH-10848, nevertheless after retry the write operation is done correctly.

The issue is present with modbus v2.0 and 2.0.1. It was not present with v1.17.
This issue is not critical since both read and write are ok, so it looks like a nuisance message.

Error logs or terminal output

--- esp-idf-monitor 1.5.0 on /dev/cu.usbserial-1110 115200
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0x1 (POWERON),boot:0xf (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd5820,len:0x1574
load:0x403cc710,len:0xc30
load:0x403ce710,len:0x2f58
entry 0x403cc71a
I (30) boot: ESP-IDF v5.4-dirty 2nd stage bootloader
I (30) boot: compile time Jan 10 2025 18:21:17
I (30) boot: chip revision: v0.4
I (31) boot: efuse block revision: v1.3
I (34) boot.esp32c3: SPI Speed      : 80MHz
I (38) boot.esp32c3: SPI Mode       : DIO
I (42) boot.esp32c3: SPI Flash Size : 4MB
I (46) boot: Enabling RNG early entropy source...
I (50) boot: Partition Table:
I (53) boot: ## Label            Usage          Type ST Offset   Length
I (59) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (66) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (72) boot:  2 factory          factory app      00 00 00010000 00180000
I (79) boot: End of partition table
I (82) esp_image: segment 0: paddr=00010020 vaddr=3c0d0020 size=29eb0h (171696) map
I (117) esp_image: segment 1: paddr=00039ed8 vaddr=3fc94e00 size=02f48h ( 12104) load
I (119) esp_image: segment 2: paddr=0003ce28 vaddr=40380000 size=031f0h ( 12784) load
I (123) esp_image: segment 3: paddr=00040020 vaddr=42000020 size=c528ch (807564) map
I (257) esp_image: segment 4: paddr=001052b4 vaddr=403831f0 size=11b18h ( 72472) load
I (270) esp_image: segment 5: paddr=00116dd4 vaddr=50000200 size=0001ch (    28) load
I (277) boot: Loaded app from partition at offset 0x10000
I (277) boot: Disabling RNG early entropy source...
I (288) cpu_start: Unicore app
I (296) cpu_start: Pro cpu start user code
I (296) cpu_start: cpu freq: 160000000 Hz
I (296) app_init: Application information:
I (296) app_init: Project name:     iem3150
I (300) app_init: App version:      1
I (304) app_init: Compile time:     Jan 10 2025 18:21:23
I (309) app_init: ELF file SHA256:  8e3b0563b...
I (313) app_init: ESP-IDF:          v5.4-dirty
I (317) efuse_init: Min chip rev:     v0.3
I (321) efuse_init: Max chip rev:     v1.99 
I (325) efuse_init: Chip rev:         v0.4
I (329) heap_init: Initializing. RAM available for dynamic allocation:
I (335) heap_init: At 3FC9C7E0 len 00023820 (142 KiB): RAM
I (340) heap_init: At 3FCC0000 len 0001C710 (113 KiB): Retention RAM
I (346) heap_init: At 3FCDC710 len 00002950 (10 KiB): Retention RAM
I (352) heap_init: At 5000021C len 00001DCC (7 KiB): RTCRAM
I (359) spi_flash: detected chip: generic
I (361) spi_flash: flash io: dio
I (365) sleep_gpio: Configure to isolate all GPIO pins in sleep state
I (371) sleep_gpio: Enable automatic switching of GPIO sleep configuration
I (377) main_task: Started on CPU0
I (407) main_task: Calling app_main()
I (407) app_main: IDF version: v5.4-dirty
I (407) app_main: Free memory: 264380 bytes
V (407) partition: Loading the partition table
V (407) mmap: actual_mapped_len is 0x10000
V (407) calculated md5: 0x3fc9f3e8   f3 8a 8f 0b f0 2f c4 e6  3d 84 ec 4c 1b d1 0e e9  |...../..=..L....|
V (417) stored md5: 0x3c108070   f3 8a 8f 0b f0 2f c4 e6  3d 84 ec 4c 1b d1 0e e9  |...../..=..L....|
V (427) partition: Partition table MD5 verified


I (5507) uart: queue free spaces: 20
V (5507) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args
V (5517) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0xE
D (5517) intr_alloc: Connected src 22 to int 10 (cpu 0)
I (5527) mb_port.serial: mbm_rtu@0x3fcacafc, suspend port from task.
D (5527) mb_port.serial: created object @0x3fcace9c
D (5537) mb_port.timer: initialized mb_port.timer object @0x3fcac5f4
D (5547) mb_port.event: initialized object @0x3fcafd40
D (5547) mb_transp.rtu_master: created mb_transp.rtu_master object @0x3fcae0c4
D (5557) mb_object.master: created object mbm_rtu@0x3fcacafc
I (5557) app_iem3150_init: mbc_master_create_serial() = 0
D (5567) mb_port.serial: mbm_rtu@0x3fcacafc, resume port.
D (5567) mb_port.timer: D (5567) mb_port.timer: mbm_rtu@0x3fcacafc, timer stop, returns 259.
D (5577) mb_port.timer: timer mode: (0) triggered
mbm_rtu@0x3fcacafc, start timer (2000).
D (5587) mb_object.master: 0x3fcacafc:EV_READY
I (5637) app_iem3150_init: Modbus master stack initialized...

I (5867) main_task: Returned from app_main()

V (6857) transport_base: poll_read: select - Timeout before any socket was ready!
V (6857) transport_base: poll_read: select - Timeout before any socket was ready!
V (7867) transport_base: poll_read: select - Timeout before any socket was ready!
V (7867) transport_base: poll_read: select - Timeout before any socket was ready!

I (8467) sntp_callback: SNTP time set: Fri Jan 10 18:55:29 2025

D (8587) mb_port.event: mbm_rtu@0x3fcacafc, get event timeout.
E (8587) mb_object.master: 0x3fcacafc, unexpected event triggered 0x02.

V (8877) transport_base: poll_read: select - Timeout before any socket was ready!
V (8877) transport_base: poll_read: select - Timeout before any socket was ready!
V (9887) transport_base: poll_read: select - Timeout before any socket was ready!
V (9887) transport_base: poll_read: select - Timeout before any socket was ready!
V (10897) transport_base: poll_read: select - Timeout before any socket was ready!
V (10897) transport_base: poll_read: select - Timeout before any socket was ready!
D (11587) mb_port.event: mbm_rtu@0x3fcacafc, get event timeout.
E (11587) mb_object.master: 0x3fcacafc, unexpected event triggered 0x02.

V (11907) transport_base: poll_read: select - Timeout before any socket was ready!
V (11907) transport_base: poll_read: select - Timeout before any socket was ready!
V (12917) transport_base: poll_read: select - Timeout before any socket was ready!
V (12917) transport_base: poll_read: select - Timeout before any socket was ready!
V (13927) transport_base: poll_read: select - Timeout before any socket was ready!
V (13927) transport_base: poll_read: select - Timeout before any socket was ready!
D (14587) mb_port.event: mbm_rtu@0x3fcacafc, get event timeout.
E (14587) mb_object.master: 0x3fcacafc, unexpected event triggered 0x02.

[...]

V (33117) transport_base: poll_read: select - Timeout before any socket was ready!
V (33117) transport_base: poll_read: select - Timeout before any socket was ready!
V (34127) transport_base: poll_read: select - Timeout before any socket was ready!
V (34127) transport_base: poll_read: select - Timeout before any socket was ready!
V (35137) transport_base: poll_read: select - Timeout before any socket was ready!
V (35137) transport_base: poll_read: select - Timeout before any socket was ready!
D (35587) mb_port.event: mbm_rtu@0x3fcacafc, get event timeout.
E (35587) mb_object.master: 0x3fcacafc, unexpected event triggered 0x02.

I (35867) set_date_time_timer_callback: app_iem3150_set_date_time()
E (35867) app_iem3150_set_date_time: IEM3150 Set local time and date: Fri Jan 10 18:55:57 2025

D (35867) mb_port.event: mbm_rtu@0x3fcacafc, mb take resource, (300 ticks).
D (35877) mb_port.event: mbm_rtu@0x3fcacafc, mb take resource, (300 ticks).
D (35877) mbm_rtu@0x3fcacafc:MB_TRANSMIT: 10 14 81 00 09 12 03 eb 00 00 07 e9 00 01 00 0a
D (35887) mbm_rtu@0x3fcacafc:MB_TRANSMIT: 00 12 00 37 00 39 00 00
V (35897) mb_port.serial: mbm_rtu@0x3fcacafc: take RX semaphore (100 ticks).
D (35917) mb_port.serial: mbm_rtu@0x3fcacafc, tx buffer sent: (27) bytes.
D (35917) mbm_rtu@0x3fcacafc:PORT_SEND: 01 10 14 81 00 09 12 03 eb 00 00 07 e9 00 01 00
D (35917) mbm_rtu@0x3fcacafc:PORT_SEND: 0a 00 12 00 37 00 39 00 00 ef 4c
D (35927) mb_port.serial: mbm_rtu@0x3fcacafc, UART[1] event:
D (35927) mb_port.serial: mbm_rtu@0x3fcacafc, data event, len: 8.
D (35937) mb_port.timer: mbm_rtu@0x3fcacafc, respond enable timeout (1000).
D (35947) mb_object.master: 0x3fcacafc:EV_FRAME_SENT

V (36147) transport_base: poll_read: select - Timeout before any socket was ready!
V (36147) transport_base: poll_read: select - Timeout before any socket was ready!
V (37157) transport_base: poll_read: select - Timeout before any socket was ready!
V (37157) transport_base: poll_read: select - Timeout before any socket was ready!
V (38167) transport_base: poll_read: select - Timeout before any socket was ready!
V (38167) transport_base: poll_read: select - Timeout before any socket was ready!
E (38877) mb_port.event: mbm_rtu@0x3fcacafc, mb_port_event_wait_req_finish: incorrect event or timeout, rcv_event = 0x0
E (38877) MB_CONTROLLER_MASTER: mbc_master_send_request(166): Master send request failure error=(0x107) (ESP_ERR_TIMEOUT).

I (38887) app_iem3150_set_date_time: mbc_master_send_request() = 263
E (38887) app_iem3150_set_date_time: Data / time update failed
D (38897) mb_port.timer: mbm_rtu@0x3fcacafc, timer stop, returns 259.
W (38897) mb_transp.rtu_master: 0x3fcacafc:EV_ERROR_RESPOND_TIMEOUT
D (38907) mb_port.timer: timer mode: (1) triggered
D (38907) mb_object.master: 0x3fcacafc:EV_ERROR_PROCESS
D (38917) mb_port.timer: mbm_rtu@0x3fcacafc, timer stop, returns 259.
D (38917) mbm_error_cb_respond_timeout: 10 14 81 00 09 12 03 eb 00 00 07 e9 00 01 00 0a
D (38927) mbm_error_cb_respond_timeout: 00 12 00 37 00 39 00 00
D (38937) mb_object.master: 0x3fcacafc, transaction processing time(us) = 3031530
V (39177) transport_base: poll_read: select - Timeout before any socket was ready!
V (39177) transport_base: poll_read: select - Timeout before any socket was ready!
V (40187) transport_base: poll_read: select - Timeout before any socket was ready!
V (40187) transport_base: poll_read: select - Timeout before any socket was ready!
V (41197) transport_base: poll_read: select - Timeout before any socket was ready!
V (41197) transport_base: poll_read: select - Timeout before any socket was ready!
D (41947) mb_port.event: mbm_rtu@0x3fcacafc, get event timeout.
E (41947) mb_object.master: 0x3fcacafc, unexpected event triggered 0x40.

V (42207) transport_base: poll_read: select - Timeout before any socket was ready!
V (42207) transport_base: poll_read: select - Timeout before any socket was ready!
V (43217) transport_base: poll_read: select - Timeout before any socket was ready!
V (43217) transport_base: poll_read: select - Timeout before any socket was ready!
V (44227) transport_base: poll_read: select - Timeout before any socket was ready!
V (44227) transport_base: poll_read: select - Timeout before any socket was ready!
D (44947) mb_port.event: mbm_rtu@0x3fcacafc, get event timeout.
E (44947) mb_object.master: 0x3fcacafc, unexpected event triggered 0x40.

[....]

V (63417) transport_base: poll_read: select - Timeout before any socket was ready!
V (63417) transport_base: poll_read: select - Timeout before any socket was ready!
V (64427) transport_base: poll_read: select - Timeout before any socket was ready!
V (64427) transport_base: poll_read: select - Timeout before any socket was ready!
V (65437) transport_base: poll_read: select - Timeout before any socket was ready!
V (65437) transport_base: poll_read: select - Timeout before any socket was ready!
I (65867) set_date_time_timer_callback: app_iem3150_set_date_time()
E (65867) app_iem3150_set_date_time: IEM3150 Set local time and date: Fri Jan 10 18:56:27 2025

D (65867) mb_port.event: mbm_rtu@0x3fcacafc, mb take resource, (300 ticks).
D (65877) mb_port.event: mbm_rtu@0x3fcacafc, mb take resource, (300 ticks).
D (65877) mb_port.event: mbm_rtu@0x3fcacafc, mb_port_event_wait_req_finish: returned event = 0x80
E (65887) MB_CONTROLLER_MASTER: mbc_master_send_request(166): Master send request failure error=(0x107) (ESP_ERR_TIMEOUT).
I (65897) app_iem3150_set_date_time: mbc_master_send_request() = 263
E (65907) app_iem3150_set_date_time: Data / time update failed
D (65907) mbm_rtu@0x3fcacafc:MB_TRANSMIT: 10 14 81 00 09 12 03 eb 00 00 07 e9 00 01 00 0a
D (65917) mbm_rtu@0x3fcacafc:MB_TRANSMIT: 00 12 00 38 00 1b 00 00
V (65927) mb_port.serial: mbm_rtu@0x3fcacafc: take RX semaphore (100 ticks).
D (65947) mb_port.serial: mbm_rtu@0x3fcacafc, tx buffer sent: (27) bytes.
D (65947) mbm_rtu@0x3fcacafc:PORT_SEND: 01 10 14 81 00 09 12 03 eb 00 00 07 e9 00 01 00
D (65947) mbm_rtu@0x3fcacafc:PORT_SEND: 0a 00 12 00 38 00 1b 00 00 1b 47
D (65957) mb_port.timer: mbm_rtu@0x3fcacafc, respond enable timeout (1000).
D (65957) mb_port.serial: mbm_rtu@0x3fcacafc, UART[1] event:
D (65967) mb_port.serial: mbm_rtu@0x3fcacafc, data event, len: 8.
D (65977) mb_port.serial: mbm_rtu@0x3fcacafc, frame 8 bytes is ready.
D (65977) mb_object.master: 0x3fcacafc:EV_FRAME_SENT
D (65987) mb_object.master: 0x3fcacafc:EV_FRAME_RECEIVED
V (65987) mb_port.serial: mbm_rtu@0x3fcacafc: take RX semaphore (100 ticks).
D (65997) mb_port.serial: mbm_rtu@0x3fcacafc, received data: 8 bytes.
D (66007) mbm_rtu@0x3fcacafc:PORT_RECV: 01 10 14 81 00 09 55 d7
D (66007) mb_port.serial: mbm_rtu@0x3fcacafc, serial processing time[us] = 40585
D (66017) mb_object.master: 0x3fcacafc, frame data received successfully, (0).
D (66027) mbm_rtu@0x3fcacafc:MB_RECV: 10 14 81 00 09
D (66027) mb_object.master: 0x3fcacafc:EV_EXECUTE
D (66037) mb_object.master: 0x3fcacafc, set event EV_ERROR_OK
D (66037) mb_object.master: 0x3fcacafc:EV_ERROR_PROCESS
D (66047) mb_port.timer: mbm_rtu@0x3fcacafc, timer stop, returns 259.
D (66047) mbm_error_cb_request_success: 10 14 81 00 09 12 00 01 00 00 e3 b8 3f c9 00 04
D (66057) mbm_error_cb_request_success: 00 00 00 00 00 00 20 00
D (66067) mb_object.master: 0x3fcacafc, transaction processing time(us) = 159187

V (66447) transport_base: poll_read: select - Timeout before any socket was ready!
V (66447) transport_base: poll_read: select - Timeout before any socket was ready!
V (67457) transport_base: poll_read: select - Timeout before any socket was ready!
V (67457) transport_base: poll_read: select - Timeout before any socket was ready!
V (68467) transport_base: poll_read: select - Timeout before any socket was ready!
V (68467) transport_base: poll_read: select - Timeout before any socket was ready!
D (69067) mb_port.event: mbm_rtu@0x3fcacafc, get event timeout.
E (69067) mb_object.master: 0x3fcacafc, unexpected event triggered 0x40.

V (69477) transport_base: poll_read: select - Timeout before any socket was ready!
V (69477) transport_base: poll_read: select - Timeout before any socket was ready!
V (70487) transport_base: poll_read: select - Timeout before any socket was ready!
V (70487) transport_base: poll_read: select - Timeout before any socket was ready!

Steps to reproduce the behavior

Below are the modbus init and write procedures:

void app_iem3150_set_date_time(void *arg) {
time_t time_raw;
struct tm *time_info;
time( &time_raw );
time_info = localtime( &time_raw );
ESP_LOGE(func, "IEM3150 Set local time and date: %s", asctime(time_info));

esp_err_t err = ESP_OK;

mb_param_request_t request_type = {
	.slave_addr = 1,
	.command 	= 16,
	.reg_start 	= 0x1481,
	.reg_size 	= 9
};

uint16_t date_time[9];
date_time[0] = 1003;		
date_time[1] = 0;
date_time[2] = time_info->tm_year + 1900;
date_time[3] = time_info->tm_mon + 1;
date_time[4] = time_info->tm_mday;
date_time[5] = time_info->tm_hour;
date_time[6] = time_info->tm_min;
date_time[7] = time_info->tm_sec;
date_time[8] = 0;		

err = mbc_master_send_request(master_handle, &request_type, &date_time);
ESP_LOGI(__func__, "mbc_master_send_request() = %d", err);

if (err != ESP_OK) {
	ESP_LOGE(__func__, "Data / time update failed");
}

}

esp_err_t app_iem3150_init(void)
{
// Initialize and start Modbus controller
mb_communication_info_t comm = {
.ser_opts.port = MB_PORT_NUM,
.ser_opts.mode = MB_RTU,
.ser_opts.baudrate = MB_UART_SPEED,
.ser_opts.parity = MB_PARITY_NONE,
.ser_opts.uid = 0,
.ser_opts.response_tout_ms = 1000,
.ser_opts.data_bits = UART_DATA_8_BITS,
.ser_opts.stop_bits = UART_STOP_BITS_1
};

esp_err_t err = mbc_master_create_serial(&comm, &master_handle);
MB_RETURN_ON_FALSE((master_handle != NULL), ESP_ERR_INVALID_STATE, __func__, "mb controller initialization fail.");
MB_RETURN_ON_FALSE((err == ESP_OK), ESP_ERR_INVALID_STATE, __func__, "mb controller initialization fail, returns(0x%x).", (int)err);

// Set UART pin numbers
err = uart_set_pin(MB_PORT_NUM, MB_UART_TXD, MB_UART_RXD, MB_UART_RTS, MB_UART_CTS);
MB_RETURN_ON_FALSE((err == ESP_OK), ESP_ERR_INVALID_STATE, __func__, "mb serial set pin failure, uart_set_pin() returned (0x%x).", (int)err);

err = mbc_master_start(master_handle);
MB_RETURN_ON_FALSE((err == ESP_OK), ESP_ERR_INVALID_STATE, __func__, "mb controller start fail, returned (0x%x).", (int)err);

// Set driver mode to Half Duplex
err = uart_set_mode(MB_PORT_NUM, UART_MODE_RS485_HALF_DUPLEX);
MB_RETURN_ON_FALSE((err == ESP_OK), ESP_ERR_INVALID_STATE, __func__, "mb serial set mode failure, uart_set_mode() returned (0x%x).", (int)err);

vTaskDelay(5);
err = mbc_master_set_descriptor(master_handle, &device_parameters[0], num_device_parameters);
MB_RETURN_ON_FALSE((err == ESP_OK), ESP_ERR_INVALID_STATE, __func__, "mb controller set descriptor fail, returns(0x%x).", (int)err);

ESP_LOGI(__func__, "Modbus master stack initialized...");
return err;

}

Project release version

v2.0.1

System architecture

ARM 64-bit (Apple M1/M2, Raspberry Pi 4/5)

Operating system

MacOS

Operating system version

macos 15.2

Shell

ZSH

Additional context

IDF 5.3.2 or 5.4

@github-actions github-actions bot changed the title RTU ModBus unexpected event triggered 0x02 / Timeout before any socket was ready! RTU ModBus unexpected event triggered 0x02 / Timeout before any socket was ready! (IDFGH-14408) Jan 12, 2025
@alisitsyn
Copy link
Collaborator

Hi @sorinvn,

Thank you for this report.

This error occurs aftert getting "transport_base: poll_read: select - Timeout before any socket was ready!" every second. From what see, this message is triggered by the TCP communication stack (?!) and is present both with Modbus TCP enabled or disabled in sdkconfig (only RTU is used).

The message transport_base: poll_read: select - Timeout before any socket was ready! in your log is not related to the Modbus TCP stack but comes from tcp_transport component used in your other application code. Please let me know what component is used in your application (is it MQTT client)? According to the log I can guess that this component has a task on the same core with the priority higher than the Modbus task and it prevents Modbus task to trigger for longer than 1 second. This causes the Modbus events to expire. You should modify your TCP task to allow the Modbus task to trigger. Please modify the tasks sequence or configure the priorities of the active objects in your project properly to allow Modbus task to trigger. The kconfig value CONFIG_FMB_PORT_TASK_PRIO should be configured according to priorities of your other tasks.

Please provide more information on what kind of additional components are used and priorities of the tasks in your application. Also, please include extended Modbus log and sdkconfig file.

Additionally (independent issue), the first write message also shows the behavior described in IDFGH-10848, nevertheless after retry the write operation is done correctly.

The issue is present with modbus v2.0 and 2.0.1. It was not present with v1.17.
This issue is not critical since both read and write are ok, so it looks like a nuisance message.

The v1.0.17 contains the commit which fixes the mbc_master_send_request() issue. Unfortunately, I could not backport all the fixes for v2.0.1 and will update it as soon as possible.

@alisitsyn alisitsyn self-assigned this Jan 13, 2025
@sorinvn
Copy link
Author

sorinvn commented Jan 13, 2025

Hello Alex, thanks for your prompt reply.
I'm using indeed mqtt and sntp.
Attached are the full log and sdkconfig file.
sdkconfig.txt
log.txt

noted your comment re mbc_master_send_request.
One additional clarification, when I said these were not present in 1.17, I ment the unexpected event triggered was not present.

@alisitsyn
Copy link
Collaborator

alisitsyn commented Jan 13, 2025

@sorinvn ,

'm using indeed mqtt and sntp.
Attached are the full log and sdkconfig file.

Thank you for the feedback.

One additional clarification, when I said these were not present in 1.17, I ment the unexpected event triggered was not present.

Thanks for the clarification I will take a look to it as soon as I can. For now please try to follow the above recommendations to optimize your system to not block the Modbus for long time and let me know if you have any updates.

UPDATE: the error happens because the Modbus can not get the events after timeout.

D (8587) mb_port.event: mbm_rtu@0x3fcacafc, get event timeout.
E (8587) mb_object.master: 0x3fcacafc, unexpected event triggered 0x02.

This message can be caused due to rare communication and expected. The verbosity of this message will be changed to debug later. Also, the debug messages will not be showed by default in the log.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants