Commit Graph

502 Commits

Author SHA1 Message Date
Marius Vikhammer
9fc771ad1b CI: change icmp example test address
Use a server that is inside the great firewall of china for CI test.
This avoid issues due to proxies, network configs etc.
2020-12-28 10:07:00 +08:00
David Cermak
55d41c3377 esp_modem: Fixed race condition on exiting PPP mode
esp_modem_stop_ppp() stops both ppp netif and switches the modem back to
command mode. IF these two actions are not synchronised, we might
experience issues of
* active PPP session trying to send/receive uart-data
* command mode already active before modem switched to it
both resulting in crashes.
Fixed by introducing the transition mode and running these actions in sequence
* set esp-modem to transition mode
* enter command mode, wait for the reply or re-sync
* close the PPP netif
* wait until the netif closes
Other fixes include ignoring certain events if modem component not ready
or not in appropriate mode:
* ignoring all UART events comming from DTE with no DCE attached
* ignore pattern detection in PPP mode

Closes https://github.com/espressif/esp-idf/issues/6013
Closes https://github.com/espressif/esp-idf/issues/5737
Closes https://github.com/espressif/esp-idf/issues/6024
Closes https://github.com/espressif/esp-idf/issues/6058
Closes https://github.com/espressif/esp-idf/issues/5563
Closes https://github.com/espressif/esp-idf/issues/5695
Closes https://github.com/espressif/esp-idf/issues/5633
Closes https://github.com/espressif/esp-idf/issues/4482
Related https://github.com/espressif/esp-idf/pull/4849
Related https://github.com/espressif/esp-idf/pull/4653
2020-12-21 16:38:20 +01:00
Shubham Kulkarni
60749b5483 esp_http_client example: Update example to demonstrate partial HTTP downloads 2020-12-03 09:39:16 +00:00
Mahavir Jain
0a933f66e3 Merge branch 'fix/https_server_mem_leak_for_error_ret' into 'master'
Fix/https server mem leak for error ret

Closes IDFGH-4300

See merge request espressif/esp-idf!11369
2020-11-26 00:11:58 +08:00
Aditya Patwardhan
df0b016cfd Fixed typo in configure_ds.py script commmand. 2020-11-25 13:47:48 +05:30
He Yin Ling
a908174c06 test: remove fake binary size check in example test:
the binary size check in example test was removed long time ago. Now we
have updated ttfw_idf to raise exception when performance standard is
not found. These fake performance check will be regarded as error.
Remove them now.
2020-11-24 17:53:33 +08:00
David Čermák
ae30617810 Merge branch 'feature/mqtt_submodule_update_23c8e1ec' into 'master'
MQTT: Update submodule reference to da850b (config, error flags, minor fixes)

Closes IDFGH-4033

See merge request espressif/esp-idf!11225
2020-11-20 17:21:02 +08:00
Anton Maklakov
c82799c9c8 Merge branch 'feature/support_python3_ci' into 'master'
ci: All jobs use python3 by default

See merge request espressif/esp-idf!11154
2020-11-20 15:01:01 +08:00
David Cermak
c31cd77d43 examples: make mqtt tcp example to report tcp-transport errno 2020-11-19 17:25:04 +01:00
David Čermák
9741d43cdd Merge branch 'bugfix/ipv6_address_value_issue' into 'master'
lw-ip:bugfix for ipv6_address_value_issue

Closes WIFI-2636

See merge request espressif/esp-idf!10038
2020-11-19 21:13:12 +08:00
Shubham Kulkarni
83f4ebf852 esp_http_client: Skip check for redirection counter if status code is success.
Set disable_auto_redirect in esp_http_client example to validate this condition in CI
2020-11-19 14:43:14 +05:30
Chen Yu Dong
454edcc0a8 ci: all jobs use python3 by default 2020-11-19 03:27:58 +00:00
Ivan Grokhotkov
3a01196eb0 Merge branch 'bugfix/smtp_client_attachment_newline' into 'master'
Add newline separator to fix wrong attachment sent

Closes IDFGH-4240

