Commit graph

7196 commits

Author SHA1 Message Date
Jiang Jiang Jian e07a64925b Merge branch 'bugfix/coex_bt_ble_stuck_v4.0' into 'release/v4.0'
components/bt: Fix A2DP stuck when BLE's interval is too small

See merge request espressif/esp-idf!7220
2020-02-13 11:08:20 +08:00
Jiang Jiang Jian e07ecea868 Merge branch 'hfp_a2dp_iphone_4.1' into 'release/v4.0'
components bt/: Disable sniff mode during (e)SCO connection for HFP. [backport 4.0]

See merge request espressif/esp-idf!7249
2020-02-13 11:08:10 +08:00
Jiang Jiang Jian 5b9cb366c2 Merge branch 'bugfix/fix_airkiss_bug_v4.0' into 'release/v4.0'
fix the bug for Airkiss

See merge request espressif/esp-idf!7346
2020-02-13 11:07:41 +08:00
Jiang Jiang Jian d5bd2256f4 Merge branch 'bugfix/fix_ble_mesh_memory_leak_v4.0' into 'release/v4.0'
ble_mesh: Fix memory leak when node is reset (v4.0)

See merge request espressif/esp-idf!7278
2020-02-13 10:58:09 +08:00
Jiang Jiang Jian c235640bf4 Merge branch 'bugfix/ble_mesh_update_lightness_last_v4.0' into 'release/v4.0'
ble_mesh: Update lightness last state when actual state is changed (v4.0)

See merge request espressif/esp-idf!7281
2020-02-13 10:58:06 +08:00
Jiang Jiang Jian 6193a439a3 Merge branch 'bugfix/sync_zephyr_v2.0_ble_mesh_fixes_v4.0' into 'release/v4.0'
ble_mesh: sync Zephyr v2.0 ble mesh fixes (v4.0)

See merge request espressif/esp-idf!7300
2020-02-13 10:58:03 +08:00
liu zhifu a3cd5ab1ae esp_wifi: improve WiFi performance 2020-02-13 10:50:48 +08:00
lly 3bf1b9b8ab ble_mesh: Fix compile error with c++ files 2020-02-13 09:52:10 +08:00
lly 04fc15a4f3 ble_mesh: Fix memory leak when node is reset
When node is being reset, the init functions of each sig-defined
models will be invoked again, this will cause memory leak because
some model internal data will be allocated again.
Hence before trying to allocate memory for them, we add some check
to make sure no memory has been allocated previously.
And for client model, when the init functions are invoked again,
we will clear the list items.
2020-02-12 12:03:31 +00:00
lly e95b59c089 ble_mesh: Kconfig included a UTF-8 comma 2020-02-12 18:28:06 +08:00
Angus Gratton 91dc4d78f8 Merge branch 'bugfix/select_driver_not_installed_v4.0' into 'release/v4.0'
VFS: Check in select() if the UART driver is installed or not (v4.0)

See merge request espressif/esp-idf!7417
2020-02-11 12:08:48 +08:00
Angus Gratton 2bee223250 Merge branch 'bugfix/part_gen_subtype_fix_v4.0' into 'release/v4.0'
partition_table: Fix subtype in gen_esp32part.py (v4.0)

See merge request espressif/esp-idf!7536
2020-02-11 12:06:25 +08:00
Mahavir Jain 8df70a1728 cJSON: include only source file objects for cmake build
Test file can cause build issues in some cases, since it has its own main() function
2020-02-10 17:32:26 +05:30
boarchuz 8c88f0f1f6 Fix subtype in PartitionTable.find_by_type
Fix ptype->subtype

Closes https://github.com/espressif/esp-idf/pull/4723
2020-02-10 12:04:45 +01:00
Ivan Grokhotkov 313c1ed1ba Merge branch 'bugfix/esp_log_from_critical_v4.0' into 'release/v4.0'
intr_alloc: don't call ESP_LOG from a critical section (backport v4.0)

See merge request espressif/esp-idf!7159
2020-02-10 17:34:53 +08:00
Ivan Grokhotkov 0c2c821f8f Merge branch 'bugfix/esp_ptr_executable_single_core_v4.0' into 'release/v4.0'
soc: Fix esp_ptr_executable() for single core ESP32 config & cache memory (v4.0)

