Commit graph

7478 commits

Author SHA1 Message Date
lly 8c6f6318c0 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-21 15:22:18 +08:00
lly 632d9739b5 ble_mesh: Optimize some mesh log output 2020-05-21 15:22:18 +08:00
lly 34cb56b7aa ble_mesh: Fix restore when revoke keys [Zephyr]
Store keys (NetKey and AppKey) again after revoking.
2020-05-21 15:22:17 +08:00
lly 7c12074801 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-21 15:22:16 +08:00
lly 4b21a34675 ble_mesh: Split mesh os related into a separate file 2020-05-21 15:22:13 +08:00
lly ac51ec11ec ble_mesh: Split mesh mutex into a separate file 2020-05-21 15:19:52 +08:00
lly 7db10be193 ble_mesh: Rename mesh_kernel.* to mesh_timer.* 2020-05-21 15:19:51 +08:00
lly fde075aec2 ble_mesh: Add and use transport macro definitions [Zephyr] 2020-05-21 15:19:51 +08:00
lly cbd2bcfbd2 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-21 15:19:50 +08:00
lly 5c5621790a 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-21 15:19:49 +08:00
lly fbdb7ff665 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-21 15:19:49 +08:00
lly bbfaaa2044 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-21 15:19:48 +08:00
lly ad14507e3f 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-21 15:19:47 +08:00
lly c9d1255ce4 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-21 15:19:46 +08:00
lly 25569cd9de ble_mesh: Add PRIu64 & PRIx64 in mesh_types.h 2020-05-21 15:19:46 +08:00
lly 416e8958fa ble_mesh: Add push functions for supported bit-variants [Zephyr]
Add push functions for bit-widths supported by add and pull functions.
2020-05-21 15:19:45 +08:00
lly cde1592bf3 ble_mesh: Add support for 64 bit data type [Zephyr]
This enables pulling and pushing values in 64 bit format.
2020-05-21 15:19:44 +08:00
lly 0af05fdee1 ble_mesh: Add support for 48 bit data type [Zephyr]
This enables pulling and pushing values in 48 bit format.
2020-05-21 15:19:44 +08:00
lly 4536a485be ble_mesh: Add 48 bit variants [Zephyr]
This adds sys_*_*48 functions that operation on a 48 bits values.
2020-05-21 15:19:43 +08:00
lly e7d37f2d1a ble_mesh: Add support for 24 bit data type [Zephyr]
This enables pulling and pushing values in 24 bit format.
2020-05-21 15:19:42 +08:00
lly fd17ff2f0b ble_mesh: Add 24 bit variants [Zephyr]
This adds sys_*_*24 functions that operation on a 24 bits values.
2020-05-21 15:19:41 +08:00
lly e322c5950b 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-21 15:19:41 +08:00
lly 1f96a6f35d 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-21 15:19:40 +08:00
lly 4fddf1156b 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-21 15:19:39 +08:00
lly 833483bb22 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-21 15:19:39 +08:00
lly 3d4948664b ble_mesh: Check device uuid when init provisioning 2020-05-21 15:19:38 +08:00
lly 203f871420 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-21 15:19:37 +08:00
lly 2c6a3f9e5b 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-21 15:19:36 +08:00
lly 2b6131b5f4 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-21 15:19:36 +08:00
Island 793d2b11f1 Merge branch 'bugfix/ble_mesh_not_ignore_msg_in_fast_prov_v4.0' into 'release/v4.0'
ble_mesh: Not ignore msg when fast prov is enabled (v4.0)

See merge request espressif/esp-idf!8711
2020-05-21 15:16:08 +08:00
Island 471171cb32 Merge branch 'feat/ble_mesh_sensor_model_example_v4.0' into 'release/v4.0'
ble_mesh: Add ble mesh sensor model examples (v4.0)

See merge request espressif/esp-idf!8508
2020-05-21 15:14:22 +08:00
Island 3b4ff12246 Merge branch 'bugfix/ble_mesh_compile_error_o2_v4.0' into 'release/v4.0'
ble_mesh: Fix compile error when -O2 (performance) is chosen (v4.0)

See merge request espressif/esp-idf!8617
2020-05-21 15:13:56 +08:00
Island 351dba9272 Merge branch 'bugfix/ble_mesh_provisioner_check_key_v4.0' into 'release/v4.0'
ble_mesh: Check if appkey exist before deleting it (v4.0)