See merge request espressif/esp-idf!11177
2020-11-18 07:42:38 +08:00
Xue Yun Fei
74236f0b29 bugfix for ipv6_address_value_issue
Closes https://github.com/espressif/esp-idf/issues/5663
2020-11-13 08:55:32 +00:00
morris
e039a28821 console: support create REPL over USB CDC 2020-11-13 10:51:40 +08:00
Mahavir Jain
e2716690bc Merge branch 'fix/esp_local_ctrl_update_expired_cert' into 'master'
esp_local_ctrl: Updated the expired cacert.pem

Closes IDFCI-212

See merge request espressif/esp-idf!11184
2020-11-11 19:40:02 +08:00
Aditya Patwardhan
e8b2d80944 esp_local_ctrl: Updated the expired cacert.pem 2020-11-11 08:38:25 +00:00
Angus Gratton
66fb5a29bb Whitespace: Automated whitespace fixes (large commit)
Apply the pre-commit hook whitespace fixes to all files in the repo.

(Line endings, blank lines at end of file, trailing whitespace)
2020-11-11 07:36:35 +00:00
Angus Gratton
e82eac4354 cmake: Apply cmakelint fixes 2020-11-11 07:36:35 +00:00
Vikram Dattu
c2b5744ae7 Fixed content type of attachment
Signed-off-by: Vikram Dattu <vikram.dattu@espressif.com>
2020-11-10 11:57:20 +05:30
Vikram Dattu
5fc644ac27 Add newline separator to fix wrong attachment sent
Issue:

Missing newline between header and attachment

Issue seen with email clients viz., AppleMail and YahooMail. Attachment is not renderable.
Some clients like Google mail, Samsung mail tolerate the issue.

Fix:
Added newline between header and attachment.

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

Signed-off-by: Vikram Dattu <vikram.dattu@espressif.com>
2020-11-10 10:58:17 +05:30
David Cermak
8a143fcf40 esp-netif: Fix PPP netif event posting to include esp_netif data
Closes https://github.com/espressif/esp-idf/issues/6009
2020-10-26 16:00:42 +00:00
Jiang Jiang Jian
090dbc5550 Merge branch 'feature/add_ipv6_ping' into 'master'
lw-ip:add feature for ipv6 ping

Closes WIFI-2535

See merge request espressif/esp-idf!9530
2020-10-26 15:16:23 +08:00
Aditya Patwardhan
19df6529b2 esp32s2-ssl_ds: Use CLI interface for espefuse in configure_ds.py
* make the project CMakelists to flash the external partition "pre_prov"
    * Remove the dependancy of configure_ds.py on esptool.py
    * Updated README
    * Fix the help menu
2020-10-22 17:25:23 +05:30
xueyunfei
79fc027830 lwip:add feature for ipv6 ping 2020-10-22 15:01:59 +08:00
Alex Lisitsyn
8737584789 Bugfix/fix RS485 ut fail 2020-10-19 16:17:19 +08:00
Cao Sen Miao
4065872a88 http_server: The example adds a new function about file saving to SDcard 2020-09-28 12:09:46 +08:00
Aditya Patwardhan
b5c2fa632d esp32s2/esp_ds: Added mqtt example for TLS using Digital Signature 2020-09-22 18:31:31 +05:30
David Čermák
e6f0087448 Merge branch 'bugfix/httpd_ws_sock_type' into 'master'
https_server: Added WSS server example and some http(s)+ws updates

Closes IDFGH-3822, IDFGH-3668, IDFGH-3766, and IDFGH-3444

See merge request espressif/esp-idf!10262
2020-09-09 20:57:11 +08:00
David Cermak
6f3fa81863 http_server: Simplified httpd_get_client_list() to return clients in int array 2020-09-09 08:00:20 +02:00
David Cermak
2f22a43a5d http_server example test: Simplify client code in the test to use ws package 2020-09-09 08:00:20 +02:00
David Cermak
5e1e5f8be9 http_server: Add a flag to enable using control frames in user handlers 2020-09-09 08:00:20 +02:00
David Cermak
76ca826758 https_server example: Add new WSS server example
Added a new https server example with WS support which runs
* keep-alive thread to send PINGs to clients
* async message to all active WS clients
Moved the existing https-server example to a subfolder

Closes https://github.com/espressif/esp-idf/issues/5733
Closes https://github.com/espressif/esp-idf/issues/5686
2020-09-09 08:00:38 +02:00
Anton Maklakov
2b7e02c9ed Merge branch 'revert-983220e2' into 'master'
ci: enable RS485 related tests again