See merge request espressif/esp-idf!7464
2020-02-10 16:30:34 +08:00
Ivan Grokhotkov f5dc81aaae Merge branch 'bugfix/panic_cache_err_dig_reset_v4.0' into 'release/v4.0'
esp32: panic: do digital reset if cache error interrupt is set (backport v4.0)

See merge request espressif/esp-idf!7484
2020-02-10 16:30:02 +08:00
Angus Gratton 3f76083e8c Merge branch 'bugfix/several_ethernet_bugfix_from_4.1' into 'release/v4.0'
Ethenret driver bugfix and optimization (4.0)

See merge request espressif/esp-idf!7426
2020-02-06 14:38:47 +08:00
Hrudaynath Dhabe 8f0f3e8f88 WPS_CONFIG_INIT_DEFAULT(type) error 2020-02-06 14:06:38 +08:00
Ivan Grokhotkov 4ce7b666a6 esp32: panic: do digital reset if cache error interrupt is set
Even if frame->exccause != PANIC_RSN_CACHEERR, it is possible that
the cache error interrupt status is set. For example, this may happen
due to an invalid cache access in the panic handler itself.
Check cache error interrupt status instead of frame->exccause to
decide whether to do CPU reset or digital reset.

Also remove unnecessary esp_dport_access_int_pause from
esp_cache_err_get_cpuid, since the panic handler already calls
esp_dport_access_int_abort on entry.
2020-01-30 12:28:22 +01:00
Angus Gratton f27a344fc9 Merge branch 'bugfix/parttool_backtraces_v4.0' into 'release/v4.0'
parttool: Avoid unnecessary exception backtrace for legitimate errors (v4.0)

See merge request espressif/esp-idf!7463
2020-01-30 13:36:52 +08:00
Angus Gratton a61fd1e42b Merge branch 'bugfix/esp_timer_stucks_into_esp_timer_impl_set_alarm_v4.0' into 'release/v4.0'
esp_timer/esp32: Fix esp_timer_impl_set_alarm() when CPU and APB freqs are changed (v4.0)

See merge request espressif/esp-idf!7304
2020-01-29 14:25:27 +08:00
Angus Gratton d897e522af soc: Fix esp_ptr_executable() for single core ESP32 config & cache memory
In single core mode, APP CPU cache region is added to the available range.
2020-01-29 10:03:30 +11:00
Angus Gratton 59649ea825 parttool: Fix regression when parsing binary partition data
Regression in a91de43537
2020-01-29 09:40:23 +11:00
Angus Gratton bdb0851065 parttool: Avoid unnecessary exception backtrace for legitimate errors
Previous version used exception handling for program control flow,
which makes for long and confusing backtrace messages if an error
occurs while parsing the CSV (as it also prints the phony error that
occurred while trying to parse as a binary, then prints
"During handling of the above exception, another exception occurred:",
then prints the real error).

Use the same heuristic that is applied in gen_esp32_part, instead.

Also, avoid printing the entire backtrace if the error is a gen_esp32_part
InputError, same as gen_esp32part does.

Found while looking into https://github.com/espressif/esp-idf/issues/4474
2020-01-29 09:40:22 +11:00
KonstantinKondrashov 9a24d95907 esp_timer/esp32: Fix case when alarm_reg > counter_reg but FRC_TIMER_INT_STATUS is not set
Closes: WIFI-1576
Closes: https://github.com/espressif/esp-idf/issues/2954
2020-01-28 21:41:27 +08:00
Angus Gratton 08219f3cf5 Merge branch 'bugfix/esp_tls_blocking_timeout_v4.0' into 'release/v4.0'
esp-tls: add timeout for blocking connection (v4.0)

See merge request espressif/esp-idf!7396
2020-01-22 11:44:48 +08:00
Angus Gratton b324ab9c6e Merge branch 'bugfix/mqtt_submodule_ref_update_v4.0' into 'release/v4.0'
mqtt: update submodule to point to latest commit (backport 4.0)

