Commit graph

36 commits

Author SHA1 Message Date
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 268f5ad6c6 ble_mesh: Optimize some send & recv logs 2020-06-02 14:04:34 +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
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 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
lly 11286e35a2 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-21 15:22:20 +08:00
lly 2c5b0a523a 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-21 15:22:19 +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 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 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
lly 6eaeda9cf4 ble_mesh: Calc incomplete timeout based on msg info 2020-02-27 14:42:25 +08:00
lly ef7461ae1d ble_mesh: Unify client application and lower transport layer timeout 2020-02-27 14:42:25 +08:00
lly 6d61f6667a ble_mesh: Reset transport info when node is removed 2020-02-27 14:42:25 +08:00
lly e24641cc89 ble_mesh: Miscellaneous modifications
1. Add an API to set Provisioner static oob value
2. Add an API to deinit BLE Mesh stack
3. Add an API to set Provisioner unicast address
4. Add an API to provision devices with fixed address
5. Add an API to store node composition data
6. Add an API to get node with device uuid
7. Add an API to get node with unicast address
8. Add an API to delete node with device uuid
9. Add an API to delete node with unicast address
10. Add an API for Provisioner to update local AppKey
11. Add an API for Provisioner to update local NetKey
12. Support Provisioner persistent functionality
13. Fix Provisioner entering IV Update procedure
14. Fix an issue which may cause client failing to send msg
15. Use bt_mesh.flags to indicate device role
16. Remove several useless macros
17. Callback RSSI of received mesh provisioning packets
18. Modify the Provisioner disable function
19. Change some log level from debug to info
20. Add parameters to Provisioner bind AppKey completion event
21. Fix node ignoring relay messages issue
22. Support using a specific partition for BLE Mesh
23. Fix compile warning when proxy related macros are disabled
24. Clean up BLE Mesh stack included header files
25. NULL can be input if client message needs no parameters
26. Fix compile warning when BT log is disabled
27. Initilize BLE Mesh stack local variables
28. Support using PSRAM for BLE Mesh mutex, queue and task
29. Add a menuconfig option to enable using memory from PSRAM
30. Clean up sdkconfig.defaults of BLE Mesh examples
2020-02-27 14:42:25 +08:00
lly 928480ada9 ble_mesh: Remove useless CONFIG_BLE_MESH_NODE
For Low Power node and Proxy Server, the two features
depend on BLE_MESH_NODE in Kconfig.in, here in the
stack there is no need to judge if CONFIG_BLE_MESH_NODE
is enabled.
2020-01-13 10:39:57 +08:00
lly da0205b166 ble_mesh: Fixes Provisioner not support friend feature 2020-01-13 10:39:52 +08:00
lly 9e47e04897 ble_mesh: Expose app key get function 2020-01-13 10:38:48 +08:00
lly a870460f72 ble_mesh: Expose SeqZero mask
Makes a define for the seqzero 13-bit mask in transport, and exposes it
in the header for use in the friend module.
2020-01-13 10:38:15 +08:00
lly ebaa3e1c3e ble_mesh: Fix adv buf unref and link_id in exceptional list 2019-12-20 17:13:15 +08:00
lly f22d46515b ble_mesh: miscellaneous modifications
1. Clean up client_common.c
2. Clean up esp_ble_mesh directory
3. Update Kconfig.in
4. Format esp_ble_mesh files
2019-11-14 11:59:21 +08:00
lly 55f687c763 ble_mesh: update ble mesh examples sdkconfig.defaults 2019-09-09 18:10:52 +08:00
lly 6982663380 ble_mesh: fix adhering to the configured Friend Queue size 2019-09-09 17:47:47 +08:00
lly 1d970ad276 ble_mesh: remove useless code bt_mesh_trans_resend() 2019-09-09 17:47:30 +08:00
lly 225ee8e5d1 ble_mesh: introduce a helper for send callback function 2019-09-09 17:47:18 +08:00
lly fa4cd56d00 ble_mesh: fix heartbeat sending on friendship established/lost 2019-09-09 17:47:07 +08:00
lly 15f8b0fccc ble_mesh: fix checking for active heartbeat publication 2019-09-09 17:46:49 +08:00
lly 6f7b7c552d ble_mesh: fix not sending all segments through the Friend Queue 2019-09-09 17:46:19 +08:00
lly 6de637811f ble_mesh: move heartbeat sending to transport layer 2019-09-09 17:45:52 +08:00
lly 05e4b28a74 ble_mesh: fix segmented message RPL behavior 2019-09-09 17:44:11 +08:00
lly e3b304997f ble_mesh: fix finding netkey/appkey/devkey for tx/rx msg 2019-09-09 17:43:04 +08:00
lly 708bff3b17 ble_mesh: rename ble mesh client model variables and functions 2019-09-09 17:42:00 +08:00
lly 317f4c5ff5 ble_mesh: reorganize ble mesh model files 2019-09-09 17:41:54 +08:00
Hrishikesh Dhayagude 21165edf41 Bluetooth component refactoring 2019-06-30 16:39:00 +08:00
Renamed from components/bt/ble_mesh/mesh_core/transport.c (Browse further)