tonyp7 / esp32-wifi-manager

Captive Portal for ESP32 that can connect to a saved wireless network or start an access point where you can connect to existing wifis.
MIT License
664 stars 217 forks source link

Suggestions #43

Closed JoaoLopesF closed 4 years ago

JoaoLopesF commented 5 years ago

First of all, congrats to excellent coding on ESP-IDF, this is awesome ;-).

I have a few suggestions:

Best regards

ojousima commented 5 years ago

👍 for making the project as a component. I structured this project into a component a while ago, https://github.com/ojousima/esp32-wifi-manager, however I'll only update it when I happen to be working on my main project. I'd be happy to collaborate somehow in an effort of making maintained component of the project.

JoaoLopesF commented 5 years ago

Hi @ojousima I will look your repo, congrats for you work Regards

tonyp7 commented 5 years ago

Hello guys, Can someone point me to the right direction as to what "making it into a component" entails? Is that similar to a DLL?

@JoaoLopesF on the remaining two comments:

ojousima commented 5 years ago

Can someone point me to the right direction as to what "making it into a component" entails? Is that similar to a DLL?

It's a bit different, while DLLs are precompiled the ESP components have the source and will be compiled along with the rest of the project. ESP build system documentation has more details.

I'm a beginner on ESP myself, but according to docs

A component is any directory that contains a component.mk file

What I did was to lift the project files from main folder to the root of project and add a include folder which contains headers which must be seen by the rest of the project: dns_server.h for dns_server(), http_server.h for http_server() as well as wifi_manager.h for wifi_manager(), wifi_manager_set_on_connected() and wifi_manager_set_on_disconnected().

Case in point about keeping my component updated, I'd need to use wifi_manager_set_callback()

Once the component was done, I added it as a git submodule under my project and started the tasks in main.c.

JoaoLopesF commented 5 years ago

HI @tonyp7 and @ojousima, complementing @ojousima explanation:

aapris commented 5 years ago
  • I am planning to implement a ~30s timer once the wifi is connected that will automatically shutdown the AP. It was supposed to be part of release 2.0 but didn't make the cut.

This would be very useful feature. Do you have any estimate when it could be ready?

trombik commented 5 years ago

50 has been merged and the library can be imported as an esp-idf component.

tonyp7 commented 4 years ago

Hello,

I consider this closed: