Commit graph

8939 commits

Author SHA1 Message Date
lly 4fd1b2db0e ble_mesh: Add PRIu64 & PRIx64 in mesh_types.h 2020-05-11 02:29:18 +00:00
lly fb84166cbd ble_mesh: Add push functions for supported bit-variants [Zephyr]
Add push functions for bit-widths supported by add and pull functions.
2020-05-11 02:29:18 +00:00
lly ee1eb994b7 ble_mesh: Add support for 64 bit data type [Zephyr]
This enables pulling and pushing values in 64 bit format.
2020-05-11 02:29:18 +00:00
lly b186be52f0 ble_mesh: Add support for 48 bit data type [Zephyr]
This enables pulling and pushing values in 48 bit format.
2020-05-11 02:29:18 +00:00
lly 23c8bbcbf5 ble_mesh: Add 48 bit variants [Zephyr]
This adds sys_*_*48 functions that operation on a 48 bits values.
2020-05-11 02:29:18 +00:00
lly 4e1d3974fb ble_mesh: Add support for 24 bit data type [Zephyr]
This enables pulling and pushing values in 24 bit format.
2020-05-11 02:29:18 +00:00
lly 26dbfdcb9d ble_mesh: Add 24 bit variants [Zephyr]
This adds sys_*_*24 functions that operation on a 24 bits values.
2020-05-11 02:29:18 +00:00
lly 95440c4d28 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-11 02:29:18 +00:00
lly 1f47cfff7f 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-11 02:29:18 +00:00
lly 31b175e372 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-11 02:29:18 +00:00
lly e385197c27 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-11 02:29:18 +00:00
lly cc549897d5 ble_mesh: Check device uuid when init provisioning 2020-05-11 02:29:18 +00:00
lly ca3d1637ca 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-11 02:29:18 +00:00
lly 6c868a070b ble_mesh: Skip publish if update fails [Zephyr]
Allow models to skip a periodic publish interval by returning an error
from the publish update callback.

Previously, an error return from publish update would cancel periodic
publishing. This can't be recovered from, and as such, no valid model
implementation could return an error from this callback, and there was
no way to skip a periodic publish.
2020-05-11 02:29:18 +00:00
lly aad8908d9c ble_mesh: Enable Segmented Control Messages [Zephyr]
The function bt_mesh_ctl_send() used to support maximum length of
11 bytes. The segmentation complies with the BLE Mesh Standard.
The ack is disabled in case of non unicast address.
2020-05-11 02:29:18 +00:00
Michael (XIAO Xufeng) f7ec57b615 Merge branch 'feature/usb_wrap_headers' into 'master'
usb: add usb_wrap headers, move some code from LL to HAL

See merge request espressif/esp-idf!8395
2020-05-10 19:19:14 +08:00
David Čermák e86f530e42 Merge branch 'bugfix/mdns_config_stacksize' into 'master'
mdns: Allow config mDNS task stack size (GitHub PR)

Closes IDFGH-3219

See merge request espressif/esp-idf!8635
2020-05-09 19:49:15 +08:00
xiehang 0c7cac6ee3 esp_wifi: Fix AP switch to adjacent channel without disconnect 2020-05-09 17:26:51 +08:00
Jiang Jiang Jian 27d0ca52b2 Merge branch 'bugfix/fix_memleak_in_wpa3_feature' into 'master'
fix(wpa_supplicant): fix memleak in wpa3 feature

See merge request espressif/esp-idf!8643
2020-05-08 22:34:01 +08:00
Mahavir Jain 5425ef85ce Merge branch 'bugfix/pthread_tcb_cleanup_wrapper' into 'master'
Fix linking for vPortCleanUpTCB wrapper

See merge request espressif/esp-idf!8652
2020-05-08 21:31:35 +08:00
Krzysztof Budzynski fc4a5609ac Merge branch 'bugfix/docs_esp_https_ota' into 'master'
Resolve documentation issue reported by boarchuz in...

