Commit graph

193 commits

Author SHA1 Message Date
lly c24de8dc10 ble_mesh: stack: Client model related code clean 2020-08-07 21:11:34 +08:00
lly 59a590fb25 ble_mesh: stack: Rename cfg & health client status recv func 2020-08-07 21:11:34 +08:00
lly f0b89688c9 ble_mesh: stack: Check client msg result in common func 2020-08-07 21:11:34 +08:00
lly 29749b9dae ble_mesh: stack: Remove some not used variables & functions 2020-08-07 21:11:33 +08:00
lly c058f3594f ble_mesh: stack: Update client model msg send 2020-08-07 21:11:33 +08:00
lly b39eaf61b5 ble_mesh: stack: Fix recv health current status incorrectly 2020-07-17 14:05:18 +08:00
lly 2e01297603 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:02:24 +08:00
lly 5fceac92ee ble_mesh: stack: Make proxy server & client functions clear 2020-07-16 11:02:24 +08:00
lly fc99963376 ble_mesh: stack: Add proxy cfg pdu length check 2020-07-15 16:10:48 +08:00
lly 1846def7ac 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:10:48 +08:00
lly 37322ce93f ble_mesh: stack: Add more checks about input prov bearers 2020-07-15 16:10:48 +08:00
lly a6dcfb4a5a ble_mesh: stack: Rename mesh adv queue and relay queue 2020-07-14 21:19:32 +08:00
lly efcd9ee4a8 ble_mesh: stack: Use macros for adv task name & prio 2020-07-14 21:19:32 +08:00
lly 6abfc2a8f7 ble_mesh: stack: Make freertos static allocation visible 2020-07-14 21:19:32 +08:00
lly dd6de08bea ble_mesh: stack: Update some fast prov functions 2020-07-03 08:53:16 +08:00
lly 661e1f2500 ble_mesh: stack: Move fast prov functions to a single file 2020-07-03 08:53:16 +08:00
lly d9e8508981 ble_mesh: Remove the previously added redundant aes files 2020-07-02 03:53:50 +00:00
lly b239677c97 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:54:32 +08:00
lly 6f715c4472 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:21 +08:00
lly b4b2cd19f7 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:58:36 +08:00
Island a8f40b7095 Merge branch 'bugfix/ble_mesh_remove_relay_dependency_v4.2' into 'release/v4.2'
ble_mesh: Remove relay option dependency (v4.2)

See merge request espressif/esp-idf!9025
2020-06-03 15:20:35 +08:00
Island 9bdaa64d80 Merge branch 'bugfix/ble_mesh_example_nvs_store_v4.2' into 'release/v4.2'
Bugfix/ble mesh example nvs store (v4.2)

See merge request espressif/esp-idf!9015
2020-06-03 15:11:54 +08:00
Island 55cd09578f Merge branch 'bugfix/ble_mesh_model_recv_fix_v4.2' into 'release/v4.2'
Bugfix/ble mesh model recv fix (v4.2)

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

See merge request espressif/esp-idf!9002
2020-06-03 15:10:33 +08:00
lly eeb44e7dd6 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:18 +08:00
lly 4919d17ad1 ble_mesh: Optimize some send & recv logs 2020-06-02 14:02:53 +08:00
lly 1a3c315d2f ble_mesh: correct the return type [Zephyr] 2020-06-02 10:31:08 +08:00
lly d6a247f7e4 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:31:07 +08:00
lly 4fbc29616c ble_mesh: Rework prov pdu length check 2020-06-02 10:13:21 +08:00
lly 067d94e88f ble_mesh: Local model (un)subscribes group address 2020-06-01 09:10:17 +08:00
lly 6bc4f5802d ble_mesh: Define a macro for invalid company id 2020-06-01 09:10:17 +08:00
lly 6768c2b7a1 ble_mesh: Check the result of creating timer 2020-05-27 09:30:34 +00:00
Island 3b85d4ef24 Merge branch 'bugfix/ble_mesh_sync_zephyr_fixes' into 'master'
Bugfix/ble mesh sync zephyr fixes

Closes BLEMESH-215

See merge request espressif/esp-idf!8912
2020-05-27 17:26:00 +08:00
Island d82f3372a0 Merge branch 'bugfix/ble_mesh_not_use_same_private_key' into 'master'
ble_mesh: Not using pre-initialized private key

Closes BLEMESH-214

See merge request espressif/esp-idf!8905
2020-05-27 17:25:39 +08:00
lly 0cfb6c138b 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-26 11:42:31 +08:00
lly f863a1b328 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-26 11:16:01 +08:00
lly 05c287e05c ble_mesh: Not using pre-initialized private key 2020-05-26 10:46:22 +08:00
lly bbbdbb8699 ble_mesh: Same func for storing/restoring comp data 2020-05-25 13:27:08 +08:00
lly af37aee5bf ble_mesh: Fix Provisioner failed to publish 2020-05-22 15:32:12 +08:00
lly b1f3843ed6 ble_mesh: Clear two more vars during proxy server deinit 2020-05-20 11:35:26 +00:00
lly d5b126667a ble_mesh: Add missing sdkconfig.h 2020-05-20 11:35:26 +00:00
lly 4e60919a66 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-20 11:35:26 +00:00
lly a0ce8c64b0 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-20 11:35:26 +00:00
lly 25a6ea9600 ble_mesh: Remove patch for the bug of an App 2020-05-14 10:24:15 +08:00
Island c946ca8b45 Merge branch 'bugfix/ble_mesh_node_old_version_to_new' into 'master'
ble_mesh: Fix mesh node device role restore

Closes BLEMESH-188

See merge request espressif/esp-idf!8314
2020-05-12 20:36:55 +08:00
Island 1d22f17da3 Merge branch 'bugfix/ble_mesh_not_ignore_msg_in_fast_prov' into 'master'
ble_mesh: Not ignore msg when fast prov is enabled

Closes BLEMESH-196

See merge request espressif/esp-idf!8698
2020-05-12 20:36:41 +08:00
lly f7ef701856 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-12 19:25:57 +08:00
lly 6b9c0dda08 ble_mesh: Fix typos 2020-05-12 16:23:13 +08:00
lly d937b415e3 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-12 11:22:07 +08:00
lly c2fd80b8f4 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-11 02:29:18 +00:00