Commit Graph

226 Commits

Author SHA1 Message Date
Island
e40e694cf9 Merge branch 'bugfix/ble_mesh_set_recv_rssi_v4.1' into 'release/v4.1'
Bugfix/ble mesh set recv rssi (v4.1)

See merge request espressif/esp-idf!9400
2020-08-26 15:56:02 +08:00
lly
292333a27c 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-08-25 09:35:34 +08:00
lly
bd59c89540 ble_mesh: stack: Copy recv_rssi for other received messages
Follow the commit: 2b80cb6883,
copy the recv_rssi for other mesh messages.
2020-08-24 08:52:05 +00:00
mbroek
c3fe42250c When a generic mesh model message is received "bt_mesh_generic_server_cb_evt_to_btc" copies the
ctx values to cb_params for the mesh stack.

recv_rssi was not copied.

This means the rssi could not be read when receiving generic server messages using ble_mesh.
2020-08-24 08:52:05 +00:00
lly
3d888ca777 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-08-21 12:58:34 +00:00
Island
2a5679c253 Merge branch 'bugfix/ble_mesh_model_recv_fix_v4.1' into 'release/v4.1'
Bugfix/ble mesh model recv fix (v4.1)

See merge request espressif/esp-idf!9007
2020-08-21 20:37:53 +08:00
lly
9ba5899206 ble_mesh: correct the return type [Zephyr] 2020-08-21 07:21:15 +00:00
lly
6b6cf151cf ble_mesh: Add net_buf_simple_init_with_data [Zephyr] 2020-08-21 07:21:15 +00:00
lly
897acd6a1d 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-08-21 07:21:15 +00:00
lly
cc36e415c0 ble_mesh: Local model (un)subscribes group address 2020-08-21 07:18:44 +00:00
lly
a43e5feee8 ble_mesh: Define a macro for invalid company id 2020-08-21 07:18:44 +00:00
Island
ab6139b9df Merge branch 'bugfix/ble_mesh_check_model_status_v4.1' into 'release/v4.1'
ble_mesh: stack: Check model status with variable length (v4.1)

See merge request espressif/esp-idf!9399
2020-08-21 14:57:03 +08:00
Island
6e42afb45b Merge branch 'bugfix/ble_mesh_not_define_bool_v4.1' into 'release/v4.1'
Bugfix/ble mesh not define bool (v4.1)

See merge request espressif/esp-idf!9394
2020-08-21 14:56:46 +08:00
Island
252aaf2ab7 Merge branch 'bugfix/ble_mesh_bt_hex_v4.1' into 'release/v4.1'
ble_mesh: Fix wrong log output with bt_hex (v4.1)

See merge request espressif/esp-idf!9393
2020-08-21 14:56:34 +08:00
Island
9ff30e81c5 Merge branch 'bugfix/ble_mesh_remove_relay_dependency_v4.1' into 'release/v4.1'
ble_mesh: Remove relay option dependency (v4.1)

See merge request espressif/esp-idf!9026
2020-08-21 14:56:23 +08:00
lly
7f7397e67f 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-07-30 03:58:27 +00:00
lly
bf35465658 ble_mesh: stack: Check model status with variable length 2020-06-30 09:31:27 +08:00
lly
289b8bcea7 ble_mesh: Remove boolean type definitions 2020-06-30 09:18:42 +08:00
Nikolaos Strikos
0d5eb50ce2 ble_mesh: Do not #define bool when compiling in C++ 2020-06-30 09:18:42 +08:00
lly
353f893d95 ble_mesh: Fix wrong log output with bt_hex
- This issue was introduced in the commit: a788e7cd3d
  which updated the bt_hex() function incorrectly.
- And in bt_hex(), we use 2 for the two-dimensional array, because currently
  at most two bt_hex() will be used at the same time. Also this will save
  some DRAM compared with using 4.
2020-06-30 09:16:29 +08:00
lly
1bd7944316 ble_mesh: Rework prov pdu length check 2020-06-02 10:13:51 +08:00
lly
0c87b1c12d ble_mesh: Check the result of creating timer 2020-05-28 10:27:06 +08:00
Island
5ea193115b Merge branch 'bugfix/ble_mesh_sync_zephyr_fixes_v4.1' into 'release/v4.1'
Bugfix/ble mesh sync zephyr fixes (v4.1)