See merge request espressif/esp-idf!10277
2020-09-07 20:47:04 +08:00
Michael (XIAO Xufeng)
4941cf58d0 Revert "ci: temporarily disable RS485 related tests"
This reverts commit 983220e216
2020-09-04 12:57:08 +08:00
David Cermak
5dae28069f esp-netif: Fix SLIP interface to start with correct IPv6 addr
Merges https://github.com/espressif/esp-idf/pull/4985
2020-09-03 18:11:09 +00:00
David Čermák
9e8f4e51b2 Merge branch 'bugfix/mdns_query_id' into 'master'
mdns: Responding: Fix query ID, add questions if not strict mode

Closes IDFGH-3639 and IDFGH-3577

See merge request espressif/esp-idf!9795
2020-09-03 14:57:47 +08:00
David Cermak
81e89476fe mdns test: Add test to resolve esp32 hostname with DiG 2020-09-02 11:12:08 +02:00
David Cermak
6f1b8fe062 esp-modem: Remove esp-netif destroy from modem network glue code
To be in line with other interfaces, when deleting the driver and it's glue layer to esp-netif, we DO NOT delete the related esp-netif (since is was allocated and created outside of the glue code and it works the same way in esp-eth and esp-wifi driver/glue layers).

Closes https://github.com/espressif/esp-idf/issues/5486
2020-08-31 06:47:01 +00:00
David Cermak
44c553fd14 ws_client tests: Updated example test to use WebsSocket package
Added a new test for closing connection with close frames
2020-08-18 06:42:22 +00:00
David Cermak
b213f2c6d3 ws_client: Added support for close frame, closing connection gracefully 2020-08-18 06:42:22 +00:00
Marius Vikhammer
a54291b22b MQTT: add server side authentication to mutual auth example 2020-08-12 11:25:00 +08:00
Ivan Grokhotkov
ba874ccb04 Merge branch 'feature/freemodbus_add_tcp_master_slave' into 'master'
freemodbus:  add tcp master and slave support

Closes IDFGH-1147 and IDF-452

See merge request espressif/esp-idf!7506
2020-07-22 00:34:06 +08:00
Alex Lisitsyn
d0b9829eef examples: freemodbus add tcp support for common master/slave iface
Add TCP port files to provide Modbus TCP interface for communication
Add freemodbus add tcp support for common master/slave iface and tcp example based on socket API
The communication between master and slave checked for each example serial_master, serial_slave (use ModbusPoll TCP)
update tcp example according netif changes, fix ci issues
update TCP slave implementation
update example_test.py to to set IP through stdin
update API documentation
event bit instead of semahore to lock communication resource
update default options and master/slave port files

Closes https://github.com/espressif/esp-idf/issues/858
Closes IDF-452
2020-07-22 00:34:04 +08:00
David Cermak
bb9a7356ac esp-netif: removing SLIP related events as the slip-modem set state synchronously 2020-07-15 15:46:46 +02:00
David Cermak
1a41545c3e esp-netif: SLIP interface refactor to isolate interface from drivers 2020-07-15 15:46:46 +02:00
ryan
266be00254 esp-netif: Added esp_netif slip support, slip_modem component and example
Merges https://github.com/espressif/esp-idf/pull/4985
2020-07-15 15:46:46 +02:00
David Čermák
95b33895b8 Merge branch 'feature/pppos_sim7600' into 'master'
pppos-client: support for SIM7600 modem

Closes IDFGH-3256

See merge request espressif/esp-idf!9333
2020-07-15 20:54:26 +08:00
David Čermák
fa9f025e4a Merge branch 'feature/asio_ssl_support' into 'master'
asio: basic support of SSL/TLS transport

Closes IDFGH-1085 and IDFGH-2138

See merge request espressif/esp-idf!8797
2020-07-15 19:51:47 +08:00
David Čermák
f8b649baaf Merge branch 'bugfix/ws_server_async_send_fin' into 'master'
http_server example: WebSocket server to set final flag in async messages

Closes IDFGH-3443

