logo elektroda
logo elektroda
X
logo elektroda

Creating a web page on the ESP32 as a softAP with POST and GET methods - IDF

dondu 1113 12
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 19187525
    dondu
    Moderator on vacation ...
    Hi,

    I don't work much on ESP32, but I have a project behind me working as a web page controlling relays. The ESP32 is connected via wifi to a router.

    I have also run the softAP example, it works, you can connect to it.

    Now I need to put up a softAP that generates its own web page, which I can connect to via Wifi and pass it data via POST or GET methods and get a response.

    I can't find an example of such a solution for IDF, hence the request for hints.

    For the uninitiated in IDF ... it is not about Arduino examples :) .
  • ADVERTISEMENT
  • ADVERTISEMENT
  • #3 19187967
    dondu
    Moderator on vacation ...
    Thank you, but I have a problem.
    There are softAP and station folders in the esp-idf\exampleswifigetting_started folder.
    I copied the softAP to the softAP_dd folder and in the esp-idf\examples\wifigetting_started\softAP_dd\main_softap_example_main.c file
    I have replaced the program code with the one indicated by you.

    Unfortunately at compile time I get, the error I have included in the attachment (the electrode form does not want to accept it). What could be the cause?
  • #4 19188010
    khoam
    Level 42  
    I'll take a guess: remove the static qualifier from the launchSoftAp() function.
  • Helpful post
    #5 19192052
    faber
    Level 24  
    Or this change to softAP_dd messed up the paths.
    Makefile: PROJECT_NAME := wifi_softAP ?? to wifi_softAP_dd ??
  • #6 19192477
    dondu
    Moderator on vacation ...
    faber wrote:
    Or this change to softAP_dd messed up the paths.
    Makefile: PROJECT_NAME := wifi_softAP ?? to wifi_softAP_dd ??
    .
    Yes, I think that was the problem, although the swap itself didn't help. But when I made a new folder again with the contents of the example and renamed the project in the makefiles, this time it compiled correctly.

    However, there are warnings about outdated functions used in the example pointed out by khoam. I will check in the documentation.
  • ADVERTISEMENT
  • #8 19192674
    khoam
    Level 42  
    dondu wrote:
    There are, however, warnings about obsolete functions used in the example pointed out by khoam.
    .
    You have not stated which version of ESP-IDF you are using, only:
    dondu wrote:
    For the uninitiated in IDF .... it is not about Arduino examples
    .

    As of version 4.1, ESP-NETIF is used to support the TCP/IP stack.
  • ADVERTISEMENT
  • #9 19192890
    dondu
    Moderator on vacation ...
    Note on arduino to sift out such hints.

    Actually I did not specify - installed about 2 months ago + Visual Studio Code. How do you check the version after installation?
  • Helpful post
    #10 19192912
    khoam
    Level 42  
    In the file esp-idf/components/esp_common/include/esp_idf_version.h
  • #11 19192972
    dondu
    Moderator on vacation ...
    Thanks. 4.3.0
    I will write when I have problems with the change to ESP-NETIF.
  • #13 19193072
    dondu
    Moderator on vacation ...
    OK, I wasn't the one installing on this computer. Thanks for pointing it out.

Topic summary

The discussion revolves around creating a web page on the ESP32 configured as a softAP, allowing data transmission via POST and GET methods using the ESP-IDF framework. The user initially faced issues compiling a modified example from the ESP-IDF softAP directory. Suggestions included removing the static qualifier from the launchSoftAp() function and ensuring the Makefile project name was correctly updated. The user later resolved compilation issues by creating a new folder and renaming the project in the Makefiles. They also encountered warnings regarding outdated functions and were directed to the ESP-IDF documentation for updates. The user confirmed using ESP-IDF version 4.3.0, which is not yet stable, while the last official release is version 4.2.
Summary generated by the language model.
ADVERTISEMENT