Commit graph

195 commits

Author SHA1 Message Date
lly d3eaf8bdb0 ble_mesh: stack: Client model related code clean 2020-08-07 21:15:11 +08:00
lly aa8f45e341 ble_mesh: stack: Rename cfg & health client status recv func 2020-08-07 21:15:10 +08:00
lly dfa6332606 ble_mesh: stack: Check client msg result in common func 2020-08-07 21:15:08 +08:00
lly c3e702da05 ble_mesh: stack: Remove some not used variables & functions 2020-08-07 21:15:03 +08:00
lly dfd0cd5f3e ble_mesh: stack: Update client model msg send 2020-08-07 21:15:02 +08:00
lly beda5f0fd4 ble_mesh: stack: Fix recv health current status incorrectly 2020-07-17 14:06:41 +08:00
lly f3566fd2af ble_mesh: stack: Only keep func pointer for very common log
Currently only keep func pointer for the followings:
- Invalid parameter (mesh btc & mesh stack)
- Out of memory (mesh btc & mesh stack)
- Unknown act (mesh btc)
- Invalid model user data (mesh stack)
- BT_DBG("%s", __func__) (mesh btc & mesh stack)
- A few other specific situations (buf ref debug, send status check)
2020-07-16 11:04:57 +08:00
lly f10c62d84d ble_mesh: stack: Make proxy server & client functions clear 2020-07-16 11:04:57 +08:00
lly 1df9502301 ble_mesh: stack: Add proxy cfg pdu length check 2020-07-15 16:11:32 +08:00
lly d04a8da916 ble_mesh: stack: Rework using dev flag to check scan status
Different bluetooth host has different behaviors, so it's better
to maintain a scan check mechanism of BLE Mesh itself.
Fixes an issue when only PB-GATT is enabled for node, which will
output a scan error log when the device is provisioned.
2020-07-15 16:11:31 +08:00
lly c8601fface ble_mesh: stack: Add more checks about input prov bearers 2020-07-15 16:11:27 +08:00
lly 1e528fa739 ble_mesh: stack: Rename mesh adv queue and relay queue 2020-07-15 11:10:14 +08:00
lly a27478b54d ble_mesh: stack: Use macros for adv task name & prio 2020-07-15 11:10:14 +08:00
lly 0dc96d19aa ble_mesh: stack: Make freertos static allocation visible 2020-07-15 11:09:58 +08:00
lly 39705533f1 ble_mesh: stack: Update some fast prov functions 2020-07-03 08:53:56 +08:00
lly 77fe2ced32 ble_mesh: stack: Move fast prov functions to a single file 2020-07-03 08:53:56 +08:00
lly 0e028c044d ble_mesh: Remove the previously added redundant aes files 2020-07-02 03:35:13 +00:00
lly 3b6145dc46 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 11:55:12 +08:00
lly dfcc8e77dc 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:22:49 +08:00
lly f1c0fee05b 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 10:31:25 +00:00
Island 9718338984 Merge branch 'bugfix/ble_mesh_remove_relay_dependency_v4.0' into 'release/v4.0'
ble_mesh: Remove relay option dependency (v4.0)

See merge request espressif/esp-idf!9027
2020-06-03 15:20:51 +08:00
Island 5a61c4c24c Merge branch 'bugfix/ble_mesh_example_nvs_store_v4.0' into 'release/v4.0'
Bugfix/ble mesh example nvs store (v4.0)

See merge request espressif/esp-idf!9017
2020-06-03 15:12:17 +08:00
Island ceffc0837e Merge branch 'bugfix/ble_mesh_model_recv_fix_v4.0' into 'release/v4.0'
Bugfix/ble mesh model recv fix (v4.0)

See merge request espressif/esp-idf!9008
2020-06-03 15:11:32 +08:00
Island ece24128da Merge branch 'bugfix/ble_mesh_rework_prov_pdu_len_check_v4.0' into 'release/v4.0'
ble_mesh: Rework prov pdu length check (v4.0)

See merge request espressif/esp-idf!9004
2020-06-03 15:10:52 +08:00
lly 19f69333f7 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:18:52 +08:00
lly 268f5ad6c6 ble_mesh: Optimize some send & recv logs 2020-06-02 14:04:34 +08:00
lly 205425b86b ble_mesh: correct the return type [Zephyr] 2020-06-02 10:32:25 +08:00
lly f990d725f4 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:23 +08:00
lly 073b8daa6e ble_mesh: Rework prov pdu length check 2020-06-02 10:14:50 +08:00
lly cd40f3ad52 ble_mesh: Local model (un)subscribes group address 2020-06-01 09:11:27 +08:00
lly 11cfb44e58 ble_mesh: Define a macro for invalid company id 2020-06-01 09:11:26 +08:00
lly 792605e8fd ble_mesh: Check the result of creating timer 2020-05-28 10:27:25 +08:00
Island 59e11421bf Merge branch 'bugfix/ble_mesh_sync_zephyr_fixes_v4.0' into 'release/v4.0'
Bugfix/ble mesh sync zephyr fixes (v4.0)

See merge request espressif/esp-idf!8949
2020-05-28 10:16:52 +08:00
Island a90e8d67e9 Merge branch 'bugfix/ble_mesh_not_use_same_private_key_v4.0' into 'release/v4.0'
ble_mesh: Not using pre-initialized private key (v4.0)

See merge request espressif/esp-idf!8946
2020-05-28 10:14:45 +08:00
lly 63c83730c2 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:55 +08:00
lly f781c6edac 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:45:49 +08:00
lly 7078065980 ble_mesh: Not using pre-initialized private key 2020-05-27 17:39:35 +08:00
lly a8afd951dc ble_mesh: Same func for storing/restoring comp data 2020-05-27 17:31:01 +08:00
Island 57932baef3 Merge branch 'bugfix/ble_mesh_provisioner_fail_to_pub_v4.0' into 'release/v4.0'
ble_mesh: Fix Provisioner failed to publish (v4.0)

See merge request espressif/esp-idf!8874
2020-05-22 19:14:26 +08:00
Island 4c5fd2be70 Merge branch 'bugfix/ble_mesh_friend_init_flag_v4.0' into 'release/v4.0'
Bugfix/ble mesh friend init flag (v4.0)

See merge request espressif/esp-idf!8869
2020-05-22 19:13:42 +08:00
Island 7a60ae4bc8 Merge branch 'bugfix/ble_mesh_remove_patch_v4.0' into 'release/v4.0'
ble_mesh: Remove patch for the bug of an App (v4.0)

See merge request espressif/esp-idf!8868
2020-05-22 19:13:24 +08:00
lly 699270e09e ble_mesh: Fix Provisioner failed to publish 2020-05-22 15:48:49 +08:00
lly 13167a7579 ble_mesh: Clear two more vars during proxy server deinit 2020-05-22 11:39:51 +08:00
lly acf41f93a9 ble_mesh: Add missing sdkconfig.h 2020-05-22 11:39:51 +08:00
lly 470c959b04 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-22 11:39:50 +08:00
lly dd7c98d6c2 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-22 11:39:49 +08:00
lly 90aa79fd2b ble_mesh: Remove patch for the bug of an App 2020-05-22 11:37:30 +08:00
lly 97c1a4b5c6 ble_mesh: Fix typos 2020-05-22 11:34:07 +08:00
Island 5897354d7f Merge branch 'bugfix/sync_zephyr_bt_mesh_bugfix_v4.0' into 'release/v4.0'
Bugfix/sync zephyr bt mesh bugfix (v4.0)

See merge request espressif/esp-idf!8853
2020-05-22 10:50:39 +08:00
lly 2ea69e6df5 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-21 15:26:50 +08:00