Closed ChenYuWuAi closed 2 months ago
@ChenYuWuAi Could you provide the code which can reproduce the issue? I modified the get-started code at the attachment
esp_now_init.zip as you declared, but can't reproduce g_recv_handle[0].enable is always false
.
The g_recv_handle[i].enable
value as follows:
I (614) espnow: espnow_init 1059 0, 1
I (614) espnow: espnow_init 1059 1, 1
I (624) espnow: espnow_init 1059 2, 1
I (624) espnow: espnow_init 1059 3, 0
I (634) espnow: espnow_init 1059 4, 0
I (634) espnow: espnow_init 1059 5, 0
I (634) espnow: espnow_init 1059 6, 0
I (644) espnow: espnow_init 1059 7, 0
I (644) espnow: espnow_init 1059 8, 0
I (654) espnow: espnow_init 1059 9, 0
I (654) espnow: espnow_init 1059 10, 0
I (664) espnow: espnow_init 1059 11, 0
I (664) espnow: espnow_init 1059 12, 0
I (664) espnow: espnow_init 1059 13, 0
I (674) espnow: espnow_init 1059 14, 0
@ChenYuWuAi Closing this issue since there has been no update on this. Please feel free to reopen if required.
I met problems when sending packet with ack enabled: I received ESP_WIFI_TIMEOUT every time when I called espnow_send function. After looking back into the library, I found bug when declaring the espnow_config struct.
I declared the config struct like
In the library, it init ack queues using a struct called g_recv_handle. However g_recv_handle[0].enable is always false because in the code:
The config struct isn't aligned to 1. So using:
which is in
espnow.h
I solved the problem.