Commit Graph

7286 Commits

Author SHA1 Message Date
lly da068a639f ble_mesh: stack: Use macros for adv task name & prio 2020-08-26 08:24:55 +00:00
lly df8b2c5f3a ble_mesh: stack: Make freertos static allocation visible 2020-08-26 08:24:55 +00:00
lly a194c415a8 ble_mesh: stack: Update option of using DRAM/SPIRAM for memory allocation 2020-08-26 08:24:55 +00:00
weitianhua 8fb47ab0c2 Seperate BTA_JV_L2CAP for less bin size 2020-08-26 15:33:48 +08:00
zhangyanjiao 09113e163b esp wifi bugfix:
1. Fix TX DMA buffer issue
2. API esp_wifi_get_config add acquisition sta.listen_interval
3. Configure bandwidth and phy mode to store NVS
4. If AP's tsf has been restarted, STA will disconnect from AP.
5. Do not reset softAP's tsf except it restart
6. Fix the wifi regdomain update bug
7. Fix the bug for airkiss find hidden AP fail
8. Fix addba and first ampdu send bar
9. Fix WiFi fragment issue
10. Fix WiFi fragment issue
2020-08-26 14:43:53 +08:00
zhangyanjiao 85ca89ee4a esp_wifi: Add API to get available internal heap size 2020-08-26 14:43:35 +08:00
dongyou 9825d0004f Add IRAM_ATTR wifi_bt_common_module_enable/disable()
Deleted duplicated spinlock and counter.
2020-08-24 14:00:22 +08:00
houwenxiang c7f33524b4 driver(I2S): Fix I2S reset issue for release/v3.3
`i2s_start` reseting I2S in incorrect order causeing the word-order error.
2020-08-24 01:25:39 +00:00
Chen Yi Qun c2ead692aa bugfix(ut): fix gpio output and input mode test(backport v3.3) 2020-08-20 06:25:40 +00:00
houwenxiang a293dfea7a feature: support vfs uart set line endings with specified uart number release/v3.3 2020-08-14 14:35:44 +08:00
Angus Gratton 9ff108dcd0 Merge branch 'fix/prov_ble_read_offset_v3.3' into 'release/v3.3'
BLE provisioning: Add check for valid ble read offset (v3.3)

See merge request espressif/esp-idf!9747
2020-08-13 16:29:02 +08:00
Michael (XIAO Xufeng) 0a75f2d5f8 Merge branch 'bugfix/fix_adc_dac_conflict_backportv3.3' into 'release/v3.3'
Driver(adc): Disable the synchronization operation function of ADC1 and DAC (backport v3.3)

See merge request espressif/esp-idf!9364
2020-08-13 09:51:25 +08:00
Prasad Alatkar fbdcfc8e4a BLE provisioning: Add check for valid ble read offset 2020-08-12 08:46:01 +00:00
xiehang 7952bed766 lwip: fix udp tx packet loss issue 2020-08-12 10:38:42 +08:00
Li Shuai ab63b48f6f add soft solution for esp32 eco3 live lock issue 2020-08-12 02:16:53 +00:00
ronghulin cb78c1083f bugfix: fix IPv6 memory leak issue 2020-08-11 14:19:06 +08:00
Jiang Jiang Jian 7e1c529b00 Merge branch 'bugfix/param_check_instant_tx_octets_adv_ubderrun_v3.3' into 'release/v3.3'
component/bt: add connect parameter, fix instant reverse, fix tx default octets, fix assert(1024,0)

See merge request espressif/esp-idf!9484
2020-08-11 14:11:03 +08:00
xueyunfei 68ecc44d34 fix bug for ipv6 fragment 2020-08-11 09:45:02 +08:00
Jiang Jiang Jian b244afc208 Merge branch 'feature/make_tcp_rto_configurable_v3.3' into 'release/v3.3'
make TCP rto time configurable (backport v3.3)

See merge request espressif/esp-idf!9610
2020-08-10 21:17:45 +08:00
Wang Cheng bfaa14bfdd component/bt: Fix buffer count deinit crash. 2020-08-10 11:43:54 +08:00
wangcheng 12d476427f components/bt: Add api to query the number of available buffers for the current connection 2020-08-10 11:43:54 +08:00
baohongde debda4a63f Fix ble disconnect due to instant of channel map update is too small
Set AFH in time
Fix ble connecting fail in coexist
2020-08-10 11:43:54 +08:00
baohongde b76f5b2ef2 Coexistence: Add coexist API to enable BLE connection dynamic priority 2020-08-10 11:43:54 +08:00
wangcheng d674016d64 component/bt: add connect parameter, fix instant reverse, fix tx default octets, fix assert(1024,0), fix assert(512,0) 2020-08-10 11:43:17 +08:00
KonstantinKondrashov 9ce137139b bootloader: Adds bootloader_sha256_flash_contents() 2020-08-07 23:10:29 +08:00
Piyush Shah 52c089fba7 protocomm_httpd: Restart security session if request is received on a new session
This commit fixes a bug as well as changes a behaviour.

Bugfix: During softap/httpd based provisioning, if a session was closed
midway and a new one started, it would never proceed if the http server
assigns same socket number to the new session (which happens almost always).
Now, if a session is closed, using the http callbacks, the older session
data is cleared so that a new one can be created.

Behavioural change: If a client (mobile app particularly) does not use
persistent http session i.e. all provisioning communication on the same
socket, the provisioning may fail. Earlier, since the session context was
not getting cleared, even if the client closed a session and continued
on a new one, it would go through if the socket number assigned was same
(which happens almost always).

Ideally, from a security perspective, all communication related
to secure provisioning must happen on the same socket, and so, this
change is required.
2020-08-06 18:25:53 +00:00
KonstantinKondrashov 035783039b bootloader_support: Fix bootloader_common_get_sha256_of_partition, can handle a long image
Closes: IDFGH-3594
2020-08-05 23:21:52 +08:00
Hou Chen Yao 2e89f963d7 remove auto conn case because we do not support this anymore 2020-08-05 18:04:34 +08:00
Jiang Jiang Jian 593ca2255c Merge branch 'mesh/bugfix_set_type_v3.3' into 'release/v3.3'
Mesh/bugfix (backport v3.3)