See merge request espressif/esp-idf!8620
2020-05-21 15:13:31 +08:00
Island 7b6236c2d9 Merge branch 'bugfix/ble_mesh_node_reset_erase_v4.0' into 'release/v4.0'
ble_mesh: Fix node not erase info completely (v4.0)

See merge request espressif/esp-idf!8623
2020-05-21 15:12:21 +08:00
Michael (XIAO Xufeng) 1ce4c20115 Merge branch 'bugfix/fix_gpio_wake_up_disable_invalid_for_rtc_io_v4.0' into 'release/v4.0'
bugfix (GPIO): fixed gpio_wake_up_disable not working for RTC IO (release/4.0)

See merge request espressif/esp-idf!7996
2020-05-21 11:39:39 +08:00
lly 9a654ec590 ble_mesh: Add some common macros for sensor model 2020-05-20 10:51:55 +00:00
lly 193828f121 ble_mesh: Allow empty sensor series column value 2020-05-20 10:51:55 +00:00
lly fab2dcb790 ble_mesh: Check if same sensor (settings) property id exists 2020-05-20 10:51:55 +00:00
lly d3619d0b45 ble_mesh: Allow empty sensor settings exist 2020-05-20 10:51:55 +00:00
Prasad Alatkar 5af06f49f5 NimBLE: Include upstream fixes and use macros for log level filtering (backport v4.0)
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:19:55 +05:30
zhangyanjiao e430860df3 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 timeout issue of EAPOL four-way handshake
5. fix the crash issue when fetch peer after delete the cur_peer
2020-05-20 18:13:07 +08:00
Jiang Jiang Jian fc2199c5d6 Merge branch 'bugfix/wpa3_mixed_mode_authype_v4.0' into 'release/v4.0'
esp_wifi: Add and utilize WPA3/WPA2 Mixed mode Authtype (backport v4.0)

See merge request espressif/esp-idf!8768
2020-05-17 17:05:15 +08:00
Jiang Jiang Jian 4695eeddee Merge branch 'bufix/fix_v4.0_bluedroid_bugs_mr' into 'release/v4.0'
component/bt: fix notify malloc failed , fix no BLE_AUTH_CMPL_EVT and fix bluedroid btc deinit crash(backport 4.0)

See merge request espressif/esp-idf!8755
2020-05-16 19:53:15 +08:00
Piyush Shah 65d4596a36 wifi_provisioning: Catch the Wi-Fi events even after Connection errors
It was observed that after sending credentials, if the first
Wi-Fi conection attempt fails, the Wi-Fi provisioning managager
ignores subsequent Wi-Fi events. So, even if the device eventually
connects to the AP, the provisioning stays on indefinitely.

Changing a check so that subsequent events are also captured and
provisioning finishes successfully.
2020-05-15 13:50:47 +00:00
Nachiket Kukade 748720a466 esp_wifi: Update WiFi lib
Add and utilize WPA3/WPA2 Mixed mode Authtype
2020-05-15 14:58:07 +05:30
zhiweijian 6ee978c6aa add congest direct callback and fix malloc failed when multi_connection notify performance test 2020-05-15 16:18:31 +08:00
wangcheng d231b25bc4 fix bta_dm_deinit_cb crash 2020-05-15 16:16:26 +08:00
wangcheng 456c8bdbdf master missing BLE_AUTH_CMPL_EVT after restart 2020-05-15 16:16:26 +08:00
Jiang Jiang Jian 94917184be Merge branch 'bugfix/wpa3_pmf_memleak_fix_v4.0' into 'release/v4.0'
WPA3 / PMF memory leak fixes (backport v4.0)

See merge request espressif/esp-idf!8677
2020-05-15 15:11:44 +08:00
morris b13d96ae8b ethernet: better control start/stop/uninstall/install 2020-05-14 22:12:42 +08:00
morris 496ab2a83f ethernet: esp_eth_stop API should stop emac hardware 2020-05-14 22:10:37 +08:00
Angus Gratton 3c882991b5 Merge branch 'bugfix/ethernet_task_watchdog_timeout' into 'release/v4.0'
ethernet: fix potential task watch dog timeout (backport 4.0)

