Commit graph

362 commits

Author SHA1 Message Date
Angus Gratton
8bc618f070 Merge branch 'feature/sntp_add_desc' into 'master'
docs: Add System time chapter and for sntp a description about using...

Closes IDFGH-2237, IDF-1199, and IDF-38

See merge request espressif/esp-idf!6818
2020-01-10 13:29:47 +08:00
Konstantin Kondrashov
2c793cef06 idf: Support a custom toolchain with time_t wide 64-bits
Allows resolving the Y2K38 problem.

Closes: IDF-350

Closes: https://github.com/espressif/esp-idf/issues/584
2020-01-10 12:58:54 +08:00
KonstantinKondrashov
c23549c04f docs: Add System time chapter and for sntp a description about using CONFIG_LWIP_SNTP_UPDATE_DELAY option
Closes: https://github.com/espressif/esp-idf/issues/4386
Closes: IDFGH-2237
Closes: IDF-1199
2020-01-10 14:49:07 +11:00
Angus Gratton
4ece6eedae Merge branch 'bugfix/ws_rcv_exceed_buf' into 'master'
tcp_transport/ws_client: websockets now correctly handle messages longer than buffer

Closes IDF-1084 and IDF-1083

See merge request espressif/esp-idf!6740
2020-01-09 13:18:31 +08:00
Mahavir Jain
8bfb32735f Merge branch 'bugfix/use_mbedtls_spiram_strategy' into 'master'
Use mbedtls SPIRAM strategy in example_test.py

Closes IDF-1293

See merge request espressif/esp-idf!7132
2020-01-07 11:37:08 +08:00
Marius Vikhammer
ffeda3003c tcp_transport/ws_client: websockets now correctly handle messages longer than buffer
transport_ws can now be read multiple times in a row to read frames larger than the buffer.

Added reporting of total payload length and offset to the user in websocket_client.

Added local example test for long messages.

Closes IDF-1083
2020-01-06 17:18:13 +08:00
Shubham Kulkarni
563175d90a mbedtls: Use SPIRAM strategy in example_test.py 2020-01-03 15:30:03 +05:30
Jakob Hasse
bcefbb03ad examples: using xEventGroup bits properly
Closes IDF-1177

* changed
  ../../wifi/getting_started/station/README.md
  ../../wifi/getting_started/station/main/station_example_main.c
2020-01-03 16:10:27 +08:00
Mahavir Jain
9ef8cafeca file_server: fix issue with sending last chunk
Closes: https://github.com/espressif/esp-idf/issues/4528
Closes IDFGH-2414
2019-12-23 12:01:16 +05:30
Angus Gratton
30372f5a4f Merge branch 'docs/esp_netif_programmer_manual' into 'master'
esp netif: formal fixes (docs and c++ sentinels again)

Closes IDFGH-2265

See merge request espressif/esp-idf!6819
2019-12-18 13:12:36 +08:00
Angus Gratton
43fe904260 Merge branch 'feature/ws_local_server_test' into 'master'
websocket_client: added example_test with a local websocket server

Closes IDF-907

See merge request espressif/esp-idf!6366
2019-12-18 11:15:33 +08:00
David Cermak
74d768fe6d ci: updated mqtt weekend test for qemu support
Added default sdkconfig for qemu build for the mqtt publish example,
Added environment configuration for running the same test on target
or in qemu
Updated missing example tests per latest ttfw refactoring
2019-12-17 14:06:40 +01:00
David Cermak
31b2702387 esp_netif, examples: esp_netif_init() moved into ESP_ERROR_CHECK()
esp_netif_init() returns standard esp_err_t error code (unlike tcpip_adapter init), so shall be checked for the return value
Also to make the initialization code more consistent.
2019-12-17 09:07:49 +01:00
David Cermak
04a25394aa esp_modem: add simple compatibility layer for new esp_modem connecting over esp-netif 2019-12-16 17:34:10 +00:00
David Cermak
25913af2cc pppos_client: udated example code to use esp-netif in PPP configuration 2019-12-16 17:34:10 +00:00
Marius Vikhammer
67c5225c14 websocket_client: added example_test with a local websocket server
- Added a example test that connects to a local python websocket server.
- Added readme for websocket_client example.

