Commit Graph

126 Commits

Author SHA1 Message Date
David Cermak
6edd1be973 Examples/http-server: Make DNS server a simple configurable component 2023-06-07 08:46:24 +02:00
Rocha Euripedes
dc016f5987 Merge branch 'fix/mqtt_esp32h2_examples' into 'master'
protocols/examples: Disable Wifi connection if not supported

See merge request espressif/esp-idf!23970
2023-06-05 13:51:30 +08:00
Euripedes Rocha
4778d9b477 protocols/examples: Disable Wifi connection if not supported
- Disable Kconfig option for Wifi if not supported by the SoC
- Enable building mqtt examples when target is set to esp32h2
2023-05-30 13:26:45 +02:00
yuanjianmin
0b71dcc7ea example: Fix memory leak in ws_echo_server when httpd_queue_work failed
Closes https://github.com/espressif/esp-idf/issues/11507
2023-05-29 10:12:16 +00:00
Chip Weinberger
3824eba04d
feat(httpd): add support for asynchronous request handling
This commit adds support for handling multiple requests simultaneously by introducing two new functions: `httpd_req_async_handler_begin()` and `httpd_req_async_handler_complete()`. These functions allow creating an asynchronous copy of a request that can be used on a separate thread and marking the asynchronous request as completed, respectively.

Additionally, a new flag `for_async_req` has been added to the `httpd_sess_t` struct to indicate if a socket is being used for an asynchronous request and should not be purged from the LRU cache.

An example have been added to demonstrate the usage of these new functions.

Closes https://github.com/espressif/esp-idf/issues/10594

Signed-off-by: Harshit Malpani <harshit.malpani@espressif.com>
2023-05-19 10:05:42 +05:30
David Cermak
b2af4d9689 lwip/linux: Add lwip support for networking component under linux
linux/lwip: Wrap some IO posix functions
* to workaourd the FreeRTOS EINTR issue (when building without lwip)
* to correctly choose the sub-system based on fd (when building with
lwip) -- passing control to either linux/system or to lwip
This commit also addapts tapio-if to provide DHCP client by default and
configurable settings for static IP
2023-05-05 05:03:39 +00:00
Harshit Malpani
7f683f0996
Remove nvs_flash.h from protocols/linux_stubs 2023-03-31 16:42:06 +05:30
Harshit Malpani
345e38a3f0
Update http_server/simple example to build for Linux target 2023-03-31 16:42:06 +05:30
David Cermak
5f6cb31105 lwip: Support IPv6 only mode 2023-02-27 08:53:34 +01:00
Laukik Hase
167618d6a4
examples/protocols: Added URI encoding/decoding feature
- http_server/simple: Decoding received query
  - esp_http_client: Sending encoded query
2023-01-25 17:47:14 +05:30
Chen Yudong
c07d237ffe examples: enable build esp32c6 for wifi and network examples 2023-01-12 14:50:06 +08:00
Chen Yudong
8aca3932b0 CI: enable more wifi cases 2023-01-06 06:03:52 +00:00
Harshit Malpani
89a56392e3
esp_http_server: fix wrong context pointer in httpd_req_cleanup function
Added example which fails without the fix

Closes https://github.com/espressif/esp-idf/issues/10265
2022-12-16 14:40:37 +05:30
Laukik Hase
184c09ea81
protocols/security: Remove -Wno-format compile option for examples 2022-12-07 13:02:00 +05:30
simon.chupin
35dda59209 tools: remove the dependency on the future package 2022-08-09 16:46:58 +02:00
Ivan Grokhotkov
e596c84d49 build system: re-add -Wno-format as private flag for some example components 2022-08-03 16:42:47 +04:00
Chen Yudong
d54e1e8379 CI: make sure that reading of the ipv4 address has finished 2022-07-15 14:21:39 +08:00
Chen Yudong
2f75733ad7 CI: Improve common test methods
also fix ota test cases
2022-07-15 14:21:34 +08:00
Chen Yudong
692fbc169c CI: use ssid password from stdin for pytest cases 2022-07-15 01:16:36 +08:00
Chen Yudong
472ac26712 CI: update test cases to use different environment variables
change test environments
optimize asio udp server test
fix icmp echo test case
use ethernet_router env to run iperf test cases
2022-07-15 01:16:35 +08:00
Fu Hanxi
c0568611dd docs: changes docs supported targets tables 2022-07-14 08:26:32 +08:00
gabsuren
d413a71f61 mdns: Remove internal component, examples, test and docs 2022-06-29 17:30:34 +04:00
Harshit Malpani
83ace52a36 http examples pytest migration 2022-06-03 16:00:52 +05:30
Michael (XIAO Xufeng)
f7be540222 ci: partially enable example build for esp32c2 2022-06-02 14:17:31 +08:00
Djordje Nedic
facab8c5a7 tools: Increase the minimal supported CMake version to 3.16
This updates the minimal supported version of CMake to 3.16, which in turn enables us to use more CMake features and have a cleaner build system.
This is the version that provides most new features and also the one we use in our latest docker image for CI.
2022-06-01 06:35:02 +00:00
Harshit Malpani
2c56c6cad8 Updated coding style and added error logs 2022-05-11 08:58:01 +00:00
Nathan Phillips
e8e63a06e8 Don't ignore return value of httpd_stop 2022-05-11 08:58:01 +00:00
Erhan Kurubas
ad078c5153 semihosting: drop absolute path support 2022-05-05 09:12:42 +00:00
Mahavir Jain
55fd823001 Merge branch 'contrib/github_pr_8523' into 'master'
Removed unnecessary #include statement (GitHub PR)

