I’m a newbie to this forum. Please forgive if I have not submitted this properly.
Is there a list of changes and potential problems introduced with the 3.0.0 upgrade? Code I borrowed from Rui Santos’s book using ESP_NOW will no longer compile.
This line:
esp_now_register_recv_cb(OnDataRecv);
causes this error:
Compilation error: invalid conversion from ‘void (*)(const uint8_t*, const uint8_t*, int)’ {aka ‘void (*)(const unsigned char*, const unsigned char*, int)’} to ‘esp_now_recv_cb_t’ {aka ‘void (*)(const esp_now_recv_info*, const unsigned char*, int)’} [-fpermissive]
I found the definition of esp_now_recv_info in esp_now.h:
typedef struct esp_now_recv_info {
uint8_t * src_addr; /**< Source address of ESPNOW packet */
uint8_t * des_addr; /**< Destination address of ESPNOW packet */
wifi_pkt_rx_ctrl_t * rx_ctrl; /**< Rx control info of ESPNOW packet */
} esp_now_recv_info_t;
I can figure out the src_addr and the des_addr, but I don't know what the Rx control info of ESPNOW packet is.
Hi.
Yes.
There were breaking changes from ESP32 version 2 to version 3.
Your issue is probably because of the update.
We didn’t have the time to update our codes yet.
While we haven’t fixed the codes, you can downgrade your board installation.
Or you can try to figure out what might have changed. More information here: https://docs.espressif.com/projects/arduino-esp32/en/latest/migration_guides/2.x_to_3.0.htm
Regards,
Sara
Thanks Sara. Downgrading to 2.0.17 did indeed resolve the problems I was having. I appreciate the rapid response to my question and I appreciate the wealth of information in Rui’s books. I expect to purchase more in the future.
Don Chapman