See merge request espressif/esp-idf!7276
2020-01-22 11:29:34 +08:00
morris 93e5a31685 ethernet: always put eth_driver handle in SRAM
Closes https://github.com/espressif/esp-idf/issues/4635
2020-01-21 21:30:34 +08:00
morris 01cc5a38cc ethernet: work with cache disabled 2020-01-21 21:30:18 +08:00
morris 7b128595ac ethernet: optimise tx and rx 2020-01-21 20:51:03 +08:00
Roland Dobai 642dc19c25 VFS: Check in select() if the UART driver is installed or not
Closes https://github.com/espressif/esp-idf/issues/4627
2020-01-21 10:11:08 +01:00
baohongde e38c080f79 components/bt: Fix error EIR type in config eir event 2020-01-20 21:50:01 +08:00
David Cermak c7e1416174 esp_tls: added connection timeout to esp_tls_conn_new_sync() 2020-01-20 07:26:51 +01:00
David Cermak e0c88dbd73 esp_tls: fail connection if esp_tls_conn_new() timeouts 2020-01-20 07:08:40 +01:00
Paul Abbott a58fa7665a Bugfix(LEDC): Add missing ledc_set_pin declaration in led.h 2020-01-17 10:22:36 +08:00
gengyuchao 443ea78e78 bugfix:Fix length check for snprintf in osi config. And remove the error code when there is no file in the nvs in config.c 2020-01-16 16:20:43 +08:00
gengyuchao ed6805625c ble:set a esp api to get size of controller send packets buffer. 2020-01-16 16:09:34 +08:00
gengyuchao 74a89774fd bugfix:Fixed throughput wasting memory and packet loss issues. 2020-01-16 16:09:17 +08:00
gengyuchao 7dc5c2af59 ble Fix typo and add some comment 2020-01-16 16:05:44 +08:00
Brian Friedkin e5bd8b1982 add missing gatt descriptors 2020-01-16 16:05:29 +08:00
Geng Yu Chao 5445c80a8e component/bt: Fix the issue with pointer type conversion in gattc. Unified count pointer type in bta and btc, change pointer type in bta from int to uint16_t. 2020-01-16 15:26:37 +08:00
Geng Yu Chao 69d341f7f0 Fix some typo in idf 2020-01-16 15:26:37 +08:00
KonstantinKondrashov f927957950 esp32: Add UT for DPORT 2020-01-16 13:31:20 +08:00
KonstantinKondrashov 6fca0e3861 esp32: Fix esp_dport_access_reg_read 2020-01-16 13:31:20 +08:00
zhangyanjiao 5202be013a fix the bug for Airkiss 2020-01-16 11:54:02 +08:00
gengyuchao 4900ead609 bugfix:btmd fix the problem that fixed_queue_enqueue may give the wrong semaphore if list_append fail to calloc a new node 2020-01-16 11:32:40 +08:00
Ivan Grokhotkov 386804d407 intr_alloc: don't call ESP_LOG from a critical section
Calling ESP_LOG from a critical section leads to abort() in 4.1, and
may also randomly abort() in earlier versions.

Closes FCS-268
2020-01-15 04:16:24 +00:00
zhiweijian 93409bd57e component/bt: fix blufi prepare write buf len invalid 2020-01-14 17:25:54 +08:00
zhiweijian 32ba52760f Component/bt: Fix GATTC trigger open event multiple times 2020-01-14 17:24:36 +08:00
Marius Vikhammer 158f2d065d mqtt: update submodule to point to latest commit.
Adds bugfixes for:
 - Too early publishing
 - Potential mutex memory leak
 - CI related issues.
 - Wait for entire connack message
 - Event loop not getting cleaned up

Adds support for ALPN, configurable reconnect time, QEMU CI tests and password
protected client key.

MQTT MR: esp-mqtt/merge_requests/46
Closes IDF-1162
Closes https://github.com/espressif/esp-mqtt/issues/137

MQTT MR: esp-mqtt/merge_requests/47
Closes IDF-1126

MQTT MR: esp-mqtt/merge_requests/48
Closes IDFGH-2197
Closes https://github.com/espressif/esp-idf/issues/4349
Closes https://github.com/espressif/esp-mqtt/issues/140

MQTT MR: esp-mqtt/merge_requests/48
Closes IDFGH-2235
Closes https://github.com/espressif/esp-idf/issues/4384