See merge request espressif/esp-idf!8648
2020-05-08 16:30:42 +08:00
Hrishikesh Dhayagude f67902a5dd Add NimBLE config options in sdkconfig.rename 2020-05-08 12:04:46 +05:30
Shubham Kulkarni 4a83b488a8 pthread: Use INTERFACE in target_link_libraries for vPortCleanUpTCB wrapper 2020-05-08 11:55:23 +05:30
Michael (XIAO Xufeng) 178c7c2e82 Merge branch 'bugfix/spi_lock_suppress_alter_log' into 'master'
spi: suppress spi_bus_lock_touch log level

Closes IDFGH-3030

See merge request espressif/esp-idf!8634
2020-05-08 11:26:11 +08:00
Krzysztof f1c7b0ba6f Resolve documentation issue reported by boarchuz in https://esp32.com/viewtopic.php?f=5&t=14148#p59419 2020-05-07 22:00:27 +02:00
Axel Lin cf7e48c779 mdns: Allow config mDNS task stack size
Signed-off-by: Axel Lin <axel.lin@gmail.com>

Merges https://github.com/espressif/esp-idf/pull/5216
2020-05-07 21:49:02 +02:00
David Čermák 3a2f059f11 Merge branch 'bugfix/pppos_connect_dhcpc_failed' into 'master'
esp_netif: fix default connect handler to check dhcpc return value

Closes IDFGH-3173

See merge request espressif/esp-idf!8581
2020-05-08 03:25:09 +08:00
David Cermak 65b993234d esp_hid: fix memory leak if getting dev reports fails 2020-05-07 12:56:54 +00:00
Mahavir Jain d7fb9d54ba Merge branch 'feature/get_url' into 'master'
Add API to get URL from HTTP client

Closes IDFGH-3094

See merge request espressif/esp-idf!8637
2020-05-07 17:57:16 +08:00
Zhang Jun Hao e9b3feb85d fix(wpa_supplicant): fix memleak in wpa3 feature 2020-05-07 17:28:07 +08:00
Shubham Kulkarni 890f541edf esp_http_client: Add API to get URL from client
Closes: https://github.com/espressif/esp-idf/issues/5115
2020-05-07 14:20:28 +05:30
Angus Gratton b2fe7f681e Merge branch 'bugfix/esp32_eco3_init_syscall_table' into 'master'
newlib: initialize syscall_table_ptr_app in single core mode

Closes IDFGH-3254

See merge request espressif/esp-idf!8596
2020-05-07 15:17:13 +08:00
Mahavir Jain a2263571b5 Merge branch 'feature/mbedtls_chacha_poly' into 'master'
mbedtls: Add config options for chacha20, poly1305 and chachapoly

See merge request espressif/esp-idf!8605
2020-05-07 03:44:23 +08:00
Alexey Gerenkov c91ed2b917 coredump: Increases FreeRTOS ISR stack for ELF data format 2020-05-06 20:07:30 +03:00
Michael (XIAO Xufeng) e04bb43b9f spi: suppress spi_bus_lock_touch log level
The log in the spi_bus_lock_touch may be annoying. This commit suppress 
the log level, and make the log visible only when the device altered.

Resolves https://github.com/espressif/esp-idf/issues/5056
2020-05-07 00:32:24 +08:00
David Čermák a064e0c4de Merge branch 'bugfix/tcp_connect_tout' into 'master'
tcp_transport: Implement connect timeout

Closes IDFGH-2971, IDFGH-2810, and IDFGH-1541

See merge request espressif/esp-idf!8428
2020-05-06 20:07:05 +08:00
Alexey Gerenkov ef1b3330c2 coredump: Fixes coredump data overwriting due to 'TaskSnapshot_t' and 'core_dump_task_header_t' difference 2020-05-06 15:04:58 +03:00
kapil.gupta 3b5fcbe06f wpa_supplicant: Fix some memleaks and invalid memory access
Add changes to fix issues reported in clang analyzer
2020-05-06 10:31:59 +00:00
Ivan Grokhotkov d5195d19ae Merge branch 'feature/endian_h_compat_header' into 'master'
newlib: add endian.h header file for compatibility (Github PR)