See merge request espressif/esp-idf!9179
2020-07-30 21:17:11 +08:00
Jiang Jiang Jian 44791067ec Merge branch 'nimble/nrpa_support_v3.3' into 'release/v3.3'
NimBLE: Add Non-Resolvable private address support and misc fixes (Backport v3.3)

See merge request espressif/esp-idf!9735
2020-07-29 16:35:25 +08:00
Michael (XIAO Xufeng) 55bb42dc63 sdmmc: fix the probe issue that forbid sdspi working in highspeed mode
SD cards don't support CMD7 (select_card) in SPI mode. Highspeed probe
of sdspi will fail in this step and stop working in highspeed mode.
Remove the CMD7 in enable_hs_mode_and_check to fix this issue.

Please note that, on ESP32, you have to use the IOMUX pins to use sdspi
in 40MHz, otherwise the initialization process will report reading issue
and fail.
2020-07-28 19:09:38 +08:00
Wielebny666 fc8ba15b33 Fix init MCPWM Fault line via config struct
Signed-off-by: wubowen <wubowen@espressif.com>

Merges https://github.com/espressif/esp-idf/pull/5491
Closes https://github.com/espressif/esp-idf/issues/5433
2020-07-28 03:44:36 +00:00
Chinmay Chhajed 6bbb75f219 Bluedroid: Fixes cases having fallback to link up event.
Signed-off-by: Chinmay Chhajed <chinmay.chhajed@espressif.com>
2020-07-27 14:08:03 +05:30
Michael Balzer 22d636b7b0 pthread: fix pthread_mutex_destroy() breaking priority inheritance 2020-07-24 14:45:48 +02:00
Michael Balzer 95e43fc2c4 FreeRTOS: add mutex hold count to task status info 2020-07-24 14:43:32 +02:00
Prasad Alatkar 7aab15f33d NimBLE: Add Non-Resolvable private address support and misc bug fixes (Backport v3.3)
- Merges https://github.com/espressif/esp-nimble/pull/12
- Fixes repeated pairing failure in RPA feature

Closes https://github.com/espressif/esp-idf/issues/5530
2020-07-23 11:28:42 +05:30
aleks b64f4bced8 ci: temporarily disable RS485 related tests 2020-07-22 08:46:57 +00:00
Angus Gratton bf02206096 Merge branch 'ci/workaround_multiple_ci_failures_v3.3' into 'release/v3.3'
CI: workaround multiple ci failures (v3.3)

See merge request espressif/esp-idf!9687
2020-07-22 11:54:45 +08:00
yuanjm e5066c9969 feat(lwip): make LWIP TCP rto time configurable 2020-07-20 07:58:06 +00:00
Angus Gratton 07942e3991 Merge branch 'bugfix/cmake_bugfixes_v3.3' into 'release/v3.3'
CMake-related bugfixes (v3.3)

See merge request espressif/esp-idf!8069
2020-07-20 08:43:52 +08:00
He Yin Ling 858e12a040 CI: do not run cases likely to fail 2020-07-19 15:30:15 +08:00
He Yin Ling bfb7757feb CI: disable cases with test env SSC_T5_1 2020-07-19 15:26:29 +08:00
He Yin Ling 9a205c654d CI: remove incorrect MTU related cases 2020-07-19 15:23:21 +08:00
Michael Balzer 0137aef471 Merge branch 'release/v3.3' of https://github.com/espressif/esp-idf.git into release/v3.3
# Conflicts:
#	components/bt/include/esp_bt.h
2020-07-15 12:08:17 +02:00
Michael Balzer 7ca3bc1e48 Task WDT: add method to retrieve task names for pre-crash storage 2020-07-14 19:44:39 +02:00
chenyudong 83fdac780c mesh/ci: fix MESH_EST_0216 2020-07-10 17:57:36 +08:00
chenyudong 7c95474f6c mesh: backport some bugfixes
1. If the root is specified (FIXED-ROOT) by set type or set parent, change ie.mesh_type to MESH_ROOT before connect to router.
2. Release esp_mesh_recv_toDS when the root becomes non-root.
3. esp_mesh_set_type now supports MESH_IDLE and MESH_STA.
4. Fix ie.rc_rssi is not updated during scan and vote.
5. Fix ie.mesh_type do not match ie.layer caused by parent switch.
6. Fix during root switch, the original root doesn't disconnect from the router after it receives the switch request from the new voted root. (root switch happens by invoking esp_mesh_waive_root).
7. Fix the routing announce timer is not stopped immediately in a new root if the new root is transformed from non-root.
8. Choose the candidate with less ie.assoc when doing parent switch.
2020-07-10 17:57:34 +08:00
lly 28c0673376 ble_mesh: stack: Add two application macros for TTL 2020-07-10 09:15:56 +08:00
lly 9eb66d49e4 ble_mesh: stack: Update send_ttl in btc when recv a msg
Update send_ttl mainly for server models. When a server model
receives a message, and the status is required to be replied
by the application, we need to set send_ttl to the msg context.
If send_ttl is not updated in btc, and the applcation does not
set the TTL either, then the status will be replied with TTL=0,
which may cause the client side (e.g. the phone App) failed to
receive the status.

Closes https://github.com/espressif/esp-idf/issues/5300
2020-07-10 09:15:49 +08:00
Shubham Kulkarni e84ad136b9 esp_https_ota.c: Add fix to return failure if (-1) is returned from esp_http_client_read
Closes https://github.com/espressif/esp-idf/issues/4960
2020-07-08 10:00:48 +05:30
Shubham Kulkarni 22926742be esp_http_client.c: In esp_http_client_read, add fix to return (-1) if esp_transport_read fails 2020-07-08 10:00:48 +05:30
Angus Gratton 9d6c3632e8 bootloader: Fix regression burning efuses late in boot process
APB clock get functions not included in iram_loader_seg, meaning
could be overwritten by app depending on app IRAM size and linker
layout.

Regression in dd5190868a

Closes https://github.com/espressif/esp-idf/issues/5456
2020-07-06 16:42:46 +10:00
Jiang Jiang Jian 4891fcea78 Merge branch 'bugfix/beacon_security_downgrade_v3.3' into 'release/v3.3'
Avoid parsing RSN/WPA IE's after connection (Backport v3.3)

