Commit Graph

11174 Commits

Author SHA1 Message Date
Ivan Grokhotkov
674cfe4fd2 Merge branch 'bugfix/nvs_encryption_keys' into 'master'
NVS: fix nvs_flash_generate_keys to generate random keys (Github PR)

See merge request espressif/esp-idf!12205
2021-02-17 09:44:19 +00:00
David Čermák
e615d10b4f Merge branch 'feature/transport_tcp_connection_errors' into 'master'
tcp_transport/esp_tls: Use common TCP transport to reduce code duplication

Closes IDFGH-4405

See merge request espressif/esp-idf!12136
2021-02-16 13:32:47 +00:00
yuanjm
cd01a0ca81 websocket: Add websocket unit tests 2021-02-16 08:29:28 +00:00
David Cermak
1921ae8973 tcp_transport: Reduce lwip dependecy for tcp_transport/http_client 2021-02-16 09:01:35 +01:00
David Cermak
eb772e152c esp_tls: Fix unresolved lwip symbol when complex dependency tree 2021-02-16 09:01:35 +01:00
David Cermak
5cfa545d08 esp-tls: Added _esp_tls_net_init to init fd for both mbedtls/wolfssl 2021-02-16 09:01:35 +01:00
David Cermak
4375f888fa esp-tls: Fix wolfssl error codes for WANT_READ/WANT_WRITE
wolfSSL error codes are mostly positive numbers, but esp-tls potentially
non-block API (read/write) returns ssize_t, i.e. bytes read/written if
>0, errorcode otherwise. To comply with this API we have to conditionate
the wolfssl return codes to negative numbers, preferably the same codes
as mbedTLS codes.
2021-02-16 09:01:35 +01:00
David Cermak
2d25252746 esp-tls: Rework tcp_connect() to use more subroutines
Refactored the esp_tcp_connect() functionality to break it down to
* dns-resolution + socket creation
* set configured socket options
* set/reset non-block mode
* the actual connection in non-blocking mode
2021-02-16 09:01:35 +01:00
David Cermak
1fa0db8d44 tcp_transport: Allow for using transport independently from list
For compatibility reasons, support also transports separately if the transport is used
before attaching to parent list. In this case we create an internal context which is
independent on the foundation transport and used preferably
2021-02-16 09:01:35 +01:00
David Cermak
99805d880f websockets: Set keepalive options after adding transport to the list
To be in line with other code and mainly to support base/foundation transport used by both tcp and ssl transport layers
2021-02-16 09:00:43 +01:00
David Cermak
0e97517a1c tcp_transport: Add unit test to exercise tcp/ssl transport init 2021-02-16 09:00:43 +01:00
David Cermak
4e394bcbce esp-tls: Extend error types with TCP clean close error 2021-02-16 09:00:43 +01:00
David Cermak
6b318fe583 esp_tls: Updated connection method to use non-blocking connect
For better control over connection timeouts
To be in line with former tcp_transport, as esp-tls is not used for
plain tcp transports
2021-02-16 09:00:43 +01:00
David Cermak
2c28ffffee tcp_transport/esp_tls: Use common TCP transport to reduce code duplication
For high level review of the changes.
2021-02-16 09:00:43 +01:00
David Cermak
391d7bf271 tcp_transport: Add TCP transport connection errors
Transport's error_handle is used to capture different types of errors
including esp_err_t from esp-tls and socket/system errors.
This change adds the following error codes for TCP transport:
* connection closed by a FIN flag (clean closure from server)
* DNS resolution problem
* connection timeout
These errors are already defined in esp-tls component and since this
component will be used in the future for both TCP and SSL transport, we
currently report these issues in transport::error_handle::esp_tls_last_error
of standard esp error type (esp_err_t)

Closes https://github.com/espressif/esp-mqtt/issues/182
2021-02-16 09:00:43 +01:00
Angus Gratton
fc945be7f8 Merge branch 'bugfix/freemodbus_fix_parity_propagation_issue' into 'master'
freemodbus: fix mb controller parity propagation issues

Closes IDFGH-4560

See merge request espressif/esp-idf!11951
2021-02-15 22:55:38 +00:00
Angus Gratton
7d27ddc502 Merge branch 'bugfix/aes_dma_completion' into 'master'
mbedtls: Fix AES dma completion race condition