See merge request espressif/esp-idf!9251
2020-07-15 05:31:02 +08:00
David Čermák
b2150f86a5 asio: make the example code conform to Espressif C++ standards 2020-07-14 10:42:17 +00:00
David Cermak
1c8171c3e8 asio: option to use wolfSSL as TLS stack for ASIO
Plus other minor update, make openssl aware of current modes (SSL_set_mode)
Update coding style in examples and tests, including copyright notices
2020-07-14 10:42:17 +00:00
David Cermak
213bbe51fc examples: asio ssl example demonstrating both server and client
By default it uses simple client connecting to https address. It is
possible to configure both server and client. As for example test the
configuration of both server and client connecting to each other on
2020-07-14 10:42:17 +00:00
David Cermak
c226270138 pppos-client: support for SIM7600 modem
Reuses most of the code from BG96. At this moment, this is not a
perfect support for other modules as the generic handlers for most
common modem functionality is not easily reusable. Refactoring to a
fully independent modem component will solve this.

Closes https://github.com/espressif/esp-idf/issues/5250
2020-07-13 14:45:19 +00:00
David Cermak
005f21accc http_server: WebSocket server to set flag in transmitted messages by default
Add logic to set `FIN` flag automatically for transmitted WS frames, but
if `fragmented` option set indicating an expert/manual mode, then the
`FIN` flag is set according to the `final` option.
2020-07-13 14:39:22 +00:00
David Cermak
52150c2cd2 http_server example: WebSocket server to set final flag in async messages
Closes https://github.com/espressif/esp-idf/issues/5405
2020-07-13 14:39:22 +00:00
sU8U7SfkcwTJVH7PjaVmej7D
6673407f98 httpd_resp_send: use HTTPD_RESP_USE_STRLEN when possible 2020-07-13 05:34:56 +00:00
Marius Vikhammer
a80cff924b docs: fix broken links in example READMEs 2020-07-08 10:39:33 +08:00
Ivan Grokhotkov
8cd1f99ace Merge branch 'refactor/common_rom_gpio_apis' into 'master'
esp_rom: extract common GPIO apis into esp_rom_gpio.h

See merge request espressif/esp-idf!9248
2020-07-07 17:28:39 +08:00
Ivan Grokhotkov
adf86bd95e Merge branch 'feature/console_repl_on_uart' into 'master'
console_repl: move UART specific configuration into single config structure

See merge request espressif/esp-idf!8964
2020-07-07 16:27:47 +08:00
morris
a4d0033c03 esp_rom: extract common GPIO apis into esp_rom_gpio.h 2020-07-07 11:40:19 +08:00
Ivan Grokhotkov
983220e216 ci: temporarily disable RS485 related tests 2020-07-06 20:12:43 +00:00
morris
29f8aecfc0 console_repl: change config structure to support different devices 2020-07-02 07:39:46 +00:00
Angus Gratton
40f5ac4cd4 ci: Temporarily remove the esp_http_client httpbin redirect tests
Need to host httpbin ourselves or wait for
postmanlabs/httpbin/issues/617 to be resolved
2020-06-24 03:26:39 +00:00
David Cermak
8f0ec8bd50 pppos client: modem netif fix ignoring potential modem-start error
esp-modem netif glue layer implements esp-netif attach callback to setup corresponding driver functions and start the modem. The error code of esp_modem_start_ppp() was ignored and ESP_OK returned in all cases. Fixed by passing esp_modem_start_ppp()'s error code to post_attach callback.

Closes https://github.com/espressif/esp-idf/issues/5430
2020-06-18 16:20:50 +02:00
Shubham Kulkarni
d36f5cf020 esp_http_client_example.c: Add fix to clear length of received data in case user_data buffer is passed 2020-06-16 20:48:40 +05:30
Shubham Kulkarni
1bbafb817d esp_http_client: Set user configurable authorization retries
Closes: https://github.com/espressif/esp-idf/issues/5407
2020-06-16 20:48:28 +05:30
Piyush Shah
627d8e7385 httpd_advanced_tests: Use the new low level APIs instead of calling an internal API 2020-06-11 01:56:47 +00:00
Roland Dobai
1f05da9cfa Fix SNTP example test to match pattern 2020-06-04 13:46:47 +00:00
morris
0fcb447707 add pppos client restart in example
Closes https://github.com/espressif/esp-idf/issues/4268
2020-05-29 13:09:53 +08:00
morris
6d70b7c352 fix esp_modem switch mode timeout
Closes https://github.com/espressif/esp-idf/issues/3506
Closes https://github.com/espressif/esp-idf/issues/4324
2020-05-29 13:03:15 +08:00
Marius Vikhammer
26d59f0f4c ICMP echo: example test were failing due to regex not matching TTL 2020-05-27 11:16:18 +08:00
morris
d003f96a9d gh_action: fix python lint 2020-05-20 10:50:10 +08:00
Mahavir Jain
ed05dd7713 Merge branch 'bugfix/coap_component_build_issue' into 'master'
coap: move mbedTLS config options from component to examples