See merge request espressif/esp-idf!9268
2020-07-03 14:32:04 +08:00
lly 8753fb359a ble_mesh: stack: Update some fast prov functions 2020-07-03 08:54:59 +08:00
lly bbf4ce8d18 ble_mesh: stack: Move fast prov functions to a single file 2020-07-03 08:54:51 +08:00
Nachiket Kukade 2edc576419 esp_wifi: Update wifi lib
1. Avoid parsing RSN/WPA IE's after connection
2. Remove AUTH_CHANGED reason code logic
2020-07-02 04:06:35 +00:00
lly d76a3a8372 ble_mesh: ci: Fix failing to compile when using make 2020-07-02 03:38:18 +00:00
lly e36105156c ble_mesh: Mark platform related default RNG as 0 2020-07-02 03:38:18 +00:00
lly 9060de827f ble_mesh: Remove the previously added redundant aes files 2020-07-02 03:38:18 +00:00
lly 8887bd5f3c ble_mesh: Update CMake and make files for tinycrypt 2020-07-02 03:38:18 +00:00
lly 0940f5b2c3 ble_mesh: Update tinycrypt header file include guards
Add BLE_MESH in the macro to make it specific for BLE Mesh.
2020-07-02 03:38:18 +00:00
lly d690e52993 ble_mesh: Format source and header files of tinycrypt 2020-07-02 03:38:18 +00:00
lly 12b9f59559 ble_mesh: Port full implementation of tinycrypt [Zephyr]
- Original code is here: https://github.com/zephyrproject-rtos/tinycrypt
- Also this fixes the compile error when NimBLE and ESP BLE Mesh
  both uses the tinycrypt.
2020-07-02 03:38:18 +00:00
fuzhibo 44887f5fde Driver(adc): Disable the synchronization operation function of ADC1 and DAC
Closes IDF-1585
2020-07-01 06:16:35 +00:00
lly f835011e2f ble_mesh: stack: Fix compile error when only proxy enabled
Also remove some redundant CONFIG_BLE_MESH_PROXY checks, because
when the following options are satisfied, the CONFIG_BLE_MESH_PROXY
option will be selected mandatorily.
2020-07-01 12:32:04 +08:00
Island 021e23ebf7 Merge branch 'bugfix/ble_mesh_check_subnet_before_update_beacon_sent_v3.3' into 'release/v3.3'
ble_mesh: Check if subnet exists before updating beacon_sent (v3.3)

See merge request espressif/esp-idf!9398
2020-07-01 11:17:08 +08:00
Island 31b52a5c05 Merge branch 'bugfix/ble_mesh_set_recv_rssi_v3.3' into 'release/v3.3'
Bugfix/ble mesh set recv rssi (v3.3)

See merge request espressif/esp-idf!9392
2020-07-01 11:15:48 +08:00
Jiang Jiang Jian 46bc9e5dc4 Merge branch 'feature/bt_secure_conn_downgrade_check_v3.3' into 'release/v3.3'
Bluedroid: Authentication fixes in Legacy and Secure Connection.

See merge request espressif/esp-idf!9332
2020-06-30 15:12:21 +08:00
lly 9f6375db50 ble_mesh: Check if subnet exists before updating beacon_sent
- Before updating the "beacon_sent" of a subnet, we need to check
  if the subnet still exists, especially for a Provisioner.
- Fix a bug which will cause Provisioner failed to send Secure
  Network Beacon if no device is provisioned
2020-06-30 09:23:28 +08:00
lly 96865524c7 ble_mesh: stack: Copy recv_rssi for other received messages
Follow the commit: 2b80cb6883,
copy the recv_rssi for other mesh messages.
2020-06-30 09:06:42 +08:00
mbroek 86cad8b825 When a generic mesh model message is received "bt_mesh_generic_server_cb_evt_to_btc" copies the
ctx values to cb_params for the mesh stack.

recv_rssi was not copied.

This means the rssi could not be read when receiving generic server messages using ble_mesh.
2020-06-30 09:06:31 +08:00
Mahavir Jain d6a63531ce Merge branch 'bugfix/http_server_lru_v3.3' into 'release/v3.3'
esp_http_server: Update LRU counter on accepting a new connection (v3.3)

See merge request espressif/esp-idf!9353
2020-06-29 12:57:43 +08:00
Island 370bb55f42 Merge branch 'bugfix/ble_mesh_get_node_with_name_v3.3' into 'release/v3.3'
ble_mesh: Get node info with pre-configured node name (v3.3)

See merge request espressif/esp-idf!9304
2020-06-28 20:25:13 +08:00
Island 1fb6ffecad Merge branch 'bugfix/ble_mesh_bt_hex_v3.3' into 'release/v3.3'
ble_mesh: Fix wrong log output with bt_hex (v3.3)

See merge request espressif/esp-idf!9311
2020-06-28 20:23:56 +08:00
Island 036828a172 Merge branch 'bugfix/ble_mesh_not_define_bool_v3.3' into 'release/v3.3'
Bugfix/ble mesh not define bool (v3.3)

See merge request espressif/esp-idf!9318
2020-06-28 20:22:50 +08:00
Shubham Kulkarni 673e433281 esp_http_server: Update LRU counter on accepting a new connection
Closes https://github.com/espressif/esp-idf/issues/3851
2020-06-26 19:25:42 +05:30
Chinmay Chhajed 99d572700d Bluedroid: Authentication fixes in Legacy and Secure Connection.
Prevent a remote device from doing a Bluetooth Impersonation Attack
(BIAS) by:

- Preventing remote device to downgrade secure connection
feature mask. Secure connection feature mask should remain same or
increase to enabled in link key generation and authentication.

- Doing a mutual authentication during Legacy Authentication.
2020-06-25 13:59:14 +00:00
lly ad970addf0 ble_mesh: Get node info with pre-configured node name
Also add a function to get the entry of the nodes table.

Closes https://github.com/espressif/esp-idf/issues/5397
2020-06-24 11:53:59 +00:00
lly adbc337023 ble_mesh: Fix wrong log output with bt_hex
- This issue was introduced in the commit: a788e7cd3d
  which updated the bt_hex() function incorrectly.
- And in bt_hex(), we use 2 for the two-dimensional array, because currently
  at most two bt_hex() will be used at the same time. Also this will save
  some DRAM compared with using 4.