See merge request espressif/esp-idf!12257
2021-02-15 08:23:07 +00:00
aleks
b554d4d34d freemodbus: fix mb controller parity propagation issues
Closes https://github.com/espressif/esp-idf/issues/6377
2021-02-15 08:39:18 +01:00
suren.gabrielyan
2b9d2c06f5 mdns: add bound check when setting interface as duplicate
Closes IDF-2787

Partially addresses https://github.com/espressif/esp-idf/issues/6440
2021-02-15 06:43:51 +00:00
Angus Gratton
89b6baf2b8 mbedtls tests: Add optional debug log output to AES stream tests 2021-02-12 04:08:12 +00:00
Angus Gratton
e7563fe704 mbedtls aes dma: Fix bug where DMA would complete when the first output descriptor was done, not the last 2021-02-12 04:08:12 +00:00
Sachin Parekh
e6ccb812b2 esp_pm: Label each column of lock dump 2021-02-11 18:44:51 +05:30
Sachin Parekh
296d10e675 esp_timer: Label each column of timer dump 2021-02-11 18:40:51 +05:30
Angus Gratton
1544f64166 Merge branch 'bugfix/pvs_studio_freertos' into 'master'
freertos: fix errors reported by PVS-Studio

Closes IDF-2784

See merge request espressif/esp-idf!12337
2021-02-11 15:32:18 +08:00
David Čermák
c665bcf733 Merge branch 'bugfix/doc_wifi_default_init' into 'master'
esp_netif: Update documentation on deinitialization of wifi default netif

Closes IDFGH-4692

See merge request espressif/esp-idf!12300
2021-02-11 14:15:51 +08:00
David Čermák
61f3af0ae7 Merge branch 'test/modbus_lwip_issue' into 'master'
modbus: Exit server task gracefully to correctly cleanup lwip internals

Closes IDFGH-4432

See merge request espressif/esp-idf!12075
2021-02-11 14:15:10 +08:00
Angus Gratton
4eb9cc68a6 esp_event test: Disable linker relaxations in this component, to temporarily workaround a linker bug 2021-02-11 17:00:55 +11:00
Marius Vikhammer
d294ac381f freertos: fix errors reported by PVS-Studio
Removed leftover code-paths that were never taken. Upstream freertos uses
vTaskSuspendAll() and xTaskResumeAll(), and therefor check if the task already
yielded.

In the IDF port of freertos we use critcal sections instead, so xAlreadyYielded
will never be set.

Partially addresses https://github.com/espressif/esp-idf/issues/6440
2021-02-11 03:15:04 +00:00
Renz Bagaporo
2eb563406f esp_hw_support: fix esp_restart crash
Closes https://github.com/espressif/esp-idf/issues/6297
2021-02-10 23:38:17 +00:00
Angus Gratton
807c8549e1 Merge branch 'bugfix/esp32s2_wakeup_from_light_sleep_fix' into 'master'
esp32s2 light sleep fix

Closes IDFCI-122

See merge request espressif/esp-idf!10269
2021-02-11 07:34:57 +08:00
David Cermak
cab1b3507a esp_netif: Add unit test to exercise default wifi setup/teardown cycle 2021-02-10 13:28:36 +00:00
David Cermak
898cac0061 modbus: Exit server task gracefully to correctly cleanup lwip internals
Current lwip implementation does not support deleting a task which is
actively waiting on `select()` or `poll()` API.
Therefore we have to make sure that `select()` exits to deallocate its internal
callback before deleting the task. This is achieved by a shutdown
semaphore which informs the client once the `select()` exitted.

fix slave
2021-02-10 13:12:54 +00:00
Angus Gratton
73db142403 Merge branch 'update/v4.4-dev' into 'master'
version: Update to v4.4-dev

See merge request espressif/esp-idf!12339
2021-02-10 14:44:57 +08:00
Mahavir Jain
e3d50e009a Merge branch 'fix/esp_tls_typo' into 'master'
Fix/esp_tls_mispaced_paranthesis

Closes IDF-2750 and IDF-2751