See merge request espressif/esp-idf!8743
2020-05-14 16:21:35 +08:00
morris 6442184dd8 ethernet: fix potential task watch dog timeout 2020-05-14 14:23:32 +08:00
Hrishikesh Dhayagude 02c47360f1 Add NimBLE config options in sdkconfig.rename 2020-05-14 11:31:53 +10:00
Nachiket Kukade db5f01429f wpa_supplicant: Fix memory leaks in WPA3 connection
1. Buffers for SAE messages are not freed after the handshake.
   This causes memory leak, free buffers after SAE handshake.
2. SAE global data is not freed until the next WPA3 connection
   takes place, holding up heap space without reason. Free theis
   data after SAE handshake is complete or event fails.
3. Update wifi lib which includes memory leak fix during BIP
   encryption/decryption operations.
2020-05-13 20:45:34 +05:30
Nachiket Kukade b938846de6 wpa_supplicant: Fix formatting of file esp_wpa3.c
Replace tabs with spaces in esp_wpa3.c.
2020-05-13 20:35:56 +05:30
Jiang Jiang Jian 7d295e18bc Merge branch 'bugfix/fix_switch_channel_without_discon_issue_v4.0' into 'release/v4.0'
esp_wifi: Fix AP switch to adjacent channel without disconnect (backport v4.0)

See merge request espressif/esp-idf!8705
2020-05-13 19:58:22 +08:00
lly b47111c708 ble_mesh: Not ignore msg when fast prov is enabled
When fast provisioning is enabled, Provisioner shall not
ignore messages from the nodes whose addresses are not in
the provisioning database. Because other nodes which are
not provisioned by the Primary Provisioner will send node
address messages to the Primary Provisioner.
2020-05-13 10:09:50 +08:00
Jiang Jiang Jian 6a6de506b1 Merge branch 'bugfix/supplicant_general_fixes_40' into 'release/v4.0'
wpa_supplicant: Fix some memleaks and invalid memory access (backport v4.0)

See merge request espressif/esp-idf!8553
2020-05-12 20:17:51 +08:00
Jiang Jiang Jian 12a65aaac1 Merge branch 'bugfix/wep40_key_parsing_bug_v4.0' into 'release/v4.0'
wpa_supplicant: Add parsing support for WEP40 key(backport)

See merge request espressif/esp-idf!8684
2020-05-12 20:17:15 +08:00
Jiang Jiang Jian 6bfad8a47d Merge branch 'fixbug/tcp_kill_state_assert_for_v4.0' into 'release/v4.0'
lw-ip:fixbug for tcp kill state assert(backport 4.0)

See merge request espressif/esp-idf!8451
2020-05-12 20:15:45 +08:00
xiehang 0863de4a69 esp_wifi: Fix AP switch to adjacent channel without disconnect 2020-05-12 17:20:48 +08:00
Shubham Kulkarni db3a1110ec pthread: Use INTERFACE in target_link_libraries for vPortCleanUpTCB wrapper 2020-05-12 10:35:47 +05:30
kapil.gupta 398dc28a4e wpa_supplicant: Add parsing support for WEP40 key
WEP key is passed as ascii key without "", add parsing support
in supplicant for this.
2020-05-11 11:23:10 +05:30
Zhang Jun Hao a87df25d9e fix(wpa_supplicant): fix memleak in wpa3 feature 2020-05-08 16:25:38 +08:00
lly 814108f9ac ble_mesh: Add length check for some mesh operations 2020-05-07 09:18:15 +00:00
lly baf0fb3576 ble_mesh: Fix compile error when -O2 (performance) is chosen 2020-05-07 09:18:15 +00:00
lly a895bb157f 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-05-07 09:16:51 +00:00
kapil.gupta 4242519894 wpa_supplicant: Fix some memleaks and invalid memory access
Add changes to fix issues reported in clang analyzer
2020-05-06 11:06:51 +00:00
morris b3c3b4e7f0 ethernet: not using latch register to check link 2020-05-06 17:28:18 +08:00
morris f09c9b957c timer_group: fix intr_enable
timer group interrupt enable is controled by level_int_ena instead of int_ena