2020-06-24 11:50:58 +00:00
lly 1dbbc55cc0 ble_mesh: Remove boolean type definitions 2020-06-24 11:46:51 +00:00
Nikolaos Strikos 0526de4536 ble_mesh: Do not #define bool when compiling in C++ 2020-06-24 11:46:51 +00:00
lly 366dd9759d ble_mesh: stack: Check model status with variable length 2020-06-24 11:41:58 +00:00
Jiang Jiang Jian 39e5184159 Merge branch 'bugfix/fix_event_bug_in_GAP_API_release_v3.3' into 'release/v3.3'
Bugfix/fix event bug in GAP API [backport v3.3]

See merge request espressif/esp-idf!9195
2020-06-23 12:19:04 +08:00
David Čermák e3f3e0ae0f Merge branch 'feature/ws_timeout_v3.3' into 'release/v3.3'
websocket: add configurable timeout for PONG not received (v3.3)

See merge request espressif/esp-idf!8911
2020-06-19 02:22:08 +08:00
Island 2ea53169ad Merge branch 'bugfix/blufi_buffer_overflow_report_v3.3' into 'release/v3.3'
blufi: When the format of the received data packet is wrong, reply with an error response(backport 3.3)

See merge request espressif/esp-idf!9198
2020-06-18 13:45:34 +08:00
Michael (XIAO Xufeng) 2aaf254d44 Merge branch 'bugfix/fix_fifo_cnt_bug_v3.3' into 'release/v3.3'
bugfix(uart): fix esp32 uart fifo_cnt bug(backport v3.3)

See merge request espressif/esp-idf!9042
2020-06-18 01:43:04 +08:00
David Čermák e25b710a02 Merge branch 'bugfix/ws_send_abort_v3.3' into 'release/v3.3'
websocket client: the client now aborts the connection if send fails (v3.3)

See merge request espressif/esp-idf!8903
2020-06-17 15:05:48 +08:00
wangcheng 563c9901ca blufi: When the format of the received data packet is wrong, reply with an error response 2020-06-17 12:32:57 +08:00
liqigan 02f9eaa31a components/bt: Adjust the description of `esp_bt_gap_start_discovery` and `esp_bt_gap_cancel_discovery`.
Add some comments to explain why `ESP_BT_GAP_DISC_STATE_CHANGED_EVT` is not reported.
2020-06-17 11:27:37 +08:00
Marius Vikhammer b478dc4ad6 websocket: add configurable timeout for PONG not received
Closes IDF-1744
2020-06-17 11:13:26 +08:00
xiongyu c9d9545310 bugfix(uart): fix esp32 uart fifo_cnt bug
When using DPort to read fifo, fifo_cnt is not credible, we need to calculate the real cnt based on the fifo read and write pointer. When using AHB to read FIFO, we can use fifo_cnt to indicate the data length in fifo.
2020-06-15 12:22:33 +08:00
Michael Balzer 9024cd38ec Logging: avoid blocking in timer context 2020-06-13 14:22:21 +02:00
Angus Gratton 5e84ee108c Merge branch 'bugfix/bootloader_efuse_build_regression_v3.3' into 'release/v3.3'
bootloader: add definition of esp_clk_apb_freq (v3.3)

See merge request espressif/esp-idf!9093
2020-06-10 16:01:35 +08:00
Angus Gratton f17f59fb54 Merge branch 'bugfix/parttool_get_info_wo_info_option_v3.3' into 'release/v3.3'
partition_table: Fix parttool.py crashes when retrieving partition info (v3.3)

See merge request espressif/esp-idf!9065
2020-06-10 15:58:01 +08:00
weitianhua 282433500e Backport MR from baid proj 2020-06-10 03:53:21 +00:00
Ivan Grokhotkov 618794e1fb bootloader: add definition of esp_clk_apb_freq
Commit 8cd04c80 has added a dependency of efuse component on
esp_clk_apb_freq, however there was no definition of this function in
the bootloader context.

Reported at https://esp32.com/viewtopic.php?f=13&t=12035

Closes: https://github.com/espressif/esp-idf/issues/5396
2020-06-08 16:45:29 +08:00
Jiang Jiang Jian eaca5a11e4 Merge branch 'bugfix/authmode_degrade_fix_v3.3' into 'release/v3.3'
esp_wifi: Remove auth_changed event and fix wpa2_ent authmode threshold (backport 3.3)

See merge request espressif/esp-idf!9058
2020-06-05 13:59:48 +08:00
Jiang Jiang Jian b4c89c6607 Merge branch 'bugfix/add_so_linger_to_menuconfig_for_3.3' into 'release/v3.3'
lw-ip:add LINGER to menuconfig(backport 3.3)

See merge request espressif/esp-idf!9062
2020-06-05 13:54:22 +08:00
Jiang Jiang Jian a5a6ba895e Merge branch 'optimization/DNS_get_function_for_3.3' into 'release/v3.3'
lw-ip:optimization DNS get function(backport 3.3)

See merge request espressif/esp-idf!9061
2020-06-05 13:54:07 +08:00
Jiang Jiang Jian b336851479 Merge branch 'workaround/wps_iot_fixes_v3.3' into 'release/v3.3'
wpa_supplicant: WPS Inter operatability Fixes ( backport v3.3)

See merge request espressif/esp-idf!9060
2020-06-05 13:49:24 +08:00
Michael (XIAO Xufeng) ace2cff01a Merge branch 'bugfix/sdmmc_check_slot_before_pullup_3.3' into 'release/v3.3'
sdmmc: Correctly check function parameters before using them (3.3)

See merge request espressif/esp-idf!9057
2020-06-05 07:19:11 +08:00
KonstantinKondrashov 28d3d6daac partition_table: Fix parttool.py crashes when retrieving partition info
Closes: IDFGH-3279
Closes: https://github.com/espressif/esp-idf/issues/5271
2020-06-04 16:43:06 +08:00
kapil.gupta 21395421d1 wpa_supplicant: WPS Inter operatability Fixes
Add WPS IOT fixes under config option

Current fixes under this flag.
1. Allow NULL-padded WPS attributes.
2. Bypass WPS-Config method validation
2020-06-04 13:57:20 +05:30
xueyunfei 68d1afb47d add LINGER to menuconfig 2020-06-04 16:16:03 +08:00
xueyunfei 32b3c255ac optimization DNS get function 2020-06-04 16:05:17 +08:00
Jiang Jiang Jian c13b946773 Merge branch 'bugfix/modify_TCP_MSS_range_v3.3' into 'release/v3.3'
Change the default value of TCP_MSS (backport v3.3)

