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

idf 5.x support #153

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

huardti
Copy link

@huardti huardti commented Feb 20, 2023

add the support for IDF 5.X

this patch also cleanup examples to remove compiler warning

remove errors due to idf v5.x

add idf generated files to gitignore

this commit also create a new section in the
gitignore for the esp idf files
@BaktiyarBr
Copy link

hello I still have a problem when building the project
i added your commit to components and added it to cmakelist
I just begin studying IDF and cant solve it on my own please help me if its possible
"[0/1] Re-running CMake...
-- Building ESP-IDF components for target esp32
CMake Error at D:/ESP-IDF/tools/cmake/build.cmake:245 (message):
Failed to resolve component 'mdns'.
Call Stack (most recent call first):
D:/ESP-IDF/tools/cmake/build.cmake:281 (__build_resolve_and_add_req)
D:/ESP-IDF/tools/cmake/build.cmake:574 (__build_expand_requirements)
D:/ESP-IDF/tools/cmake/project.cmake:440 (idf_build_process)
CMakeLists.txt:8 (project)

-- Configuring incomplete, errors occurred!
See also "D:/ESP-IDF/Projects/sample_project/build/CMakeFiles/CMakeOutput.log".
←[31mFAILED: ←[0mbuild.ninja
D:.espressif\tools\cmake\3.24.0\bin\cmake.exe --regenerate-during-build -SD:\ESP-IDF\Projects\sample_project -BD:\ESP-IDF\Projects\sample_project\build
ninja: error: rebuilding 'build.ninja': subcommand failed"

@CJCombrink
Copy link

CJCombrink commented Jul 29, 2023

I can maybe suggest to update the readme to state that when using this component in your own project to add the following to your own idf_component.yml:

dependencies:
  mdns: ">=1.0.3"
  esp32-wifi-manager:
    # Using the fork since it has idf 5 support
    version: huardti/idf-5.X-support
    git: https://github.com/huardti/esp32-wifi-manager.git

It would be first prize if this can be set by this base component but I do not know enough of IDF to know if this is possible

@CJCombrink
Copy link

Can I ask that you add the following include in wifi_manager.h

#include <esp_wifi.h>

If I change the include order in my app I cant compile anymore due to this include missing:

C:/.../managed_components/esp32-wifi-manager/src/wifi_manager.h:252:9: error: unknown type name 'wifi_bandwidth_t'
  252 |         wifi_bandwidth_t ap_bandwidth;
      |         ^~~~~~~~~~~~~~~~
C:/.../managed_components/esp32-wifi-manager/src/wifi_manager.h:254:9: error: unknown type name 'wifi_ps_type_t'
  254 |         wifi_ps_type_t sta_power_save;
      |         ^~~~~~~~~~~~~~

@Bognacy
Copy link

Bognacy commented Nov 4, 2023

Can I ask that you add the following include in wifi_manager.h

#include <esp_wifi.h>

If I change the include order in my app I cant compile anymore due to this include missing:

C:/.../managed_components/esp32-wifi-manager/src/wifi_manager.h:252:9: error: unknown type name 'wifi_bandwidth_t'
  252 |         wifi_bandwidth_t ap_bandwidth;
      |         ^~~~~~~~~~~~~~~~
C:/.../managed_components/esp32-wifi-manager/src/wifi_manager.h:254:9: error: unknown type name 'wifi_ps_type_t'
  254 |         wifi_ps_type_t sta_power_save;
      |         ^~~~~~~~~~~~~~

You have to download mDNS component (https://github.com/espressif/esp-protocols/tree/master).
Copy mdns folder to components in your project or add it with wizard when creating project.
Finaly add #include <mdns.h> to wifi_menager.h and it's start working.

@huardti
Copy link
Author

huardti commented Nov 4, 2023

If you want to make some changes to this PR you can submit your commit in my fork. this repo don't seems active anymore...

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

Successfully merging this pull request may close these issues.

4 participants