Closes IDF-907
2019-12-12 11:00:58 +08:00
Alex Lisitsyn
ba1ee4092a freemodbus: fix merge issues 2019-12-10 14:30:25 +08:00
Alex Lisitsyn
44444208b7 freemodbus: update poll event processing
update modbus poll event loop processing to process multiple events
2019-12-10 14:27:09 +08:00
He Yin Ling
c906e2afee test: update example and unit tests with new import roles:
tiny_test_fw is a python package now. import it using normal way.
2019-12-07 10:34:54 +08:00
Angus Gratton
da4cb76f5a test: Refactor TFW load_source() method to only take the file path
Fixes issues where example tests for persistent_sockets and advanced_tests both
loaded a module named "client", causing a race condition.
2019-11-28 19:25:52 +08:00
Angus Gratton
ecaf816c0b Merge branch 'bugfix/freemodbus_fix_clang_warnings' into 'master'
freemodbus: fix clang warnings of freemodbus stack

See merge request espressif/esp-idf!5193
2019-11-28 07:06:19 +08:00
morris
c3ee156df0 ethernet: move netif glue && add ref counter
1. move netif glue into single file
2. add reference counter for Ethernet driver
2019-11-27 10:36:32 +08:00
houwenxiang
f27ae9b0e2 feature: Add uart hal support. 2019-11-26 20:01:50 +08:00
aleks
6e14b6265b freemodbus: fix merge issues 2019-11-26 11:25:12 +01:00
aleks
cf4c95532f freemodbus: fix clang warnings 2019-11-26 10:37:14 +01:00
aleks
4f9742d90c freemodbus: fix supported targets ci issue 2019-11-26 09:07:47 +01:00
Alex Lisitsyn
67f62a79c1 freemodbus: add modbus master ascii
add support of modbus master ascii
rename base dir name of master and slave example to be mb_slave, mb_master to avoid conflict with sdio/slave example test
add Kconfig option to enable ASCII and RTU mode separately
update ASCII options + remove cast for errors
added baudrate for examples into Kconfig
updated magic numbers for timer timeout
put ascii private definitions into one file
2019-11-26 13:16:25 +08:00
Ivan Grokhotkov
8ff801766a Merge branch 'docs/update_oocd_config_on_cmd_line' into 'master'
Updates OpenOCD configuration file names in documentation

See merge request espressif/esp-idf!6226
2019-11-22 05:32:35 +08:00
Alexey Gerenkov
1626f827d3 docs: Updates OpenOCD configuration file names 2019-11-18 13:33:32 +03:00
David Cermak
6e0d274f58 esp_netif: example init code fixed to assert only variables, not
function calls so it won't be skipped if compiled without asserts
2019-11-13 12:36:25 +01:00
David Cermak
cf710a3cb1 esp_netif: include tcpip_adapter legacy header by default to provide *implicit* compatiblity 2019-11-13 12:36:25 +01:00
David Cermak
3a19bf055d esp_netif and examples: using wifi driver handle, update examples and tests to pass the CI 2019-11-13 12:36:25 +01:00
David Cermak
ba13275c6b esp_netif: update default DHCP IP addresses to be in line with old interface, added loopback implementation, explicit esp-netif init, sanity checks for parameters added 2019-11-13 12:36:25 +01:00
David Cermak
b834c99148 examples: modify other examples and tests to use esp_netif instead of tcpip_adapter 2019-11-13 12:36:25 +01:00
David Cermak
19e24fe61e mdns: update mdns to use esp-netif for mdns supported services such as STA, AP, ETH
removes also include dependency on lwip to use esp_netif defined address fields and structures
2019-11-13 12:36:25 +01:00
David Cermak
a49b934ef8 examples: protocol examples which use common connection component
updated to use esp_netif_init instead of tcpip_adapter in initialization code
2019-11-13 12:36:25 +01:00
David Cermak
ec9f245dd3 examples: removed ip4addr_ntoa and used prefered IP2STR for displaying IP addresses 2019-11-13 12:36:25 +01:00
Alex Lisitsyn
cfdd5f0ef7 freemodbus: configure timer handler placement
place timer interrupt handler into flash by default;
add default settings for timer and UART interrupts to place them into IRAM into example defaults;
CONFIG_FMB_TIMER_PORT_ENABLED default = n, when enabled, the UART_ISR_IN_IRAM set to y
2019-11-12 22:16:55 +08:00
David Cermak
208feef3c9 asio: fix asio test code to start the test after ip address received from common example code
Previously set to wait until IP address got from tcpip_adapter, but since common example connect code blocks until both IP4 and IPv6 address received it could happen that test code might have started connection to the ASIO counter-part while ESP32 still waiting for IPv6 address
2019-11-11 15:27:09 +00:00
Angus Gratton
0e9c2cdc93 Merge branch 'bugfix/esp32s2beta_enable_protocol_examples' into 'master'
Bugfix/esp32s2beta enable protocol examples