See merge request espressif/esp-idf!8707
2020-05-20 10:51:06 +08:00
Ivan Grokhotkov
60437e8ae4 Merge branch 'feature/protocols_example_tests' into 'master'
Add protocol example tests

Closes IDF-1157

See merge request espressif/esp-idf!8645
2020-05-20 02:05:26 +08:00
Mahavir Jain
7dbf01afad coap: move mbedTLS config options from component to examples
CoAP component relies on some mbedTLS crypto configuration
options, e.g. DTLS and PSK. These configuration options if
selected, have footprint impact on generic TLS examples like
https_request or https_ota as well.

Footprint of https_request example with/without change is per below:

$ ./tools/idf_size.py new_https_request.map --diff old_https_request.map

<CURRENT> MAP file: new_https_request.map
<REFERENCE> MAP file: old_https_request.map
Difference is counted as <CURRENT> - <REFERENCE>, i.e. a positive number means that <CURRENT> is larger.
Total sizes of <CURRENT>:                                                 <REFERENCE>     Difference
 DRAM .data size:   14796 bytes                                                 14796
 DRAM .bss  size:   23560 bytes                                                 23680           -120
Used static DRAM:   38356 bytes ( 142380 available, 21.2% used)                 38476           -120 (   +120 available,      +0 total)
Used static IRAM:   89045 bytes (  42027 available, 67.9% used)                 89045                (     +0 available,      +0 total)
      Flash code:  554231 bytes                                                563823          -9592
    Flash rodata:  179000 bytes                                                181224          -2224
Total image size:~ 860632 bytes (.bin may be padded larger)                    872568         -11936

This commit moves relevant config options to CoAP specific examples
and also adds some run time warnings if they are kept disabled.

Closes https://github.com/espressif/esp-idf/issues/5262
2020-05-19 17:23:29 +05:30
Anton Maklakov
d6a6ac4d2d Merge branch 'bugfix/mdns_example_test_graceful_fail' into 'master'
mdns-example: fail gracefully if mdns response not received within timeout

See merge request espressif/esp-idf!8774
2020-05-19 19:21:53 +08:00
Roland Dobai
5f024e1cd4 Add protocol example tests 2020-05-19 12:17:32 +02:00
Mahavir Jain
c7be363af9 Merge branch 'bugfix/http_client_example' into 'master'
Add note regarding use of URL and configuration parameters in http client

Closes IDFGH-3161

See merge request espressif/esp-idf!8791
2020-05-18 20:59:03 +08:00
Shubham Kulkarni
7a561cb1fa esp_http_client_example.c: Add note regarding use of URL and configuration parameters.
Demonstrate use of query parameter.

Closes: https://github.com/espressif/esp-idf/issues/5174
2020-05-18 16:31:59 +05:30
David Cermak
761c3a3942 examples: make sure WiFi interface is disabled when connecting with Ethernet 2020-05-18 09:29:55 +02:00
David Cermak
8a45f074fc esp-netif: Added API to get the underlying interface name
The interface name can be used in socket API, i.e. setsockopt(). The API esp_netif_get_netif_impl_name() shoudl be used to populate standard
interface structure struct ifreq.
2020-05-18 09:26:24 +02:00
David Cermak
06711c7c36 examples: common connect component to use both interfaces at once 2020-05-18 09:26:24 +02:00
Liu Han
547210f7a5 socket-example: Add tcp client example for multiple interfaces 2020-05-18 09:26:24 +02:00
David Cermak
3758177bf8 mdns-example: fail gracefully if mdns response not received within timeout
If mdns answer hasn't been received within timeout, Value error would be raised, but the mdns-server-thread would still run, blocking CI jobs. Fixed by moving the raise statement within try-finally block
2020-05-18 08:13:14 +02:00
Mahavir Jain
be3b6b7cb8 Merge branch 'feature/mbedtls_dynamic_memory' into 'master'
feat(mbedtls): add dynamic buffer and local resource managment to decrease SSL heap cost