Closes IDFGH-6903

See merge request espressif/esp-idf!17390
2022-03-08 16:13:08 +08:00
lukedukeus
469be7cc54
Removed unnecessary #include statement 2022-03-07 16:30:37 -05:00
Sudeep Mohanty
a9fda54d39 esp_hw_support/esp_system: Re-evaluate header inclusions and include directories
This commit updates the visibility of various header files and cleans up
some unnecessary inclusions. Also, this commit removes certain header
include paths which were maintained for backward compatibility.
2022-03-07 11:18:08 +05:30
Ivan Grokhotkov
c8d1737d57
examples: file_serving: add support for ESP32-S3, refactoring
* Move filesystem mounting code into a separate file to simplify the
  main source file.
* Clean up SDMMC and SDSPI related code. Move pin configuration into
  Kconfig.
* Use same base_path ('/data') for either SPIFFS or SD. Remove the
  check in file_server.c about the base path.
* Update README according to the changes above.
2022-03-03 21:43:37 +01:00
Yuan Jian Min
0c73f20afd docs: Add user-friendly guide about how to use ws_server_example_test.py
Closes https://github.com/espressif/esp-idf/issues/8060
2022-01-02 11:27:05 +00:00
Roland Dobai
766aa57084 Build & config: Remove leftover files from the unsupported "make" build system 2021-11-11 15:32:36 +01:00
Roland Dobai
9c1d4f5b54 Build & config: Remove the "make" build system
The "make" build system was deprecated in v4.0 in favor of idf.py
(cmake). The remaining support is removed in v5.0.
2021-11-10 09:53:53 +01:00
Fu Hanxi
923e862ed2 ci: temporarily disable s3 build for a few examples 2021-09-16 12:20:11 +08:00
Harshit Malpani
294b805f31 docs: Updated protocols/http* examples READMEs 2021-09-13 09:55:19 +05:30
David Cermak
008d677746 http_server: Fix docs for ws server user implementation
Closes https://github.com/espressif/esp-idf/issues/7027
2021-09-09 17:16:48 +08:00
Laukik Hase
dd3d27a03c Added Feature: Example for Captive Portal system.
Feature note: Sets up a simple DNS server that answers all questions with the ESP softAP's IP as well as a HTTP server which redirects all requests to a captive portal welcoming page.
Triggers captive portal detection (log-in screen popup) for iOS, Android and Windows.
Includes example test for testing DNS redirect and HTTP redirect.

Closes https://github.com/espressif/esp-idf/issues/7099
Closes https://github.com/espressif/esp-idf/issues/4075
2021-08-24 10:47:14 +05:30
morris
9e0c9e8551 restful_example: upgrade axios 2021-04-19 11:51:56 +08:00
Shubham Kulkarni
0a395134d4 Split example_tests with Example_WIFI tag group into Example_OTA and Example_Protocols 2021-04-15 04:00:06 +00:00
yuanjm
3874c20b5d esp_http_server: Fix examples parse ws keep-alive packet fail. 2021-03-16 09:55:02 +05:30
Aditya Patwardhan
d51c41d4c5 http_server/file_serving: Added example test
* Fixed unsused function warning
2021-03-16 09:55:01 +05:30
yuanjm
a1d5cfc260 example: Identify the callback whether is hanshake or frame-receive by req->method
Now the uri handler gets called immediately after the handshake. In the handler we can identify that this was the handshake by checking req->method as it is still a GET from the first part of the handshake the client has sent. On a normal websocket-frame-receive (when normally a websocket uriHandler gets called) this field is set to 0
Closes https://github.com/espressif/esp-idf/issues/6597
2021-03-09 07:32:15 +00:00
mjcross
03901946ba Explain how to fix 'httpd_parse: header too long'
Because this is the 'simple' server example, it is probably where users will start out to understand the HTTP Server API; and also where they might come if they are having problems.
So I think it is useful to explain to users what to do if they see "httpd_parse: parse_block: request URI/header too long", which can easily happen if they submit a POST from an HTML form (for example). That certainly would have helped me!

Merges https://github.com/espressif/esp-idf/pull/6547

Signed-off-by: Shubham Kulkarni <shubham.kulkarni@espressif.com>
2021-03-04 04:08:47 +00:00
yuanjm
cd521d4ae3 esp_http_server: support dynamic payload len for ws server
Closes https://github.com/espressif/esp-idf/issues/6433
2021-02-24 11:40:34 +00:00
Fu Hanxi
fc7b962e54 bugfix: fix http_server example sdkconfig file name 2021-02-22 15:50:52 +08:00
Liu Han
94512a76b7 example/http_server: add basic authenticated example to HTTP server
Closes https://github.com/espressif/esp-idf/issues/5646
2021-02-10 05:23:01 +00:00
Marius Vikhammer
04df1f3a42 CI: enable example builds for C3
Enables building C3 examples in CI.

Fixes related warnings/errors and disables examples that cannot run.
2021-02-09 12:04:02 +08:00
Fu Hanxi
0146f258d7 style: format python files with isort and double-quote-string-fixer 2021-01-26 10:49:01 +08:00