Skip to content

Espressif 32 v6.10.0 and esp_now_recv_info_t (ESP-IDF - v5.4.0) about. #4262

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

Open
chernyykot opened this issue Mar 4, 2025 · 0 comments
Open

Comments

@chernyykot
Copy link

Thanks for big and important project and platform. I used and tested first time today :) and I very loved and now I have decided to abandon the Arduino IDE interface and use this platform with VS Code, This platform is much more impressive and effective. Thanks again!

I tested build for my esp now protocol. But I'm very confused about something.

Because, Espressif 32 version: 6.10.0 Release Notes saying: Added support for ESP-IDF v5.4 ([release notes](https://github.com/espressif/esp-idf/releases/tag/v5.4))

But espressif v5.4 referance page diffent for esp_now_recv_info_t
source: https://docs.espressif.com/projects/esp-idf/en/v5.4/esp32/api-reference/network/esp_now.html?highlight=esp_now_recv_info_t#_CPPv419esp_now_recv_info_t

For issue for this platform behavior of this updated function (ESP-IDF - v5.4.0);

 void OnDataRecv(const esp_now_recv_info_t *info, const uint8_t *incomingData, int len) { ..... }

Terminal output

....
....
....
Compiling .pio\build\esp32dev\FrameworkArduino\FirmwareMSC.cpp.o
Compiling .pio\build\esp32dev\FrameworkArduino\FunctionalInterrupt.cpp.o
src/main.cpp:32:23: error: 'esp_now_recv_info_t' does not name a type; did you mean 'esp_now_peer_info_t'?
 void OnDataRecv(const esp_now_recv_info_t *info, const uint8_t *incomingData, int len) {
                       ^~~~~~~~~~~~~~~~~~~
                       esp_now_peer_info_t
src/main.cpp: In function 'void initESP_NOW()':
src/main.cpp:83:28: error: invalid conversion from 'void (*)(const int*, const uint8_t*, int)' {aka 'void (*)(const int*, const unsigned char*, int)'} to 'esp_now_recv_cb_t' {aka 'void (*)(const unsigned char*, const unsigned char*, int)'} [-fpermissive]
   esp_now_register_recv_cb(OnDataRecv); // Alma callback'ini kaydet
                            ^~~~~~~~~~
In file included from src/main.cpp:1:
C:/Users/<....>/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/esp_wifi/include/esp_now.h:136:54: note:   initializing argument 1 of 'esp_err_t esp_now_register_recv_cb(esp_now_recv_cb_t)'
 esp_err_t esp_now_register_recv_cb(esp_now_recv_cb_t cb);
                                    ~~~~~~~~~~~~~~~~~~^~
*** [.pio\build\esp32dev\src\main.cpp.o] Error 1
  • Its not possible build if with this use. But I think this usage is correct because it is compiled on the current version Arduino IDE platform.

And I tested to compare; for example old version use for this function behaivor on current version Ardunio IDE platform not compiling.

void OnDataRecv(const uint8_t * mac_addr, const uint8_t *incomingData, int len) { .... }
  • But interesting, this compiling on PlatformIO but PlatformIO v6.10.0 says Added support for ESP-IDF v5.4

This is my first time using this platform, so maybe there are things I don't understand or I made mistakes, really I don't know. But only according to the Release Notes, I think this function should be compilable.

Thank you again for this impressive and wonderful platform and it is so easy and beautiful to use. My heart is with you! With my best wishes and regards!

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

No branches or pull requests

1 participant