esp32-wifi-manager icon indicating copy to clipboard operation
esp32-wifi-manager copied to clipboard

idf 5.x support

Open huardti opened this issue 2 years ago • 5 comments

add the support for IDF 5.X

this patch also cleanup examples to remove compiler warning

huardti avatar Feb 20 '23 16:02 huardti

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"

BaktiyarBr avatar May 29 '23 05:05 BaktiyarBr

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 avatar Jul 29 '23 12:07 CJCombrink

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;
      |         ^~~~~~~~~~~~~~

CJCombrink avatar Jul 29 '23 16:07 CJCombrink

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.

Bognacy avatar Nov 04 '23 12:11 Bognacy

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...

huardti avatar Nov 04 '23 14:11 huardti