See merge request espressif/esp-idf!12295
2021-02-10 13:57:13 +08:00
Angus Gratton
c8315e0110 version: Update to v4.4-dev 2021-02-10 16:07:24 +11:00
Angus Gratton
4ce47b0394 Merge branch 'feature/master_build_c3_example' into 'master'
CI: enable example builds for C3

Closes IDF-2364

See merge request espressif/esp-idf!11968
2021-02-10 11:54:26 +08:00
Aditya Patwardhan
d36479728c protocomm: Fixed NULL check of allocated memory
Fixes one part of - https://github.com/espressif/esp-idf/issues/6440
2021-02-10 02:07:58 +00:00
Aditya Patwardhan
0175c68400 esp_tls: Fix misplaced paranthesis in esp_tls_mbedtls.c
Fixes one part of -  https://github.com/espressif/esp-idf/issues/6440
2021-02-10 02:07:58 +00:00
Michael (XIAO Xufeng)
2c0962f727 Merge branch 'feature/spi_flash_auto_suspend_default_on_c3' into 'master'
spi_flash: make the auto_suspend default y on C3

See merge request espressif/esp-idf!12233
2021-02-09 19:50:48 +08:00
Island
b88ec36635 Merge branch 'bugfix/ignore_null_valued_comb_key' into 'master'
component/bt: Added check for NULL valued combination key.

See merge request espressif/esp-idf!12239
2021-02-09 19:49:25 +08:00
Island
3f821b1d65 Merge branch 'bugfix/ble_mesh_server_model_deinit' into 'master'
ble_mesh: stack: Fix deinit server models with no matching id

See merge request espressif/esp-idf!12312
2021-02-09 16:26:38 +08:00
Chinmay Chhajed
368ba6b077 component/bt: Added check for NULL valued combination key. 2021-02-09 12:09:32 +05:30
Chinmay Chhajed
fb3a382fe4 Bluedroid: Do not initiate/accept connection with device having same BDADDR.
Added BD_ADDR comparison in l2cu_lcp_allocate and removed check from
security connection request handler as it's handled in l2cu_lcp_allocate
for both connection request and create connection.
2021-02-09 12:09:15 +05:30
Chinmay Chhajed
5596f37af1 bt: removed esp_bt_get_mac()
There was no need for this function as there is already a way present to
fetch own mac address. Own mac addr can be fetched by calling
controller_get_interface().
2021-02-09 12:09:15 +05:30
Angus Gratton
2c39010b3b Merge branch 'bugfix/anti_rollback_without_test_app' into 'master'
bootloader: Anti-rollback mode doesn't run test_app

See merge request espressif/esp-idf!12225
2021-02-09 14:16:51 +08: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
Angus Gratton
1de3f00012 Merge branch 'bugfix/SECURE_DISABLE_ROM_DL_MODE_does_not_work' into 'master'
bootloader: SECURE_ENABLE_SECURE_ROM_DL_MODE cannot be y when SECURE_DISABLE_ROM_DL_MODE=y

See merge request espressif/esp-idf!12288
2021-02-09 11:09:09 +08:00
Angus Gratton
49c442b12f Merge branch 'feature/efuse_update_description' into 'master'
efuse: Updates description of uart_print_control efuse

Closes IDF-2705

See merge request espressif/esp-idf!12236
2021-02-09 11:02:26 +08:00
Xia Xiaotian
b71481093a esp_wifi: fix some Wi-Fi scan and coexist bugs
1. Fix the bug that Wi-Fi performance is impacted by BLE starting scan for a while in some scenarios on ESP32-C3.

2. Fix the bug that Wi-Fi performance is impacted when Bluetooth change state for a while in some scenarios on ESP32-C3.

3. Fix the bug that BLE performance is impacted by Wi-Fi scan on ESP32-C3.

4. Fix the bug that Wi-Fi scan fails when BLE is scanning on ESP32-C3.

5. Fix Wi-Fi ACK and CTS rate when low rate is disabled on ESP32-C3.
2021-02-08 21:20:09 +08:00
wangmengyang
44dd496bea update esp32c3 btbb lib 21-02-08 and set coexist state when in scan(initiating) mode 2021-02-08 21:19:59 +08:00