Closes https://github.com/espressif/esp-idf/issues/5103
2020-05-06 17:28:18 +08:00
dowster 24c9f56d45 Fix typo with sigmadelta.h #ifdef 2020-05-06 17:28:18 +08:00
Nachiket Kukade 4557c686b8 wpa_supplicant: Fix EAP Re-authentication issue
EAP reauth frames are dropped at various stages due to current
implementation of WPA2 ENT states and EAP SM init/deinit logic.
Route EAPOL frames based on EAP pkt type and maintain EAP SM
to facilitate EAP re-authentication process.
2020-05-06 10:21:45 +05:30
Nachiket Kukade 5e33a351f1 esp_wifi: Enable WPA3 & PMF by default 2020-05-06 10:21:41 +05:30
Nachiket Kukade bc7a34b494 wpa_supplicant: Disable TLSv1.2 by default
Some Enterprise Authentication Servers do not support TLS v1.2.
Move this option to Menuconfig and disable by default.
2020-05-06 10:21:25 +05:30
Nachiket Kukade ab81940982 esp_wifi: Additional changes for WPA3 & PMF testcases
Added WPA3 Testcases support for -
1. Anti-Clogging Token Request support
2. Return correct status from SAE modules for invalid scenarios
3. Add PMK Caching support for WPA3

wifi lib includes fixes for below PMF Certification issues -
1. Check return status of decrypt operation. Fixes 5.3.3.1.
2. Allow PMF negotiation for WPA2-Enterprise. Fixes 5.3.3.2, 5.3.3.4.
3. Add NULL check on key before encrypting PMF, fixes crash.
2020-05-06 10:20:46 +05:30
Nachiket Kukade d36663b798 wpa_supplicant: Support WPA3 4-way handshake, add config option
1. Add changes in 4-way handshake path to allow SAE key mgmt.
2. Support for configuring WAP3 at init time, added Kconfig option.
3. Handle and propagate error conditions properly.
2020-05-06 10:20:35 +05:30
Nachiket Kukade 6b76228fcb wpa_supplicant: Add SAE handshake support for WPA3-PSK
Under WPA3-Personal, SAE authentication is used to derive PMK
which is more secure and immune to offline dictionary attacks.
1. Add modules to generate SAE commit/confirm for the handshake
2. Add modules that build and parse SAE data in Auth frames
3. Add WPA3 association and key mgmt definitions
4. Invert y-bit while solving for ECC co-ordinate -
     Once an X co-ordinate is obtained, solving for Y co-ordinate
     using an elliptical curve equation results in 2 possible values,
     Y and (P - Y), where p is the prime number. The co-ordinates are
     used for deriving keys in SAE handshake. As par the 802.11 spec
     if LSB of X is same as LSB of Y then Y is chosen, (P - Y) otherwise.
     This is not what is implemented, so fix this behavior to obtain the
     correct Y co-ordinate.
2020-05-06 10:20:26 +05:30
Sagar Bijwe 8f5f828ad6 wpa_supplicant: Adding SAE modules with testcase
This change ports SAE(Simultaneous Authentication of Equals)
feature from wpa_supplicant and makes it work with mbedtls
crypto APIs. Currently only group 19 is supported. A sample
SAE handshake is included in the testcase. Other minor
changes for DH groups are also included.
2020-05-06 10:20:22 +05:30
Nachiket Kukade 5c5ae96be2 Add encryption/decryption support for PMF
1. Add CCMP, AES crypto modules for unicast protected Mgmt frames
2. Add support for computing SHA256 MIC on Bcast Mgmt frames
3. Add support for storing iGTK during 4-way handshake.
4. Provide APIs to MLME for utilizing the SW crypto modules
2020-05-06 10:20:16 +05:30
Nachiket Kukade 1b7f3fee5c Add support for PMF configuration and negotiation
1. Add APIs for configuring PMF through set config.
2. Map Supplicant and Wifi Cipher types.
3. Add support for PMF negotiation while generating RSN IE.
2020-05-06 10:20:11 +05:30
Hrudaynath Dhabe b7dc47108f wifi: Add code required to backport PMK Caching 2020-05-06 10:19:52 +05:30
liu zhifu 8cd210b38b esp_wifi/supplicant: fix some WiFi stop memory leak 2020-05-06 10:15:51 +05:30
Hrudaynath Dhabe 19e840aa53 wpa_supplicant: Set assoc_ie_len based on generated RSN/WPA IE 2020-05-06 10:15:46 +05:30
Hrudaynath Dhabe 39acf9c4dd wifi: Add PMK caching feature for station WPA2-enterprise
4. Pmksa cache expiry after dot11RSNAConfigPMKLifetime timeout.
2020-05-06 10:15:43 +05:30
Sagar Bijwe 2da4ffa2aa wifi: Add PMK caching feature for station WPA2-enterprise
1) Added PMK caching module from wpa_supplicant.
2) Modified wpa_sm to
    a) Add entry to PMK cache when first time associated to an AP.
    b) Maintain entry across the associations.
    c) Clear current PMKSA when deauth happens.
    d) Search for an entry when re-associating to the same AP and
       set it as current PMKSA
    e) Wait for msg 1/4 from AP instead of starting EAP authentication.
    f) Check PMKID in msg 1 with current PMKSA/cache.
    g) Use the cached PMK to complete 4-way handshake.