See merge request espressif/esp-idf!9050
2020-06-04 15:59:17 +08:00
Jiang Jiang Jian 3838da57f0 Merge branch 'bugfix/compiler_err_when_performance_optimization_enabled_v3.3' into 'release/v3.3'
Bugfix/compiler err when performance optimization enabled v3.3

See merge request espressif/esp-idf!7979
2020-06-04 15:58:34 +08:00
kapil.gupta 1625c595ff esp_wifi: Remove auth_changed event and fix wpa2 authmode threshold 2020-06-04 13:13:21 +05:30
Nachiket Kukade c6ca42b1e7 wpa_supplicant: Allow NULL-padded WPS attributes
Some AP's keep NULL-padding at the end of some variable length WPS
Attributes. This is not as par the WPS2.0 specs, but to avoid interop
issues, ignore the padding by reducing the attribute length by 1.
2020-06-04 12:18:43 +05:30
Alexander Borsuk cccd679b3e sdmmc: Correctly check function parameters before using them
Closes https://github.com/espressif/esp-idf/pull/5000
2020-06-04 12:07:16 +08:00
xiehang 6f26e72817 Change the default value of TCP_MSS to 1440 and TCP_MSS Range : [536 1460] 2020-06-04 12:04:14 +08:00
Island ad2447a6ea Merge branch 'bugfix/ble_mesh_remove_relay_dependency_v3.3' into 'release/v3.3'
ble_mesh: Remove relay option dependency (v3.3)

See merge request espressif/esp-idf!9028
2020-06-03 15:20:56 +08:00
Island 686530d373 Merge branch 'bugfix/ble_mesh_example_nvs_store_v3.3' into 'release/v3.3'
Bugfix/ble mesh example nvs store (v3.3)

See merge request espressif/esp-idf!9018
2020-06-03 15:12:28 +08:00
Island c3902be87f Merge branch 'bugfix/ble_mesh_model_recv_fix_v3.3' into 'release/v3.3'
Bugfix/ble mesh model recv fix (v3.3)

See merge request espressif/esp-idf!9009
2020-06-03 15:11:38 +08:00
Island 88937185ac Merge branch 'bugfix/ble_mesh_rework_prov_pdu_len_check_v3.3' into 'release/v3.3'
ble_mesh: Rework prov pdu length check (v3.3)

See merge request espressif/esp-idf!9005
2020-06-03 15:11:11 +08:00
lly 7937a51779 ble_mesh: Remove relay option dependency
When the relay functionality of a node is not enabled, this
issue will cause the node failing to send messages to fixed
group.
2020-06-02 19:19:18 +08:00
Jiang Jiang Jian a94842d8f7 Merge branch 'bugfix/fix_some_wifi_bugs_0525_v3.3' into 'release/v3.3'
feature: optimize some wifi API  (backport v3.3)

See merge request espressif/esp-idf!8893
2020-06-02 17:39:23 +08:00
weitianhua afae411857 Remove (x2) varible for BCM_STRNCPY_S and BCM_STRCPY_S 2020-06-02 08:30:02 +00:00
weitianhua 437bee123c Initialize mem_start and mem_end 2020-06-02 08:30:02 +00:00
lly cb0288d399 ble_mesh: Config and health client btc fixes
Fix an issue which may cause no error code is returned
when sending config client or health client messages
with invalid parameters.
2020-06-02 14:05:26 +08:00
lly 59cdd33dcf ble_mesh: Add more checks of net_idx & app_idx 2020-06-02 14:05:19 +08:00
lly 36c476833f ble_mesh: Optimize some send & recv logs 2020-06-02 14:05:12 +08:00
Michael (XIAO Xufeng) 13154fe5c6 Merge branch 'bugfix/fix_gpio_wake_up_disable_invalid_for_rtc_io_v3.3' into 'release/v3.3'
bugfix (GPIO): fixed gpio_wake_up_disable not working for RTC IO (release/3.3)

See merge request espressif/esp-idf!7997
2020-06-02 11:16:59 +08:00
Island bce064e655 Merge branch 'bugfix/ble_mesh_local_model_sub_v3.3' into 'release/v3.3'
Bugfix/ble mesh local model sub (v3.3)

See merge request espressif/esp-idf!8985
2020-06-02 10:58:50 +08:00
lly ac565c97a3 ble_mesh: correct the return type [Zephyr] 2020-06-02 10:33:12 +08:00
lly 8c5a8bef50 ble_mesh: Add net_buf_simple_init_with_data [Zephyr] 2020-06-02 10:33:05 +08:00
lly ac76870ad7 ble_mesh: Optimize model recv operations [Zephyr]
Previously the model recv operation is a littl fuzzy.
With the changes, the model recv operation is splitted into:
- find op
- check app_idx
- check dst
- check length
- update info & handle message
2020-06-02 10:32:57 +08:00
lly a96e1b80ac ble_mesh: Rework prov pdu length check 2020-06-02 10:17:20 +08:00
Mahavir Jain 3f57aecabd Merge branch 'bugfix/httpd_lru_purge_v3.3' into 'release/v3.3'
esp_http_server: Fixed a bug which could cause issues with LRU purge (v3.3)

See merge request espressif/esp-idf!8834
2020-06-01 11:23:53 +08:00
houwenxiang eab88f51e7 driver(GPIO): fixed gpio_wake_up_disable not working for RTC IO (release/3.3) 2020-06-01 11:16:07 +08:00
lly 6abdc9e542 ble_mesh: Local model (un)subscribes group address 2020-06-01 09:13:57 +08:00
lly 0ee9227b45 ble_mesh: Define a macro for invalid company id 2020-06-01 09:13:43 +08:00
ronghulin 8f3209b7b7 feature: optimize some wifi API
1. optimization esp_wifi_set_max_tx_power description
2. add API esp_wifi_ap_get_sta_aid
2020-05-29 12:02:24 +08:00
zwj 38e98acca1 :add congest direct callback and modify congest evt triger threshold 2020-05-28 12:06:10 +00:00
wangcheng 340e40abbe master missing BLE_AUTH_CMPL_EVT after restart 2020-05-28 12:06:10 +00:00
wangcheng ed3a172df7 fix bta_dm_deinit_cb 2020-05-28 12:06:10 +00:00
Jiang Jiang Jian 27f03b4ac0 Merge branch 'bugfix/ble_mesh_check_timer_init_v3.3' into 'release/v3.3'
ble_mesh: Check the result of creating timer (v3.3)

