Page 1 of 1

ESP Now Send CB not called

Posted: Wed Feb 20, 2019 5:25 pm
by kython
I have 2 ESP32s talking using ESPNOW. I started running into send errors by trying to send data to quickly. I started following the advice in your documentation to wait for the send cb to be called before sending the next packet.
So, it is recommended that sending the next ESP-NOW data after the sending callback function of previous sending has returned.
Occasionally the send cb is not being called which causes a lockup. I can mitigate this problem with a timeout if need be but it seems as though the call back should be called.

Code: Select all

esp_now_send
is being called from more than one task.

Is

Code: Select all

esp_now_send
thread/task safe?
Is there a known scenario that would cause the send cb to not be called?

Re: ESP Now Send CB not called

Posted: Mon Mar 18, 2019 3:35 am
by littlesky
kython wrote:
Wed Feb 20, 2019 5:25 pm
I have 2 ESP32s talking using ESPNOW. I started running into send errors by trying to send data to quickly. I started following the advice in your documentation to wait for the send cb to be called before sending the next packet.
So, it is recommended that sending the next ESP-NOW data after the sending callback function of previous sending has returned.
Occasionally the send cb is not being called which causes a lockup. I can mitigate this problem with a timeout if need be but it seems as though the call back should be called.

Code: Select all

esp_now_send
is being called from more than one task.

Is

Code: Select all

esp_now_send
thread/task safe?
Is there a known scenario that would cause the send cb to not be called?
Did you check the return value of esp_now_send?