See merge request espressif/esp-idf!8236
2020-05-06 16:54:41 +08:00
Jiang Jiang Jian 09d4767947 Merge branch 'mesh/power_save_function' into 'master'
mesh/ps: add duty control and support only transmit/receive on active duty

See merge request espressif/esp-idf!8152
2020-05-06 15:53:49 +08:00
David Cermak c2053a8e65 esp_netif: fix default connect handler to check dhcpc return value
Closes https://github.com/espressif/esp-idf/issues/5184
2020-05-06 07:26:50 +02:00
Ivan Grokhotkov a97cd645ad Merge branch 'bugfix/linenoise_stack_alloc' into 'master'
console: linenoise: move allocations from stack to heap, fix calloc result checking (Github PR)

Merges https://github.com/espressif/esp-idf/pull/5161

Closes IDFGH-3144

See merge request espressif/esp-idf!8612
2020-05-06 13:21:56 +08:00
Ivan Grokhotkov 30a6a8f932 Update linenoise.c: calloc returning NULL is not handled
Calloc function tries to allocate 4096 bytes.
If such memory is not available, it returns NULL pointer.
This exception was not handled in the code, causing a dirty crash.
2020-05-06 13:21:56 +08:00
Jiang Jiang Jian 62c36a0372 Merge branch 'feature/enable_wpa3_pmf_by_default' into 'master'
esp_wifi: Enable WPA3 & PMF by default

See merge request espressif/esp-idf!8600
2020-05-06 10:53:13 +08:00
Piyush Shah 62e1d6712b mbedtls: Add config options for chacha20, poly1305 and chachapoly 2020-05-05 16:41:31 +00:00
David Cermak a8e370eced tcp_transport: unit test for tcp connection timeout 2020-05-05 15:53:09 +02:00
David Cermak 6182e6f303 tcp_transport: close to return error only for socket error or invalid args
Closes https://github.com/espressif/esp-idf/issues/4872
2020-05-05 15:53:09 +02:00
boarchuz 0c7204e934 tcp_transport: Implement connect timeout
Merges https://github.com/espressif/esp-idf/pull/3791
Closes https://github.com/espressif/esp-idf/issues/5004
2020-05-05 15:53:09 +02:00
chenyudong bdb6565757 mesh/ci: fix MESH_EST_0216 2020-05-05 18:07:31 +08:00
qiyuexia 4522ef8798 mesh: add duty cycle control and support only transmit/receive in actve duty cycle 2020-05-05 18:06:47 +08:00
Ivan Grokhotkov d73470a8a6 Merge branch 'bugfix/loadable_elf_fixes' into 'master'
cmake: loadable elf fixes

See merge request espressif/esp-idf!8603
2020-05-05 17:02:48 +08:00
David Čermák 35386ba24c Merge branch 'bugfix/ppp_netif_up_after_new' into 'master'
esp-netif: ppp netif to use netif_is_link_up() to update interface state

Closes IDFGH-3044

See merge request espressif/esp-idf!8423
2020-05-05 16:37:47 +08:00
Ivan Grokhotkov b0f448a972 Merge branch 'feature/console_no_empty_lines' into 'master'
console: allow not returning empty lines (Github PR)

Closes IDFGH-2869

See merge request espressif/esp-idf!8232
2020-05-05 16:12:50 +08:00
Angus Gratton a0a7051af3 Merge branch 'bugfix/panic_fixes' into 'master'
panic handling fixes

See merge request espressif/esp-idf!8597
2020-05-05 12:16:09 +08:00
Angus Gratton cecf4622bc Merge branch 'bugfix/secure_boot_v2_fixes' into 'master'
Small secure boot v2 fixes