See merge request espressif/esp-idf!8960
2020-05-28 15:26:53 +08:00
Jiang Jiang Jian 706d704c08 Merge branch 'nimble/update_nimble_submodule_v3.3' into 'release/v3.3'
NimBLE: Include upstream fixes and use macros for log level filtering (backport v3.3)

See merge request espressif/esp-idf!8798
2020-05-28 15:23:31 +08:00
lly b5f3f79716 ble_mesh: Check the result of creating timer 2020-05-28 10:28:36 +08:00
Island 5f43d69d21 Merge branch 'bugfix/ble_mesh_sync_zephyr_fixes_v3.3' into 'release/v3.3'
Bugfix/ble mesh sync zephyr fixes (v3.3)

See merge request espressif/esp-idf!8950
2020-05-28 10:17:29 +08:00
Island a70c956a75 Merge branch 'bugfix/ble_mesh_not_use_same_private_key_v3.3' into 'release/v3.3'
ble_mesh: Not using pre-initialized private key (v3.3)

See merge request espressif/esp-idf!8947
2020-05-28 10:15:40 +08:00
Piyush Shah 8890fa98c8 esp_http_server: Fixed a bug which could cause issues with LRU purge
LRU counter should be started from 1, and not 0, so that all checks
work fine.

Closes https://github.com/espressif/esp-idf/issues/4753
2020-05-27 17:14:12 +00:00
lly 822b20eb40 ble_mesh: Transport tx fields overflow [Zephyr]
The transport segmented TX nack and seg_pending fields must be at least
6 bits to avoid overflow for 32 segment messages. This change rearranges
the seg_tx fields to gather all state flag fields in one byte, while
making the counter fields whole bytes.
2020-05-27 17:45:12 +08:00
lly b381998a23 ble_mesh: Friend with unknown appkey [Zephyr]
Ensures that friend messages are enqueued, even if the packet is
received with an appkey is unknown to the friend. Previously, sdu_recv
would return EINVAL if the appkey was unknown, which would prevent the
lower transport layer from adding the packet to the friend queue. This
is irrelevant for the logic in lower transport, and should not be
returned as an error.
2020-05-27 17:44:58 +08:00
lly 393e4e9007 ble_mesh: Not using pre-initialized private key 2020-05-27 17:38:41 +08:00
lly 4b191ac6fb ble_mesh: Same func for storing/restoring comp data 2020-05-27 17:32:56 +08:00
Jiang Jiang Jian 221ca4b1e5 Merge branch 'bugfix/fix_some_wifi_bugs_0427_v3.3' into 'release/v3.3'
Bugfix/fix some wifi bugs 0427 (v3.3)

See merge request espressif/esp-idf!8573
2020-05-26 18:57:43 +08:00
David Čermák 0a558ea3c4 Merge branch 'bugfix/ws_client_fragmented_send_v3.3' into 'release/v3.3'
ws_client: fix fragmented send setting proper opcodes (v3.3)

See merge request espressif/esp-idf!8692
2020-05-25 17:22:02 +08:00
Marius Vikhammer 0829b5c5d5 websocket client: the client now aborts the connection if send fails.
Closes IDF-1744
2020-05-25 17:11:23 +08:00
Jiang Jiang Jian 19736dbedc Merge branch 'bugfix/supplicant_general_fixes_33' into 'release/v3.3'
wpa_supplicant: Fix some memleaks and invalid memory access(backport V3.3)

See merge request espressif/esp-idf!8741
2020-05-22 21:18:36 +08:00
lly 879bfc608c ble_mesh: Fix Provisioner failed to publish 2020-05-22 15:49:30 +08:00
David Cermak 612b9e4a58 ws_client: fix fragmented send setting proper opcodes
Previous implementation violated the RFC by having both the actual opcode and WS_FIN flag set for all fragments of a message.
Fixed by setting the opcode only for the first fragment and WS_FIN for the last one

Closes IDFGH-2938
Closes https://github.com/espressif/esp-idf/issues/4974
2020-05-22 06:16:29 +00:00
Island 796dc4bb35 Merge branch 'bugfix/ble_mesh_friend_init_flag_v3.3' into 'release/v3.3'
Bugfix/ble mesh friend init flag (v3.3)

See merge request espressif/esp-idf!8849
2020-05-22 10:50:55 +08:00
Island 6046e7b26f Merge branch 'bugfix/ble_mesh_node_old_version_to_new_v3.3' into 'release/v3.3'
ble_mesh: Fix mesh node device role restore (v3.3)

See merge request espressif/esp-idf!8725
2020-05-21 15:10:29 +08:00
lly 1b1aea24f0 ble_mesh: Clear two more vars during proxy server deinit 2020-05-21 14:29:04 +08:00
lly e55c65562c ble_mesh: Add missing sdkconfig.h 2020-05-21 14:28:57 +08:00
lly 1ad9de1131 ble_mesh: Init device name during proxy server init
Device name will be reset when deinit mesh stack. If not
initializing device name during the next mesh stack init,
it will fail to set the device name when using bluedroid.
2020-05-21 14:28:49 +08:00
lly 8e4399bf29 ble_mesh: Add init flag for friend init/deinit
Since bt_mesh_friend_init() will only be invoked when
a device is provisioned or Provisioner is enabled, so
we add a flag to indicate if the friend functionality
is initialized in case deinit before initialization.
2020-05-21 14:28:40 +08:00
Island cb4e8cef87 Merge branch 'bugfix/ble_mesh_fix_typos_v3.3' into 'release/v3.3'
ble_mesh: Fix typos (v3.3)

See merge request espressif/esp-idf!8727
2020-05-21 11:47:33 +08:00
Island f55719522e Merge branch 'bugfix/ble_mesh_remove_patch_v3.3' into 'release/v3.3'
ble_mesh: Remove patch for the bug of an App (v3.3)

See merge request espressif/esp-idf!8780
2020-05-21 11:46:49 +08:00
Prasad Alatkar 04e3cf44bc NimBLE: Include upstream fixes and use macros for log level filtering (backport v3.3)
Change list:
- Reduces the size of the compiled binary, PR: https://github.com/espressif/esp-nimble/pull/6
- Null pointer check, PR: https://github.com/apache/mynewt-nimble/pull/701
- Pairing procedure abort on unexpected req: https://github.com/apache/mynewt-nimble/pull/710
- Fix conn flags after pairing: https://github.com/apache/mynewt-nimble/pull/730
- Remove notification for update process timeout (Vol 6, Part B, section 5.2 ):
  https://github.com/apache/mynewt-nimble/pull/782