MQTT MR: esp-mqtt/merge_requests/49
Closes https://github.com/espressif/esp-idf/issues/4433
Closes IDFGH-2293

MQTT MR: esp-mqtt/merge_requests/50
Closes FCS-254

MQTT MR: esp-mqtt/merge_requests/53
Closes FCS-267
2020-01-14 10:55:50 +08:00
lly 14a408c478 ble_mesh: Fix PreviousAddress endianess in Friend Request
The upper transport layer is using big endian ordering. The
PreviousAddress field of a Friend Request message should therefore
be converted to native endianess using sys_cpu_to_be16().
2020-01-13 10:40:25 +08:00
lly 92d0d7ad49 ble_mesh: Fix next_period computation
If the duration to publish is roughly the same as the period, we might
end up with elapsed == period, which returns 0 and cancel the periodic
publication. Instead 1 should be returned, just like when the elapsed
time is greater than the period.
2020-01-13 10:40:20 +08:00
lly 19c9ae400b ble_mesh: Make model publication struct more compact
Previously the FastPeriodDivisor value was introduced to the model
publication struct. Based on the way it was grouped it seems the
intention was to fit it within the same octet as other bit fields,
but it actually makes the octet overflow by one bit. This ends up
creating another u8_t variable which in turn adds 24 bits of padding
after it.

To keep the size of the struct as compact as possible, group the flag
together with the key index, since that only requires 12 bits. Some
care is needed here, since the mesh stack does have special internal
key index values that require more than 12 bits such as
BLE_MESH_KEY_UNUSED and BLE_MESH_KEY_DEV. In this case restricting
ourselves to 12 bits is fine since the value in the model publication
struct follows 1:1 the value received in the Config Model Publication
Set message, and there the parameter is defined to be exactly 12 bits.
2020-01-13 10:40:13 +08:00
lly 566fb11a73 ble_mesh: Fix compile error when using release optimization level 2020-01-13 10:40:05 +08:00
lly 928480ada9 ble_mesh: Remove useless CONFIG_BLE_MESH_NODE
For Low Power node and Proxy Server, the two features
depend on BLE_MESH_NODE in Kconfig.in, here in the
stack there is no need to judge if CONFIG_BLE_MESH_NODE
is enabled.
2020-01-13 10:39:57 +08:00
lly da0205b166 ble_mesh: Fixes Provisioner not support friend feature 2020-01-13 10:39:52 +08:00
lly 610fc8124a ble_mesh: Fixes wrong subnet info used for Friend Clear
When Friend node tries to send Friend Clear message to other
Friend nodes, it should use the subnet information based on
the net_idx from friendship.
2020-01-13 10:39:42 +08:00
lly 21dbee1291 ble_mesh: fix provisioner failed to send msg to 0xFFFF
According to Mesh Spec 3.4.5.3, a node shall implement a local
network interface. And here we limit the situation just based
on the spec, and Provisioner directly sending the msg without
passing through the local network interface.
2020-01-13 10:39:37 +08:00
lly e5431e55a9 ble_mesh: fix virtual addr wrong return value
Fixes missing return value on `va_del`
Fixes wrong return value on `va_add`
2020-01-13 10:39:28 +08:00
lly 4405560483 ble_mesh: Persistent storage of Virtual Address
The 16-bit format group addresses will be stored,
but we don't store (or restore) the virtual label UUIDs,
i.e. after a power cycle the 16-bit group addresses
would be meaningless.
2020-01-13 10:39:22 +08:00
lly 51616eacee ble_mesh: Proxy forwards ALL_NODES addr
Unless explicitly blacklisted, the Proxy node will forward all messages
for the ALL_NODES address to the GATT proxy client.
2020-01-13 10:39:15 +08:00
lly 4aa7f31f02 ble_mesh: Model message macros
Creates macros for determining model message lengths based on opcode,
payload length and MIC size. Also adds macro wrapping
NET_BUF_SIMPLE_DEFINE to serve the most common use case.
2020-01-13 10:39:10 +08:00
lly 318f83e33a ble_mesh: Use net_buf_simple_clone
Uses net_buf_simple_clone to access the sdu of an unsegmented app packet
for re-encryption.
2020-01-13 10:39:03 +08:00
lly 4bf2ceee4e ble_mesh: Skip local messages in rx
Local messages are already enqueued for the LPN in the tx path, and
don't have to be added again in the rx path.
2020-01-13 10:38:59 +08:00
lly a9c5092baf ble_mesh: Ensure seqnum match in app/net
Re-encrypts single-segment application messages when the network seqnum
has changed, to avoid encrypting messages with different seqnums in
network and transport. This operation is only required for unsegmented
messages, as segmented messages don't need to use the same seqnum in
network.