Closes IDF-1027

See merge request espressif/esp-idf!6566
2019-11-04 14:46:57 +08:00
Marius Vikhammer
500c247030 protocol examples: enable protocol examples for esp32sbeta
Closes IDF-1027
2019-11-01 11:14:10 +08:00
Marius Vikhammer
845003a1c3 ASIO: fixed undefined ref to atomic functions and enabled examples for CI (esp32s2beta)
Implemented the atomic functions needed to compile and link the asio examples on esp32s2beta.
2019-11-01 11:12:47 +08:00
Alex Lisitsyn
4bac558ab3 freemodbus: fix a bug with destroy function of modbus controller and fix port destroy functions
adds timer interrupt handle and free it in vMBXXXPortTimerClose() in master and slave timer port
assign modbus controller interface pointer to NULL in destroy function after free
2019-10-31 23:23:24 +08:00
Marius Vikhammer
bf1977e48e http_server: fix sdmmc related build error for esp32s2beta
ESP32S2 does not have sdmmc, disable SD host for esp32s2
2019-10-31 14:42:29 +08:00
Roland Dobai
01887f71e7 Update kconfiglib to upstream version and replace mconf-idf
Special thanks to @ulfalizer for the helpful suggestions regarding
kconfiglib.

"rsource" option is available for relative path includes
Closes https://github.com/espressif/esp-idf/issues/4064
2019-10-29 10:40:04 +01:00
Angus Gratton
055cc251b7 Merge branch 'feature/esp32s2beta_merge' into 'master'
esp32s2beta: Merge support to master

Closes IDF-513, IDF-756, IDF-758, IDF-999, IDF-753, IDF-749, IDF-754, IDF-840, and IDF-755

See merge request espressif/esp-idf!6100
2019-10-29 13:02:01 +08:00
Aditya Patwardhan
988f0c8feb ESP_TLS: Generalizing error messages for esp_tls
:Replace mbedtls specific error messages
2019-10-28 16:05:31 +05:30
Angus Gratton
7ce75a42c7 Merge branch 'master' into feature/esp32s2beta_merge 2019-10-25 15:13:52 +11:00
Angus Gratton
3caa54e546 Merge branch 'feature/add_ping_example' into 'master'
add ping example

Closes WIFI-1196 and IDF-1068

See merge request espressif/esp-idf!6340
2019-10-24 11:37:38 +08:00
Angus Gratton
ba74534efb Merge branch 'bugfix/esp_tls_check_buffer_size' into 'master'
esp-tls: Asserting maximum output buffer in tls-write.

See merge request espressif/esp-idf!6317
2019-10-23 14:45:28 +08:00
Angus Gratton
b216e3b5c8 Merge branch 'feature/lwip_support_mdns_queries' into 'master'
lw-IP: support mdns queries

See merge request espressif/esp-idf!5242
2019-10-23 13:10:41 +08:00
David Cermak
f0c6bb431f ci: mqtt ssl test updated to output larger data in form of binary partition
Testing with predefined buffer sizes for MQTT as well as mbedTLS to
exercise fragmenting outgoing data on both layers. Example test compares
received partition with the actual binary file.
2019-10-22 08:49:42 +00:00
suda-morris
dc6acf0033 icmp: add example and unitest 2019-10-22 04:38:09 +00:00
Angus Gratton
8675a818f9 Merge branch 'master' into feature/esp32s2beta_merge 2019-10-22 13:51:49 +11:00
Angus Gratton
05180dfb4c Merge branch 'bugfix/mqtt_reference_latest_version' into 'master'
mqtt: updated to latest version to include latest fixes and features