See merge request espressif/esp-idf!8313
2020-05-18 13:55:05 +08:00
David Cermak
5f4e2cf391 socket examples: fix random ci failure on reading ipv6 address
dut.expect() returns groups of a matching regex, but could be truncated upon reading/buffering. fixed by forcing expect to acquire exactly 8 octets of IPv6 address, i.e. not supporting short-handed entries such as fe80::0000..
2020-05-15 04:02:33 +00:00
Dong Heng
3d57bf30a2 feat(mbedtls): add dynamic buffer and local resource managment to decrease SSL heap cost 2020-05-14 11:45:09 +00:00
Roland Dobai
d5aeae9d48 examples: fix import error for the https_x509_bundle example 2020-04-29 09:16:18 +02:00
Axel Lin
85e9930071 esp_modem: Fix misuse event_queue_size as pattern_queue_size
Also remove event_queue_size from esp_modem_dte_t because
event_queue_size is only used in esp_modem_dte_init.

Fixes: 817c0e3019 ("esp_modem: UART runtime configuration of esp-modem")
Signed-off-by: Axel Lin <axel.lin@gmail.com>
2020-04-25 08:08:01 +08:00
David Cermak
6aabfd50d5 pppos_client: support for PPPAUTHTYPE_NONE
Closes https://github.com/espressif/esp-idf/issues/4616
Closes WIFI-1652
2020-04-14 21:46:07 +02:00
David Cermak
817c0e3019 esp_modem: UART runtime configuration of esp-modem
Basic set of configuration related to UART moved from KConfig
to runtime configuration structure to simplify reusing the component for
testing and examples.
2020-04-14 21:46:07 +02:00
Axel Lin
0784426d6b esp_modem: Ensure uart_param_config and uart pins are set before uart_driver_install
Fixes Guru Meditation Error: Core 0 panic'ed (LoadProhibited) when config with
CONFIG_PM_ENABLE=y && CONFIG_PM_DFS_INIT_AUTO=y.

Signed-off-by: Axel Lin <axel.lin@gmail.com>

Merges https://github.com/espressif/esp-idf/pull/4904
2020-04-14 21:46:07 +02:00
David Cermak
636621d1c5 pppos_client: Add a test application for pppos_client
Adding testing facilities for pppos-client including esp-modem component
and PPP client in lwip. Testing is provided with PPP server running on
rpi.
2020-04-14 21:46:07 +02:00
David Cermak
745f062e07 esp_modem: pppos_client modem to use uart with REF_TICK
pppos_client example used the UART default clock configuration which might
cause issues if power management enabled. Settings updated to UART_SCLK_REF_TICK
Also need to explicitly disable RX interrupts in UART pattern detection
mode.

Closes https://github.com/espressif/esp-idf/issues/4801
2020-04-14 21:46:07 +02:00
Krzysztof Budzynski
e1ab4b6711 Merge branch 'bugfix/uart_echo_readme' into 'master'
example: Remove duplicate commands and invalid serial port information

Closes IDFGH-3022

See merge request espressif/esp-idf!8295
2020-04-11 01:52:01 +08:00
Fu Hanxi
5b2fa1a5ad build_app: make multi target support readable 2020-04-09 16:40:57 +08:00
Roland Dobai
6adb1a0609 example: Remove duplicate commands and invalid serial port information
Closes https://github.com/espressif/esp-idf/issues/5049
2020-04-08 13:17:48 +02:00
David Cermak
e57dbf7c27 http-server-example: correction of regex waiting to acquire IP address
Since the recent refactoring of spi bus_lock comonent introduced heavy logging under debug/verbose level of verbosity, the http-server test executed in the CI became less stable due to complicated regex. Fixed by removing the first optional group
2020-04-05 20:07:27 +02:00
Elia Bieri
5288a797ef Fix format string in websocket example 2020-04-02 22:48:58 +02:00