- CCCD fix : https://github.com/apache/mynewt-nimble/pull/790 and
  https://github.com/apache/mynewt-nimble/pull/804
- Host based Privacy (RPA) fix: https://github.com/espressif/esp-nimble/pull/7

 Closes https://github.com/espressif/esp-nimble/issues/10

 Closes https://github.com/espressif/esp-idf/issues/4413
2020-05-20 16:27:53 +05:30
zhangyanjiao 1a1b3a8538 wifi changes:
1. fix the bug for softAP update second channel wrong
2. change wifi_scan_time_t from union to struct
3. query country code wrong when policy change from manual to auto
4. fix the crash issue when fetch peer after delete the cur_peer
5. fix the timeout issue of EAPOL four-way handshake
2020-05-20 17:55:11 +08:00
lly d6e189927e ble_mesh: Remove patch for the bug of an App 2020-05-15 20:24:35 +08:00
xiehang 92e4f84ec5 esp_wifi: Fix AP switch to adjacent channel without disconnect 2020-05-15 14:42:03 +08:00
kapil.gupta b91bba1a07 wpa_supplicant: Fix some memleaks and invalid memory access
Add changes to fix issues reported in clang analyzer
2020-05-14 11:28:27 +05:30
lly 8cdaf34430 ble_mesh: Fix typos 2020-05-13 18:33:46 +08:00
lly 4f402486c6 ble_mesh: Fix mesh node device role restore
Old version of BLE Mesh has no device role storage, because
previously we only support storing mesh node info.
If the binary of the node is upgraded from old version to a
new version (support storing provisioner info), the mesh info
of the node will not be restored because mesh role does not
exist in the flash.
2020-05-13 18:24:44 +08:00
Island 19893abd04 Merge branch 'bugfix/sync_zephyr_bt_mesh_bugfix_v3.3' into 'release/v3.3'
Bugfix/sync zephyr bt mesh bugfix (v3.3)

See merge request espressif/esp-idf!8689
2020-05-13 18:15:22 +08:00
lly 46a8982a80 ble_mesh: A specific fix for compile warning in idf3.3
- Remove the extra #include "bt_common.h" in mesh_timer.c
- Compared with the latest idf, idf3.3 defines BIT(nr) in
  the "soc/soc.h" without the pre-condition "#ifndef BIT",
  which will cause compile warning when using mesh. So we
  include the header file "soc/soc.h" in "mesh_util.h",
  which can bypass the definition of "BIT" in "mesh_util.h"
  when compiling.
2020-05-13 03:40:30 +00:00
lly 8deabb7945 ble_mesh: Fix not update prov addr in fast prov
When using fast provisioning, the Provisioner functionality
will be enabled. Unicast addresses within the pre-allocated
range will be used for provisioning nodes. And during the
address assignment, the allocated unicast address will be
checked that if it's duplicated with other nodes addresses
and the Provisioner's own addresses.
So before starting using fast provisioning, we need to update
the Provisioner address.
2020-05-13 03:40:30 +00:00
lly f1abf94922 ble_mesh: net_key_status only pull one key idx [Zephyr]
Fixes bug where the config client's net_key_status handler would attempt
to pull two key indexes from a message which only holds one.
2020-05-13 03:40:30 +00:00
lly f5f9d34443 ble_mesh: Update client message timeout calculation
Since the behavior of sending segmented messages has been
changed properly, the calculation of timeout value which
will be used when sending an acknowledged message by a
client model also needs to be updated.
2020-05-13 03:40:30 +00:00
lly 08a463907e ble_mesh: Add lock for segmented msg operations
Add mutex to protect some variables of the mesh segmented
messages.
Currently the timeout handler of mesh will be executed in
the btc task, while the received mesh messages will be
handled in the btu task. In case some variables are set to
NULL when handled in the btu task, meanwhile these variables
are also accessed in the timeout handler, so we add mutex to
protect these variables and related operations.
2020-05-13 03:40:30 +00:00
lly 367677c3bb ble_mesh: Fix dereferencing pointer before checking for NULL [Zephyr]
The publication context is checked for NULL in bt_mesh_model_publish()
however it was dereferenced before that. Move the assignment to
ctx.send_rel to the same place where other ctx members are set.
2020-05-13 03:40:30 +00:00
lly b0a6fc7937 ble_mesh: Optimize some mesh log output 2020-05-13 03:40:30 +00:00
lly 30d62cc00f ble_mesh: Fix restore when revoke keys [Zephyr]
Store keys (NetKey and AppKey) again after revoking.
2020-05-13 03:40:30 +00:00
lly 2983f6edb1 ble_mesh: Spit mesh_util.h into different header files
Split mesh_util.h into mesh_byteorder.h, mesh_compiler.h,
mesh_ffs.h and mesh_util.h based on the classification of
Zephyr, which will make further porting more clear.
2020-05-13 03:40:30 +00:00
lly 35c5a7a08c ble_mesh: Split mesh os related into a separate file 2020-05-13 03:40:30 +00:00
lly 0daac93e4e ble_mesh: Split mesh mutex into a separate file 2020-05-13 03:40:30 +00:00
lly ec34cd8338 ble_mesh: Rename mesh_kernel.* to mesh_timer.* 2020-05-13 03:40:30 +00:00
lly 92cfbe3c6c ble_mesh: Add and use transport macro definitions [Zephyr] 2020-05-13 03:40:30 +00:00
lly e2186b1d3a ble_mesh: Friend SeqAuth cleanup [Zephyr]
The Friend queue uses the message SeqAuth to determine whether the
message is already in the queue. To facilitate this, the SeqAuth is
passed around as a pointer throughout the transport modules. In the
bt_mesh_ctl_send functions, this parameter is also exposed in the API,
but the internal usage is inconsistent and buggy. Also, no one actually
uses this parameter.

- Removes seq_auth param from bt_mesh_ctl_send, instead passing NULL
  directly to the friend module, to enforce its addition to the queue.