See merge request espressif/esp-idf!6294
2019-10-17 18:01:58 +08:00
Ivan Grokhotkov
42e59c317a Merge branch 'bugfix/mqtt_example_url_update' into 'master'
MQTT: update default broker URL for examples

Closes IDF-1052

See merge request espressif/esp-idf!6214
2019-10-17 16:12:29 +08:00
Angus Gratton
ae21d669b9 Merge branch 'master' into feature/esp32s2beta_merge 2019-10-17 18:22:08 +11:00
Angus Gratton
89d2e2a5e3 Merge branch 'feature/example_netbios' into 'master'
add netbios support in restful server example

Closes IDF-1070

See merge request espressif/esp-idf!6346
2019-10-17 12:54:01 +08:00
Angus Gratton
b7fd8166d5 Merge branch 'bugfix/ws_opcodes_fix' into 'master'
ws_client: fix for not sending ping responses, updated to pass events also for...

See merge request espressif/esp-idf!6111
2019-10-17 12:36:08 +08:00
Ivan Grokhotkov
d0f615e6f8 Merge branch 'fix/tcp_server_example' into 'master'
Bugfix of tcp_server example.

Closes IDFGH-1306

See merge request espressif/esp-idf!5211
2019-10-15 23:04:47 +08:00
Marius Vikhammer
c6934d6175 MQTT: update default broker URL for examples
The MQTT broker URL used as default in the examples has ceased operation. All examples and documention have been updated to point to the new domain mqtt.eclipse.org.
This also required an update of the python example test scripts to use TLS 1.2
2019-10-15 09:35:23 +00:00
David Cermak
f3cb91ef71 mdns: updated example test to exercise also hostnames resolved by lwip gethostbyname and getaddrinfo 2019-10-15 07:02:19 +00:00
Angus Gratton
496ede9bcd Merge branch 'master' into feature/esp32s2beta_merge 2019-10-15 14:59:27 +11:00
David Cermak
abf9345b85 ws_client: fix for not sending ping responses, updated to pass events also for PING and PONG messages, added interfaces to send both binary and text data
closes https://github.com/espressif/esp-idf/issues/3982
2019-10-14 11:05:27 +02:00
Angus Gratton
5ce95f2bfd Merge branch 'bugfix/ci_weekend_test_update' into 'master'
CI: weekend test fixes

See merge request espressif/esp-idf!6235
2019-10-14 15:30:33 +08:00
suda-morris
84c72863e1 add netbios support in restful server example 2019-10-14 14:26:43 +08:00
David Cermak
640eac84fa mqtt: updated to latest version to include latest fixes, support for global CA store, extended error structure to receive mqtt specific errors. updated idf ssl example to use this error struct
https://github.com/espressif/esp-mqtt/issues/135
2019-10-14 06:26:14 +00:00
Angus Gratton
6df8658b5b Merge branch 'bugfix/fixes_from_kconfiglib_update' into 'master'
Fix of menuconfig bug for MSYS2 and a couple of cosmetic changes

See merge request espressif/esp-idf!6255
2019-10-10 11:06:29 +08:00
MartinValik
b7bfcf3c93 Revised tcp_server example.
Fixed error caused by unnecessary reopening of listening socket.
Extracted packet retransmit logic to separate function.
Added robust implementation for sending data