See merge request espressif/esp-idf!8462
2020-05-05 11:13:30 +08:00
Ivan Grokhotkov b09ed2d2aa esptool: fix malformed json when no files are flashed 2020-05-04 19:11:26 +02:00
Ivan Grokhotkov dafd50934d esptool: don't generate flashing metadata in loadable elf build 2020-05-04 19:11:00 +02:00
Felipe Neves 6f5e43e26a heap: added alloc failed hook and configuration options
heap/test: added alloc failed hook tests

docs: added alloc failed hook documentation

heap: add function to register allocation failed hook

docs: allocation failed hook docs improvements
2020-05-04 10:58:38 -03:00
Ivan Grokhotkov aac3e56a9a newlib: initialize syscall_table_ptr_app in single core mode
ESP32 ECO3 ROM uses syscall_table_ptr_app on both CPUs, so the pointer
needs to be set if running in single core mode.
2020-05-04 10:55:34 +00:00
Nachiket Kukade 107cf56e20 esp_wifi: Enable WPA3 & PMF by default
In wifi station example, set PMF(Protected Management Frames)
configuration to capable. Set WPA3 Feature in menuconfig enabled
by default. This will allow device to establish more secured
connection with AP's that support these protocols.
2020-05-04 16:02:14 +05:30
Ivan Grokhotkov 66889a7a58 esp32s2: return correct CPU number in esp_cache_err_get_cpuid 2020-05-04 10:13:14 +00:00
Ivan Grokhotkov c5f664d4ac esp_system: remove duplicated esp_digital_reset function
esp_digital_reset was defined both in system_api.c and panic_handler.c
2020-05-04 10:13:14 +00:00
Ivan Grokhotkov 8bdfb265a4 panic handler: fix cache error handling 2020-05-04 10:13:14 +00:00
Ivan Grokhotkov 0a389b1764 esp_system: restore weak esp_reset_reason functions 2020-05-04 10:13:14 +00:00
Shubham Kulkarni 34d41645d3 touch_sensor.c: Fix datatype of argument for timer callback function 2020-05-04 13:26:58 +05:30
Shubham Kulkarni f2cdebd906 esp_wps.c: Fix datatype for wps task handle 2020-05-04 13:26:58 +05:30
Ivan Grokhotkov 17d60faf17 Merge branch 'bugfix/ci_missed_deprecated_options' into 'master'
Fix missed deprecated Kconfig option caused by tabs in sdkconfig.rename

See merge request espressif/esp-idf!8585
2020-05-04 15:55:24 +08:00
Angus Gratton d013105256 Merge branch 'feature/twdt_prints_backtrace' into 'master'
Add Task Watchdog backtrace printing

Closes IDF-1072

See merge request espressif/esp-idf!8136
2020-05-04 14:58:53 +08:00
Angus Gratton bf23e66f2b Merge branch 'bugfix/flash_enc_rom_basic' into 'master'
flash encryption: Fix unncessary efuse burn, remove ROM BASIC efuse on S2

See merge request espressif/esp-idf!8587
2020-05-04 14:56:27 +08:00
Ivan Grokhotkov dfbf8ce518 Merge branch 'bugfix/display_partition_table' into 'master'
partition_table: do not always display partition table contents on build

See merge request espressif/esp-idf!8289
2020-05-04 14:51:32 +08:00
David Cermak acdadebfff esp-netif: ppp netif to use netif_is_link_up() to update interface state
Closes https://github.com/espressif/esp-idf/issues/5069
2020-05-04 06:46:35 +00:00
David Čermák 2e06e9c15b Merge branch 'feature/dhcps_config_mask' into 'master'
dhcp sever: Make option netmask configurable

Closes IDFGH-2955

See merge request espressif/esp-idf!8238
2020-05-04 14:22:55 +08:00
David Čermák 6f4ea99f83 Merge branch 'bugfix/mqtt_ref_update' into 'master'
mqtt: cleanup logs and docs