See merge request espressif/esp-idf!8948
2020-05-28 10:15:53 +08:00
Island
6971cdbad5 Merge branch 'bugfix/ble_mesh_not_use_same_private_key_v4.1' into 'release/v4.1'
ble_mesh: Not using pre-initialized private key (v4.1)

See merge request espressif/esp-idf!8945
2020-05-28 10:14:21 +08:00
lly
2f73d76768 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:46:29 +08:00
lly
63c8dd2981 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:46:23 +08:00
lly
0c06be9bcd ble_mesh: Not using pre-initialized private key 2020-05-27 17:39:50 +08:00
lly
d3921346a9 ble_mesh: Same func for storing/restoring comp data 2020-05-27 17:30:31 +08:00
lly
3b89497b39 ble_mesh: Fix using old config for duplicate scan 2020-05-25 16:53:30 +08:00
lly
eeff638c97 ble_mesh: Fix Provisioner failed to publish 2020-05-22 15:47:40 +08:00
Island
502a2aed2a Merge branch 'bugfix/ble_mesh_friend_init_flag_v4.1' into 'release/v4.1'
Bugfix/ble mesh friend init flag (v4.1)

See merge request espressif/esp-idf!8848
2020-05-22 10:51:13 +08:00
Island
e789d85e69 Merge branch 'bugfix/ble_mesh_node_old_version_to_new_v4.1' into 'release/v4.1'
ble_mesh: Fix mesh node device role restore (v4.1)

See merge request espressif/esp-idf!8724
2020-05-21 15:10:48 +08:00
Island
eb8f6f942a Merge branch 'bugfix/ble_mesh_fix_typos_v4.1' into 'release/v4.1'
ble_mesh: Fix typos (v4.1)

See merge request espressif/esp-idf!8726
2020-05-21 15:10:10 +08:00
lly
715cb64288 ble_mesh: Clear two more vars during proxy server deinit 2020-05-21 14:26:05 +08:00
lly
52fa4c7f96 ble_mesh: Add missing sdkconfig.h 2020-05-21 14:26:05 +08:00
lly
f02d095ff1 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-21 14:26:04 +08:00
lly
ab73b3fd8e 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-21 14:26:04 +08:00
lly
9d587eb8fd ble_mesh: Remove patch for the bug of an App 2020-05-15 20:23:48 +08:00
lly
b929611d5d ble_mesh: Fix typos 2020-05-13 18:30:52 +08:00
lly
e9f64eb1c3 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-13 18:25:53 +08:00
Island
56c1646e2a Merge branch 'bugfix/sync_zephyr_bt_mesh_bugfix_v4.1' into 'release/v4.1'
Bugfix/sync zephyr bt mesh bugfix (v4.1)

See merge request espressif/esp-idf!8688
2020-05-13 18:15:37 +08:00
lly
31b164ccb1 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:04 +08:00
lly
295a9eea82 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 15:42:58 +08:00
lly
06d445759a ble_mesh: net_key_status only pull one key idx [Zephyr]
Fixes bug where the config client's net_key_status handler would attempt
to pull two key indexes from a message which only holds one.
2020-05-11 15:42:57 +08:00
lly
b1efdd5eb1 ble_mesh: Update client message timeout calculation
Since the behavior of sending segmented messages has been
changed properly, the calculation of timeout value which
will be used when sending an acknowledged message by a
client model also needs to be updated.
2020-05-11 15:42:57 +08:00
lly
42ccb7277f ble_mesh: Add lock for segmented msg operations
Add mutex to protect some variables of the mesh segmented
messages.
Currently the timeout handler of mesh will be executed in
the btc task, while the received mesh messages will be
handled in the btu task. In case some variables are set to
NULL when handled in the btu task, meanwhile these variables
are also accessed in the timeout handler, so we add mutex to
protect these variables and related operations.
2020-05-11 15:42:57 +08:00
lly
cffbc32253 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-11 15:42:56 +08:00
lly
8f5564af84 ble_mesh: Optimize some mesh log output 2020-05-11 15:42:56 +08:00
lly
6a6bac2c62 ble_mesh: Fix restore when revoke keys [Zephyr]
Store keys (NetKey and AppKey) again after revoking.
2020-05-11 15:42:55 +08:00
lly
526f253b2e 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-11 15:42:55 +08:00