Closes https://github.com/espressif/esp-idf/pull/3597
2019-10-09 14:34:28 +02:00
Roland Dobai
d3ed17acd7 Cosmetic Kconfig fixes 2019-10-08 08:11:53 +00:00
Ivan Grokhotkov
75f2948e02 examples/restful_server: fix Makefile syntax for flashing SPIFFS
Closes https://github.com/espressif/esp-idf/issues/4050
2019-10-07 13:28:38 +02:00
David Cermak
784a0d21ea update mqtt weekend test to use mbedtls asymetric buffer 2019-10-02 16:22:50 +02:00
Angus Gratton
adfc06a530 Merge branch 'master' into feature/esp32s2beta_merge 2019-09-20 10:28:37 +10:00
Angus Gratton
438d513a95 Merge branch 'master' into feature/esp32s2beta_merge 2019-09-16 16:18:48 +10:00
Sagar Bijwe
e255c48de7 Fix http_request example
1) WEB_PATH should path relative to document root of web server.
2) HTTP request should contain "Host" header of format "host:port".
3) Port number in the example should be configurable.
2019-09-13 09:21:29 +00:00
Mahavir Jain
f2eadc9378 Merge branch 'bugfix/mbedtls_client_only_config_build_failure' into 'master'
Fix build issues in coap library with mbedtls client only config

See merge request espressif/esp-idf!5955
2019-09-06 21:12:04 +08:00
Jon Shallow
430b737760 Fix libcoap building with various MbedTLS compile time options
components/coap/port/coap_mbedtls.c:

Add in additional compile time check wrappers for different MbedTLS
configurations.

components/coap/CMakeLists.txt:
components/coap/component.mk:
components/coap/port/coap_notls.c:
components/coap/port/include/coap_config_posix.h:

Add in the ability to compile and run if MbedTLS does not have any TLS
mode enabled.

examples/protocols/coap_client/main/coap_client_example_main.c:

Inform user that MbedTLS Client Mode is required for DTLS if not enabled,
and coaps:// has been requested.
[Lower libcoap library will still error and report this condition]

examples/protocols/coap_server/main/coap_server_example_main.c:

Inform user that MbedTLS Server Mode is required for DTLS if not enabled.
[Lower libcoap library will still error and report this condition]

Closes https://github.com/espressif/esp-idf/issues/3961
Closes https://github.com/espressif/esp-idf/issues/3971
Closes https://github.com/espressif/esp-idf/pull/3977
2019-09-06 16:13:52 +05:30
Chinmay Chhajed
a6cc964a26 esp_http_server : Bugfix in parsing of empty header values
This MR is intended to fix incorrect parsing of HTTP requests when empty header values are present.

The issue is was due to asymmetric behavior of `http_parser` library, which in case of:

    non-empty header values : invokes callbacks with the pointer to the start of a value
    empty header values : invokes callbacks with pointer to the start of next header or section

Since HTTP server relies on this pointer (along with length of the value) to locate the end of a value, and replace the line terminators (CRLFs) with null characters, the second case needed to be handled correctly.

Closes IDFGH-1539

Closes https://github.com/espressif/esp-idf/issues/3803
2019-09-06 11:02:36 +08:00
Michael (XIAO Xufeng)
63329b169b ci: limit example test to ESP32s 2019-09-04 10:53:25 +10:00
Michael (XIAO Xufeng)
3b39e60f97 driver: remove unused drivers for esp32s2beta 2019-09-04 10:53:25 +10:00
suda-morris
5a09de8245 cbor: add tinycbor library and example 2019-08-22 17:44:29 +08:00
liu zhifu
003a9872b7 esp_wifi: wifi support new event mechanism
1. WiFi support new event mechanism
2. Update examples to use new event mechanism
2019-08-20 09:39:51 +00:00
Angus Gratton
6990a7cd54 Merge branch 'master' into feature/esp32s2beta_update 2019-08-19 15:03:43 +10:00
Angus Gratton
04ae56806c Merge branch 'master' into feature/esp32s2beta_update 2019-08-08 15:26:58 +10:00
Angus Gratton
24d26fccde Merge branch 'master' into feature/esp32s2beta_update 2019-08-08 13:44:24 +10:00
David Cermak
f3d6a34e7d esp_tls: enable psk verification mode, added mqtt example using psk authentication 2019-08-07 14:27:40 +10:00
Mahavir Jain
a8bfe59bd1 coap: refactor examples, stylistic cleanups, move certs to independent dir 2019-08-06 10:37:41 +05:30
Mahavir Jain
10c3b42f71 coap: kconfig cleanup, have component specific configuration for common options 2019-08-06 10:37:40 +05:30
Jon Shallow
1aaec808da Add DTLS support to libcoap using MbedTLS
This update supports DTLS, TLS is a future TODO