Closes IDFGH-3052

See merge request espressif/esp-idf!8547
2020-05-04 13:41:08 +08:00
Angus Gratton b2417819fd Merge branch 'bugfix/erase_with_vtaskdelay' into 'master'
spi_flash: Add vTaskDelay while a long erasing

Closes IDF-1561 and IDFGH-261

See merge request espressif/esp-idf!8211
2020-05-04 08:46:08 +08:00
Angus Gratton 158ab5a9b9 Remove "disable ROM BASIC boot mode" from ESP32-S2
Feature removed from ESP32-S2 ROM (was present in S2 Beta ROM)
2020-05-01 16:16:47 +10:00
Angus Gratton d4d4d7324a efuse: Don't need to burn WR_CRYPT_CNT if CRYPT_CNT is already max
Reduces write cycles, and useful on ESP32 ECO3 as UART_DIS_DL is protected by
the same efuse.

Also fixes accidental macro definition introduced in 7635dce502
2020-05-01 16:16:47 +10:00
Roland Dobai 58bbd99b9c Fix missed deprecated Kconfig option caused by tabs in sdkconfig.rename 2020-04-30 18:23:21 +02:00
David Cermak 78ea8a9ed5 mqtt: clenaup logs and docs
esp_mqtt: Change an error print to use ESP_LOGE instead of ESP_LOGI
Move Sending MQTT connect message log from Info to Debug level
docs: Makes clear that publish API could block
Change the message printed after MQTT connection failure

Closes https://github.com/espressif/esp-idf/issues/5077
(by means of referencing commit 615aeae0c2)
2020-04-30 14:05:36 +00:00
David Cermak 2fce539d1e esp-netif: use dhcp server netmask
Use the configured esp-netif netmask to update the dhcp struct when
starting the server or starting the netif itself.
Use the netmask in dhcps setters and getters.
2020-04-30 14:04:22 +00:00
David Cermak fa57bdbdbe dhcpserver: make subnet mask configurable
Closes https://github.com/espressif/esp-idf/issues/4988
2020-04-30 14:04:22 +00:00
Island 2ad2d0a701 Merge branch 'bugfix/ble_mesh_node_reset_erase' into 'master'
ble_mesh: Fix node not erase info completely

Closes BLEMESH-195

See merge request espressif/esp-idf!8561
2020-04-30 16:39:57 +08:00
Jiang Jiang Jian 4eec0ea4bb Merge branch 'bugfix/optimization_API_esp_wifi_deauth_sta' into 'master'
bugfix: optimization API esp_wifi_deauth_sta

Closes WIFI-1699

See merge request espressif/esp-idf!8363
2020-04-30 16:20:32 +08:00
lly eaeb465767 ble_mesh: Fix node not erase info completely
Previously only mesh node info is supported to be stored
in flash. So when trying to reset the node, we only need
to judge if the BLE_MESH_VALID flag is set.
Currently we support storing both node & Provisioner info
in flash, when trying to erase the node info from flash,
the BLE_MESH_NODE flag will be checked. So we need to set
bt_mesh.flags to 0 when all the erase operations are done.
2020-04-30 06:42:54 +00:00
Angus Gratton d041512022 Merge branch 'feature/mesh_ip_network_example' into 'master'
ESP-MESH: IP internal network example

See merge request espressif/esp-idf!7724
2020-04-30 14:33:16 +08:00
KonstantinKondrashov bc50bd2806 spi_flash(new driver): Add a Kconfig option - Bypass a block erase and always do sector erase
Closes: IDF-1561
2020-04-30 13:58:13 +08:00
KonstantinKondrashov 304f67e42a spi_flash(LEGACY_IMPL): Add a Kconfig option - Bypass a block erase and always do sector erase
Closes: IDF-1561
2020-04-30 13:58:13 +08:00
KonstantinKondrashov 0f6fe0c8e9 spi_flash: Add into sim/stubs the esp_timer 2020-04-30 13:58:13 +08:00
KonstantinKondrashov ae89f98d59 spi_flash(new driver): Add vTaskDelay while a long erasing 2020-04-30 13:58:13 +08:00
KonstantinKondrashov 3cb655eaab spi_flash(LEGACY_IMPL): Add vTaskDelay while a long erasing
Added Kconfig options to enable yield operation during flash erase