Reinstates the special adv data for friend messages to store the app key
index.
2020-01-13 10:38:54 +08:00
lly 9e47e04897 ble_mesh: Expose app key get function 2020-01-13 10:38:48 +08:00
lly ca0bfb84d0 ble_mesh: Expose header parsing outside net 2020-01-13 10:38:38 +08:00
lly cc772c1324 ble_mesh: Remove unused macro FRIEND_BUF_SIZE 2020-01-13 10:38:31 +08:00
lly c344a4a3b9 ble_mesh: Make RSSI value available to mesh applications 2020-01-13 10:38:26 +08:00
lly 32387250bc ble_mesh: Encrypt friend packets on send
Stores friend queue packets unencrypted, removing any out-of-order
issues caused by seqnum allocation. Also moves as much of the metadata
storage as possible into the packet, allowing us to free up some bytes
of net_buf user data for friend packets.
2020-01-13 10:38:21 +08:00
lly a870460f72 ble_mesh: Expose SeqZero mask
Makes a define for the seqzero 13-bit mask in transport, and exposes it
in the header for use in the friend module.
2020-01-13 10:38:15 +08:00
lly cf2c5b8d96 ble_mesh: Update lightness last state when actual state is changed 2020-01-10 15:33:59 +08:00
Ivan Grokhotkov aa51829ec8 Merge branch 'bugfix/cmake_reflashable_build_targets_v4.0' into 'release/v4.0'
secure boot: Fix bootloader build system target for bootloader digest (v4.0)

See merge request espressif/esp-idf!7229
2020-01-09 15:56:08 +08:00
Angus Gratton dcd735759e Merge branch 'bugfix/mdns_deinit_event_crash_v4.0' into 'release/v4.0'
mdns: fixed crash on event during deinit (v4.0)

See merge request espressif/esp-idf!7246
2020-01-09 13:02:28 +08:00
Angus Gratton a36bbd4e95 Merge branch 'bugfix/mdns_send_sdptr_answer_v4.0' into 'release/v4.0'
mdns: respond to discovery with the proper pseudo name _services._dns-sd._udp (v4.0)