components/coap/CMakeLists.txt:
components/coap/component.mk:

Add in the new files that have to be built
Replace libcoap/src/coap_notls.c with libcoap/src/coap_mbedtls.c

components/coap/libcoap:

Update the version to include the current version for supporting MbedTLS

components/coap/port/coap_debug.c:
components/coap/port/coap_mbedtls.c:
components/coap/port/include/coap/coap_dtls.h:

New port files for DTLS

components/coap/port/include/coap_config_posix.h:

Include building with MbedTLS

examples/protocols/coap_client/README.md:
examples/protocols/coap_client/main/CMakeLists.txt:
examples/protocols/coap_client/main/Kconfig.projbuild:
examples/protocols/coap_client/main/coap_client_example_main.c:
examples/protocols/coap_client/main/component.mk:

Update CoAP client to support DTLS

examples/protocols/coap_client/main/coap_ca.pem
examples/protocols/coap_client/main/coap_client.crt
examples/protocols/coap_client/main/coap_client.key

New PKI Certs for CoAP client (copied from wpa2_enterprise example)

examples/protocols/coap_server/README.md:
examples/protocols/coap_server/main/CMakeLists.txt:
examples/protocols/coap_server/main/Kconfig.projbuild:
examples/protocols/coap_server/main/coap_server_example_main.c:
examples/protocols/coap_server/main/component.mk:

Update CoAP server to support DTLS
Change "no data" to "Hello World!" to prevent confusion

examples/protocols/coap_server/main/coap_ca.pem
examples/protocols/coap_server/main/coap_server.crt
examples/protocols/coap_server/main/coap_server.key

New PKI Certs for CoAP server (copied from wpa2_enterprise example)

Closes https://github.com/espressif/esp-idf/pull/3345
Closes https://github.com/espressif/esp-idf/issues/1379
2019-08-06 10:37:40 +05:30
Angus Gratton
7ef5fa8a0a Merge branch 'feature/transport_support_der_certs' into 'master'
tcp transport ssl DER-support

See merge request espressif/esp-idf!5627
2019-08-05 09:52:08 +08:00
Angus Gratton
b23718995a Merge branch 'bugfix/strict_prototypes' into 'master'
Enable strict prototypes checks

Closes IDFGH-757

See merge request espressif/esp-idf!4546
2019-08-05 09:38:39 +08:00
Mahavir Jain
e7dba7d7bc examples: change default build instructions in docs to CMake 2019-08-02 16:32:46 +05:30
David Cermak
25dd5e39af esp-tls: Naming variables refering to certificates and keys in a neutral way to suggest that both PEM and DER format could be used, added comments descibing important details about using these formats 2019-08-02 09:25:16 +02:00
Anton Maklakov
afbaf74007 tools: Mass fixing of empty prototypes (for -Wstrict-prototypes) 2019-08-01 16:28:56 +07:00
Ivan Grokhotkov
b1bb90a596 Merge branch 'bugfix/partition_tables_update_note' into 'master'
global: update note in the partition tables

See merge request espressif/esp-idf!5636
2019-07-29 19:00:44 +08:00
Ivan Grokhotkov
3c63f49591 examples: remove non-existent options from sdkconfig.defaults 2019-07-29 04:57:38 +02:00
Ivan Grokhotkov
26800ed71e global: update note in the partition tables
The build system automatically determines offsets of partitions from
the partition table, so no manual changes are needed. Instead, add a
note that partition offsets may need to be updated when increasing
the bootloader size.
2019-07-27 10:28:16 +02:00
chenjianqiang
e43513b610 bugfix(uart): uniform AT_CMD char configuration 2019-07-18 19:24:13 +08:00
xueyunfei
f29ff2c552 Modify IPv6 functionality compatible with lwip2.1.2 2019-07-16 16:22:11 +08:00
David Cermak
3eda52f6cd mqtt: update example documentation on generating a certificate for ssl authentication to hosts
Closes https://github.com/espressif/esp-idf/issues/3593
2019-07-14 16:05:50 +02:00