3) Remove config_bss callback as it was redundant and used to cause
   problems for PMK caching flow.

Closes IDF-969
2020-05-06 10:15:36 +05:30
lly 30c645d9c2 ble_mesh: Check if appkey exist before deleting it 2020-05-06 11:39:02 +08:00
Jiang Jiang Jian b9fa6b0b1a Merge branch 'bugfix/can_not_get_IP_address_from_China_mobile_v4.0' into 'release/v4.0'
wifi: fix the bug that ESP32 can't get IP address from China Mobile router (v4.0)

See merge request espressif/esp-idf!8401
2020-05-06 11:16:24 +08:00
Island 5f71ec3640 Merge branch 'bugfix/ble_mesh_rpl_list_size_v4.0' into 'release/v4.0'
ble_mesh: Associate replay protection list size with nodes count (v4.0)

See merge request espressif/esp-idf!8495
2020-05-06 11:14:21 +08:00
Island a44f473d4a Merge branch 'doc/ble_mesh_fixes_v4.0' into 'release/v4.0'
doc: Fix some ble mesh description (v4.0)

See merge request espressif/esp-idf!8503
2020-05-06 11:12:57 +08:00
Island beb64a1af4 Merge branch 'bugfix/ble_mesh_add_missing_cpp_v4.0' into 'release/v4.0'
ble_mesh: Add missing #ifdef __cplusplus (v4.0)

See merge request espressif/esp-idf!8506
2020-05-06 11:12:25 +08:00
lly b97d4c617b ble_mesh: Fix time scene wrong macro name 2020-04-27 16:26:23 +08:00
lly 765bd76ba3 ble_mesh: Add missing #ifdef __cplusplus 2020-04-27 15:34:14 +08:00
lly 9370264cac doc: Fix some ble mesh description 2020-04-27 15:25:46 +08:00
lly 8bfa01cc28 ble_mesh: Fix client local parameters not initialized 2020-04-27 14:39:40 +08:00
lly 90a9444696 ble_mesh: Continue node info restore even if failure happens
During BLE Mesh Provisioner initialization, the stack will restore
the nodes information if settings storage is enabled.
Previously when a failure happens (e.g. found the same uuid) during
the restore procedure, the information of the following nodes will
not be restored and error will be directly returned.
But this will introduce some problem with user experience, because
some newly provisioned nodes information will not be restored and
Provisioner will not be able to control those nodes.
So we change the operation here, when a failure happens during the
restore procedure, Provisioner will only ignore the information of
the current node and continue restoring other nodes information.
2020-04-27 14:39:40 +08:00
lly b9fd2673a7 ble_mesh: Remove some redundant functions 2020-04-27 14:39:39 +08:00
lly 7595116353 ble_mesh: Notify unprovisioned device beacon to application layer
With this change, if a Provisioner has provisioned the maximum
number of nodes, it can still report the unprovisioned device
beacon from other nodes to the application layer. And this will
be more reasonable compared with the previous implementation.
Previously when the node array of Provisioner is full, no beacon
from unprovisioned devices will be reported, only some warning
logs will be given.
2020-04-27 14:39:38 +08:00
lly 9aae0f2dee ble_mesh: Check if assigned node address is duplicated
Previously only check the node address when it is assigned by the
application layer. Here we also check the address when the address
is allocated internally. And this will be useful when some mesh
internal tests are performed.
2020-04-27 14:39:38 +08:00
lly f137546a4b ble_mesh: Update next alloc address when node info is added 2020-04-27 14:39:37 +08:00