Commit graph

34 commits

Author SHA1 Message Date
lly 47609970db ble_mesh: Optimize some send & recv logs 2020-05-29 21:10:13 +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 25a6ea9600 ble_mesh: Remove patch for the bug of an App 2020-05-14 10:24:15 +08:00
lly 6b9c0dda08 ble_mesh: Fix typos 2020-05-12 16:23:13 +08:00
lly 9d7adc3e1b 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 02:29:18 +00:00
lly 5e59233cc0 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 02:29:18 +00:00
lly 25dfee4bdd ble_mesh: Add and use transport macro definitions [Zephyr] 2020-05-11 02:29:18 +00:00
lly df525bf0b3 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-11 02:29:18 +00:00
lly ef8206cdc6 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-11 02:29:18 +00:00
lly aad8908d9c 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-11 02:29:18 +00:00
lly 134f57b8e0 ble_mesh: Calc incomplete timeout based on msg info 2020-02-26 17:42:04 +08:00
lly 97eca35805 ble_mesh: Unify client application and lower transport layer timeout 2020-02-26 17:41:11 +08:00
lly 828bfeac88 ble_mesh: Reset transport info when node is removed 2020-02-26 17:40:23 +08:00
lly 7cd08b5824 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-26 17:37:44 +08:00
lly b836674d8e 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-06 16:17:36 +08:00
lly d83c37faed ble_mesh: Fixes Provisioner not support friend feature 2020-01-06 16:17:36 +08:00
lly b88dbf6348 ble_mesh: Expose app key get function 2020-01-06 16:17:36 +08:00
lly 99a63ce81d 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-06 16:17:36 +08:00
lly c354b0993d ble_mesh: Fix adv buf unref and link_id in exceptional list 2019-12-12 15:58:43 +08:00
lly 2bba9d7700 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-08 11:10:52 +08:00
lly 1a8f37b383 ble_mesh: update ble mesh examples sdkconfig.defaults 2019-09-09 17:15:16 +08:00
lly 8a7ab6cb3d ble_mesh: fix adhering to the configured Friend Queue size 2019-09-09 17:15:16 +08:00
lly 29de1a9acf ble_mesh: remove useless code bt_mesh_trans_resend() 2019-09-09 17:15:16 +08:00
lly 9a672caa7e ble_mesh: introduce a helper for send callback function 2019-09-09 17:15:16 +08:00
lly 05128c98ec ble_mesh: fix heartbeat sending on friendship established/lost 2019-09-09 17:15:16 +08:00
lly 9f80c24b74 ble_mesh: fix checking for active heartbeat publication 2019-09-09 17:15:16 +08:00
lly e152df43f1 ble_mesh: fix not sending all segments through the Friend Queue 2019-09-09 17:15:16 +08:00
lly 75b0f50aa0 ble_mesh: move heartbeat sending to transport layer 2019-09-09 17:15:16 +08:00
lly 716db01a7f ble_mesh: fix segmented message RPL behavior 2019-09-09 17:15:16 +08:00
lly 0c82a32524 ble_mesh: fix finding netkey/appkey/devkey for tx/rx msg 2019-09-09 17:15:16 +08:00
lly b3bc60183d ble_mesh: rename ble mesh client model variables and functions 2019-09-09 17:15:16 +08:00
lly 5f6259a625 ble_mesh: reorganize ble mesh model files 2019-09-09 17:15:16 +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)