See merge request espressif/esp-idf!7242
2020-01-09 13:01:11 +08:00
weitianhua a388eb8806 componnets_bt/:fix hfp/a2dp coex bug with iphone 2020-01-08 19:25:29 +08:00
David Cermak 1f263434a6 mdns: fixed crash on event during deinit
mdns library deinitialization destroys internal structures including action queue. if an event (e.g. network update) received
after some essential stucture is destoyed, an unexpected behavour might be introduced (e.g. crash of adding the event notification
to the action queue which was already destroyed

Closes WIFI-1485
2020-01-08 10:27:30 +01:00
David Cermak 06cc4e888d mdns: respond to discovery with the proper pseudo name _services._dns-sd._udp
Closes https://github.com/espressif/esp-idf/issues/4369
Closes IDFGH-2219
2020-01-08 10:21:28 +01:00
Xia Xiaotian 0a2371972a Fix WiFi beacon timeout and station fails to connect to AP sometimes
when WiFi and Bluetooth run togerther.
2020-01-08 16:48:16 +08:00
Angus Gratton e3d65c8e3e Merge branch 'bugfix/ws_user_context_v4.0' into 'release/v4.0'
websocket: added missing event data (backport v4.0)

See merge request espressif/esp-idf!7195
2020-01-07 14:34:08 +08:00
Angus Gratton 6da2676a3c secure boot: Fix bootloader build system target for bootloader digest
Closes https://github.com/espressif/esp-idf/issues/4513
2020-01-07 09:38:01 +11:00
baohongde 3ae110b30c components/bt: Fix A2DP stuck when BLE's interval is too small
1. Fix the cumulative time switch from BLE to classic BT
2. Enhance classic BT performance while enable calssic BT and BLE at the same time
2020-01-06 20:31:54 +08:00
Jack 2ea0062fe8 Fix wifi stop bug when sniffer enable 2020-01-04 15:25:09 +08:00
Angus Gratton 16e102199a Merge branch 'bugfix/backport_nvs_iterator_fix' into 'release/v4.0'
NVS: iterator corrupting entries (backport v4.0)

See merge request espressif/esp-idf!7071
2020-01-03 13:07:20 +08:00
Marius Vikhammer 2215aeaad8 websocket: added missing event data
user_context was missing from websocket event data, added. Also added the websocket client handle to the event data.

Removed  unused event data struct.

Closes: IDF-1271
2020-01-03 10:01:10 +08:00
Wang Jia Lin 51a1421f65 Merge branch 'bugfix/i2s_timergroup_dev_array_used_by_isr_issue' into 'release/v4.0'
bugfix(driver): fix i2s and timergroup some issues

See merge request espressif/esp-idf!7141
2020-01-02 21:20:21 +08:00
Jiang Jiang Jian 0cefe6df78 Merge branch 'bugfix/fix_a_wifi_rx_bug_v4.0' into 'release/v4.0'
esp_wifi: fix a WiFi receiving bug (backport v4.0)

See merge request espressif/esp-idf!7002
2020-01-02 16:30:04 +08:00
Angus Gratton 20e75ef87d Merge branch 'feat/spi_internal_header_v4.0' into 'release/v4.0'
spi: move deprecated functions into internal header (backport v4.0)

See merge request espressif/esp-idf!7103
2020-01-02 02:16:18 +08:00
xiongyu 96a5e34d7a bugfix(driver): fix i2s and timergroup some issues
* fix i2s and timergroup dev array used by isr crash issue

* Closes IDFGH-2432

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

* fix i2s adc data inv issue

* Closes IDFGH-2444

* Closes https://github.com/espressif/esp-idf/issues/4557
2019-12-31 11:02:35 +08:00
Jakob Hasse daa2178f30 WIFI: added log for wifi test, increased timeout 2019-12-31 08:33:11 +08:00
Jakob Hasse 92b10b4ba3 NVS: bugfix nvs_set_str/blob checks write mode 2019-12-31 08:33:11 +08:00
Jakob Hasse 69b0919904 NVS: BUGFIX non-matching type iterator works
Closes IDFGH-2229
2019-12-31 08:33:11 +08:00
Piyush Shah 84029130cf wifi_provisioning_softap: Allow applications to start webserver externally
If an application wants to use webserver, instead of creating another
webserver instance, the wifi provisioning manager can re-use the same.
The webserver handle can be passed using this new API.

Signed-off-by: Piyush Shah <piyush@espressif.com>
2019-12-30 17:34:05 +05:30
baohongde d93bff2699 components/bt: Revert changes of security mask 2019-12-29 06:29:23 +00:00
liu zhifu 0631d185bd esp_wifi: fix a WiFi receiving bug
Support WiFi/BT MAC register writting when the WiFi/BT common clock is disabled.
2019-12-26 19:41:04 +08:00
Michael (XIAO Xufeng) 6f6677ac42 spi: move deprecated functions into internal header
Resolves https://github.com/espressif/esp-idf/issues/4132
2019-12-24 17:43:32 +08:00
Shubham Kulkarni 0e623d4dbf esp32/rtc_module: Fixed critical section API
Application used to abort as portENTER_CRITICAL is used in ISR.
portENTER_CRITICAL is changed to portENTER_CRITICAL_SAFE in touch_pad_clear_status()

https://github.com/aws/amazon-freertos/issues/1651
2019-12-24 14:52:54 +05:30
Jiang Jiang Jian d41c020649 Merge branch 'bugfix/fix_ble_mesh_adv_buf_unref_v4.0' into 'release/v4.0'
ble_mesh: Fix adv buf unref and link_id in exceptional list (v4.0)

See merge request espressif/esp-idf!7080
2019-12-22 16:02:24 +08:00
lly 53e6eb8467 ble_mesh: Fix using wrong name for PB-GATT 2019-12-20 17:13:20 +08:00