- Makes the seq_auth pointer const throughout the friend module.
2020-05-13 03:40:30 +00:00
lly 489d32663b ble_mesh: Rework msg_cache [Zephyr]
Changes the behavior of the message cache to optimize for cache
capacity. Previously, the message cache's primary function was to avoid
decrypting messages multiple times, although the cache's main function
in the spec is to avoid message rebroadcasting. Optimizing for minimal
decryption causes us to fill the network cache faster, which in turn
causes more cache misses, potentially outweighing the advantage.

Now stores src + seq in message cache instead of field hash value. This
cuts cache size in two, while including more of the sequence number than
before.

Adds messages to the cache only after the packet is successfully
decrypted. This reduces noise in the cache, and ensures that no
invalid deobfuscations are added.

Additionally, this fixes a bug where multiple calls to net_decrypt with
the same packet failed, as the message cache found its own entry from
the previous call.
2020-05-13 03:40:30 +00:00
lly febe084113 ble_mesh: Segmented TX to groups [Zephyr]
Implements several changes to the transport layer segmented tx to
improve group message performance:
- Moves retransmit counter to tx context instead of per packet. As every
  unacked packet is sent every retransmit, the retransmit counters would
  be the same in each segment. This makes it easier to control progress.
- Delays the scheduling of the retransmit until the completion of the
  last segment by adding a seg_pending counter. This is essentially the
  same as the old behavior, except that the old behavior might retrigger
  the sending before all segments are finished if the advertising is
  slow.
- Allows the group transmits to stop as soon as all retransmits have
  been exhausted, instead of timing out waiting for acks that won't
  come. This allows group tx to finish without error.
- Fixes a bug where a failed TX would block IV update.
- Cancels any pending transmissions of acked segments.
- Reduces log level for several common group tx scenarios that aren't
  erronous.
2020-05-13 03:40:30 +00:00
lly b6729860dd ble_mesh: Add comment explaining use of byte order [Zephyr]
Add comment that explains why a different byte order is used for the
3-byte opcode on the CID part of the opcode.
2020-05-13 03:40:30 +00:00
lly 9f9acb6c4a ble_mesh: Use 24-bit functions [Zephyr]
Use 24-bit functions for byteorder and net_buf in order to make the
byteorder used more readable.
2020-05-13 03:40:30 +00:00
lly 6d77a8b0c8 ble_mesh: Optimize net_buf_simple routines [Zephyr]
Use sys_put_xyz() helpers instead of memcpy() whenever possible. This
brings in straight-line inline code for pushes and adds of known,
small sizes.
2020-05-13 03:40:30 +00:00
lly fa06b60568 ble_mesh: Add PRIu64 & PRIx64 in mesh_types.h 2020-05-13 03:40:30 +00:00
lly bb09078b65 ble_mesh: Add push functions for supported bit-variants [Zephyr]
Add push functions for bit-widths supported by add and pull functions.
2020-05-13 03:40:30 +00:00
lly 0522ce7cf3 ble_mesh: Add support for 64 bit data type [Zephyr]
This enables pulling and pushing values in 64 bit format.
2020-05-13 03:40:30 +00:00
lly b41d50908b ble_mesh: Add support for 48 bit data type [Zephyr]
This enables pulling and pushing values in 48 bit format.
2020-05-13 03:40:30 +00:00
lly be57df5e19 ble_mesh: Add 48 bit variants [Zephyr]
This adds sys_*_*48 functions that operation on a 48 bits values.
2020-05-13 03:40:30 +00:00
lly fd5e18eb49 ble_mesh: Add support for 24 bit data type [Zephyr]
This enables pulling and pushing values in 24 bit format.
2020-05-13 03:40:30 +00:00
lly 4963d4ddf8 ble_mesh: Add 24 bit variants [Zephyr]
This adds sys_*_*24 functions that operation on a 24 bits values.
2020-05-13 03:40:30 +00:00
lly bc1722260f ble_mesh: Group resends in proxy nodes [Zephyr]
Resend transport segments for groups on the advertiser interface, even
if a connected proxy node holds the group.
2020-05-13 03:40:30 +00:00
lly 968772d18a ble_mesh: Typo in condition in comp_add_elem of cfg_srv [Zephyr]
Vendor model IDs take up four (not two) bytes in the composition
2020-05-13 03:40:30 +00:00
lly a45406fe6e ble_mesh: GATT Proxy Spec 1.0.1 changes [Zephyr]
Backport of https://github.com/apache/mynewt-nimble/pull/724

Mesh spec 1.0.1 changes proxy disabling behavior to only affect the
relaying from proxy nodes. Previously, disabling proxy would shut down
all proxy and node activity.

Tweaks from the original commit:
- Removed redundant call to bt_mesh_adv_update() in gatt_proxy_set()
- Removed invalid ref to 4.2.11.1 in node_identity_set()

---

According to Mesh Profile Spec 1.0.1, Section 4.2.11:
"If the Proxy feature is disabled, a GATT client device can connect
over GATT to that node for configuration and control. Messages from
the GATT bearer are not relayed to the advertising bearer."

Moreover some notes have been removed from the spec compared to
version 1.0:

Mesh Profile Spec 1.0, Section 4.2.11:

"Upon transition from GATT Proxy state 0x01 to GATT Proxy state 0x00
the GATT Bearer Server shall disconnect all GATT Bearer Clients."

"The Configuration Client should turn off the Proxy state as the last
step in the configuration process."

Mesh Profile Spec 1.0, Section 4.2.11.1:

"When the GATT Proxy state is set to 0x00, the Node Identity state
for all subnets shall be set to 0x00 and shall not be changed."
2020-05-13 03:40:30 +00:00
lly 10f2ed14eb ble_mesh: Support reliable sending when publishing [Zephyr]
Until now the choice of reliable sending (segmented messages with
acks) was implicitly dependent on the size of the payload. Add a new
member to the bt_mesh_model_pub to force using segment acks even when
the payload would fit a single unsegmented message.
2020-05-13 03:40:30 +00:00
lly cd19f6faf1 ble_mesh: Check device uuid when init provisioning 2020-05-13 03:40:30 +00:00
lly abcfcc47ec ble_mesh: Fix provisioning buffer initialization [Zephyr]
When PB-GATT support has been enabled the provisioning code "borrows"
the buffer from the proxy code. However, the way that initialization
was happening the proxy buffers were initialized only after
provisioning initialization, resulting in a corrupted buffer with
buf->data pointing to NULL. Reorder the initialization calls so that
proxy is done first and provisioning only after it.
2020-05-13 03:40:30 +00:00