Closes: https://github.com/espressif/esp-idf/issues/2083
Closes: https://github.com/espressif/esp-idf/issues/4916
Closes: IDFGH-261
2020-04-30 13:58:13 +08:00
Angus Gratton fdd6bfe3c4 Merge branch 'bugfix/sleep_comments' into 'master'
doc: Specify that sleep wakeup source restrictions apply to all current ESP32 revisions

See merge request espressif/esp-idf!8351
2020-04-30 13:36:58 +08:00
Francesco Giancane 1173ce32f6 endian.h: define non-standard symbols for endian handling
BSDs and Unices defined some non standardised functions and symbols used
for endianness handling: converting from Little Endian to Big Endian,
converting from Host to a specific representation, converting from a
specific representation to Host.

With this commit, a modified version of those symbols provided by
FreeBSD is imported.

The license of the imported code is still 2-Clause BSD.

Signed-off-by: Francesco Giancane <francesco.giancane@accenture.com>
Closes https://github.com/espressif/esp-idf/pull/4784
2020-04-29 23:47:51 +02:00
Francesco Giancane 6f8ce38f99 Introduce <endian.h> compatibility header
Programs and libraries using compiler and system information about
endianness often include the system header `<endian.h>`.

In `xtensa-gcc` compiler with `newlib` distribution, that file is located in
`<machine/endian.h>`; this means that `#include <endian.h>` would fail
at compile time.

This commit fixes the issue by adding a compatibility `<endian.h>`
header which in turn just includes `<machine/endian.h>`.

Signed-off-by: Francesco Giancane <francesco.giancane@accenture.com>
Merges https://github.com/espressif/esp-idf/pull/4784
2020-04-29 23:47:51 +02:00
Ivan Grokhotkov ece41b04e3 console: make empty line behavior run-time configurable 2020-04-29 23:44:46 +02:00
Michael 'ASAP' Weinrich c34352549a Added Kconfig for enabling 0 length returns from linenoise 2020-04-29 23:44:46 +02:00
MadnessASAP dfd4227e7a Don't return NULL on 0 length input
A 0 length string is still a valid input and should be treated as such, a NULL return should be reserved for when errors occur during line editing or EOF is reached.

Merges https://github.com/espressif/esp-idf/pull/4926
2020-04-29 23:44:46 +02:00
Island 18950d5780 Merge branch 'bugfix/ble_mesh_provisioner_check_key' into 'master'
ble_mesh: Check if appkey exist before deleting it

See merge request espressif/esp-idf!8332
2020-04-29 21:12:14 +08:00
Jiang Jiang Jian 922a0fa485 Merge branch 'feature/esp-hid-component' into 'master'
ESP-HID Component

See merge request espressif/esp-idf!6908
2020-04-29 17:24:02 +08:00
Hristo Gochkov 25281ef4de Add HID Support to IDF
- Adds HID Host support in Buedroid
- Adds BLE HID Host and Device support
- Adds some general HID utilities and definitions to help integrate with other stacks and native USB
2020-04-29 17:24:01 +08:00
Ivan Grokhotkov d311144a00 soc/usb: use new headers in LL, move some code out of LL
* Keep only USB related register operations in the LL.
* Move pad-related logic into the driver.
* Driver is now responsible for enabling the peripheral.
2020-04-29 10:04:13 +02:00
Ivan Grokhotkov 897e69cc9d soc, esp32s2: add usb_wrap peripheral 2020-04-29 10:04:13 +02:00