Commit graph

1545 commits

Author SHA1 Message Date
lly 82a5b05948 ble_mesh: Add 48 bit variants [Zephyr]
This adds sys_*_*48 functions that operation on a 48 bits values.
2020-05-11 15:42:46 +08:00
lly 95718d9ef9 ble_mesh: Add support for 24 bit data type [Zephyr]
This enables pulling and pushing values in 24 bit format.
2020-05-11 15:42:46 +08:00
lly 33c0ddce40 ble_mesh: Add 24 bit variants [Zephyr]
This adds sys_*_*24 functions that operation on a 24 bits values.
2020-05-11 15:42:45 +08:00
lly bf4b513e83 ble_mesh: Group resends in proxy nodes [Zephyr]
Resend transport segments for groups on the advertiser interface, even
if a connected proxy node holds the group.
2020-05-11 15:42:45 +08:00
lly 91fff8c897 ble_mesh: Typo in condition in comp_add_elem of cfg_srv [Zephyr]
Vendor model IDs take up four (not two) bytes in the composition
2020-05-11 15:42:45 +08:00
lly 7ea60199a6 ble_mesh: GATT Proxy Spec 1.0.1 changes [Zephyr]
Backport of https://github.com/apache/mynewt-nimble/pull/724

Mesh spec 1.0.1 changes proxy disabling behavior to only affect the
relaying from proxy nodes. Previously, disabling proxy would shut down
all proxy and node activity.

Tweaks from the original commit:
- Removed redundant call to bt_mesh_adv_update() in gatt_proxy_set()
- Removed invalid ref to 4.2.11.1 in node_identity_set()

---

According to Mesh Profile Spec 1.0.1, Section 4.2.11:
"If the Proxy feature is disabled, a GATT client device can connect
over GATT to that node for configuration and control. Messages from
the GATT bearer are not relayed to the advertising bearer."

Moreover some notes have been removed from the spec compared to
version 1.0:

Mesh Profile Spec 1.0, Section 4.2.11:

"Upon transition from GATT Proxy state 0x01 to GATT Proxy state 0x00
the GATT Bearer Server shall disconnect all GATT Bearer Clients."

"The Configuration Client should turn off the Proxy state as the last
step in the configuration process."

Mesh Profile Spec 1.0, Section 4.2.11.1:

"When the GATT Proxy state is set to 0x00, the Node Identity state
for all subnets shall be set to 0x00 and shall not be changed."
2020-05-11 15:42:44 +08:00
lly 2b84b673bf ble_mesh: Support reliable sending when publishing [Zephyr]
Until now the choice of reliable sending (segmented messages with
acks) was implicitly dependent on the size of the payload. Add a new
member to the bt_mesh_model_pub to force using segment acks even when
the payload would fit a single unsegmented message.
2020-05-11 15:42:44 +08:00
lly c2e24e306f ble_mesh: Check device uuid when init provisioning 2020-05-11 15:42:43 +08:00
lly a85459e245 ble_mesh: Fix provisioning buffer initialization [Zephyr]
When PB-GATT support has been enabled the provisioning code "borrows"
the buffer from the proxy code. However, the way that initialization
was happening the proxy buffers were initialized only after
provisioning initialization, resulting in a corrupted buffer with
buf->data pointing to NULL. Reorder the initialization calls so that
proxy is done first and provisioning only after it.
2020-05-11 15:42:43 +08:00
lly a0434371b0 ble_mesh: Skip publish if update fails [Zephyr]
Allow models to skip a periodic publish interval by returning an error
from the publish update callback.

Previously, an error return from publish update would cancel periodic
publishing. This can't be recovered from, and as such, no valid model
implementation could return an error from this callback, and there was
no way to skip a periodic publish.
2020-05-11 15:42:42 +08:00
lly 1717c2face 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 15:42:42 +08:00
Island 27ae9d3e2c Merge branch 'bugfix/ble_mesh_provisioner_check_key_v4.1' into 'release/v4.1'
ble_mesh: Check if appkey exist before deleting it (v4.1)

See merge request espressif/esp-idf!8621
2020-05-06 18:17:02 +08:00
Island 7db21de3b3 Merge branch 'bugfix/ble_mesh_compile_error_o2_v4.1' into 'release/v4.1'
ble_mesh: Fix compile error when -O2 (performance) is chosen (v4.1)

See merge request espressif/esp-idf!8616
2020-05-06 18:15:53 +08:00
lly 78b13034ef ble_mesh: Fix node not erase info completely
Previously only mesh node info is supported to be stored
in flash. So when trying to reset the node, we only need
to judge if the BLE_MESH_VALID flag is set.
Currently we support storing both node & Provisioner info
in flash, when trying to erase the node info from flash,
the BLE_MESH_NODE flag will be checked. So we need to set
bt_mesh.flags to 0 when all the erase operations are done.
2020-05-06 11:43:43 +08:00
lly 099bf88b2e ble_mesh: Check if appkey exist before deleting it 2020-05-06 11:40:20 +08:00
lly 466d450b4b ble_mesh: Add length check for some mesh operations 2020-05-06 11:26:33 +08:00
lly a742255f8e ble_mesh: Fix compile error when -O2 (performance) is chosen 2020-05-06 11:26:25 +08:00
Island dd89b2dc0d Merge branch 'bugfix/ble_mesh_rpl_list_size_v4.1' into 'release/v4.1'
ble_mesh: Associate replay protection list size with nodes count (v4.1)

See merge request espressif/esp-idf!8493
2020-05-06 11:15:21 +08:00
Island fefa9b7fe9 Merge branch 'doc/ble_mesh_fixes_v4.1' into 'release/v4.1'
doc: Fix some ble mesh description (v4.1)

See merge request espressif/esp-idf!8502
2020-05-06 11:13:16 +08:00
Island 547fd926a9 Merge branch 'bugfix/ble_mesh_add_missing_cpp_v4.1' into 'release/v4.1'
ble_mesh: Add missing #ifdef __cplusplus (v4.1)

See merge request espressif/esp-idf!8505
2020-05-06 11:12:13 +08:00
Island d6cbfc7f19 Merge branch 'feat/ble_mesh_sensor_model_example_v4.1' into 'release/v4.1'
ble_mesh: Add ble mesh sensor model examples (v4.1)

See merge request espressif/esp-idf!8507
2020-05-06 11:11:59 +08:00
Island 61405472e4 Merge branch 'bugfix/ble_mesh_time_scene_wrong_name_v4.1' into 'release/v4.1'
ble_mesh: Fix time scene wrong macro name (v4.1)

See merge request espressif/esp-idf!8510
2020-05-06 11:11:24 +08:00
lly 4b1cbe87b3 ble_mesh: Fix client local parameters not initialized 2020-04-30 11:50:15 +00:00
lly 8b2291a718 ble_mesh: Continue node info restore even if failure happens
During BLE Mesh Provisioner initialization, the stack will restore
the nodes information if settings storage is enabled.
Previously when a failure happens (e.g. found the same uuid) during
the restore procedure, the information of the following nodes will
not be restored and error will be directly returned.
But this will introduce some problem with user experience, because
some newly provisioned nodes information will not be restored and
Provisioner will not be able to control those nodes.
So we change the operation here, when a failure happens during the
restore procedure, Provisioner will only ignore the information of
the current node and continue restoring other nodes information.
2020-04-30 11:50:15 +00:00
lly fca4124f70 ble_mesh: Remove some redundant functions 2020-04-30 11:50:15 +00:00
lly d35d765395 ble_mesh: Notify unprovisioned device beacon to application layer
With this change, if a Provisioner has provisioned the maximum
number of nodes, it can still report the unprovisioned device
beacon from other nodes to the application layer. And this will
be more reasonable compared with the previous implementation.
Previously when the node array of Provisioner is full, no beacon
from unprovisioned devices will be reported, only some warning
logs will be given.
2020-04-30 11:50:15 +00:00
lly 94092a148c ble_mesh: Check if assigned node address is duplicated
Previously only check the node address when it is assigned by the
application layer. Here we also check the address when the address
is allocated internally. And this will be useful when some mesh
internal tests are performed.
2020-04-30 11:50:15 +00:00
lly 68e8a7e0ba ble_mesh: Update next alloc address when node info is added 2020-04-30 11:50:15 +00:00
lly 62ac50f9d7 ble_mesh: Fix Provisioner provisioning deadlock 2020-04-30 11:50:15 +00:00
lly fefd52f093 ble_mesh: Remove BLE_MESH_MAX_STORED_NODES option
Previously the BLE_MESH_MAX_STORED_NODES option is added for
internal mesh test, which will be a little confusing for the
users to understand.
Here we remove this option, instead the BLE_MESH_MAX_PROV_NODES
will be used for all the cases. For mesh internal test, when
the test function is called to add some nodes info, the info
will be stored in the array of provisioned nodes directly.
2020-04-30 11:50:15 +00:00
lly 7c379f8a65 ble_mesh: Associate replay protection list size with nodes count
The replay protection list of Provisioner should be at least equal
to the number of nodes with the precondition that each node contains
only one element.
The help information of replay protection list is updated, and the
maximum number of nodes for Provisioner is adjusted based on the
replay protection list size.
2020-04-30 11:50:15 +00:00
lly c28828d255 doc: Fix some ble mesh description 2020-04-30 11:43:26 +00:00
lly 67eef52822 ble_mesh: Add some common macros for sensor model 2020-04-30 11:35:11 +00:00
lly 6f7acf6a21 ble_mesh: Allow empty sensor series column value 2020-04-30 11:35:11 +00:00
lly df96c73471 ble_mesh: Check if same sensor (settings) property id exists 2020-04-30 11:35:11 +00:00
lly 3ceb5b3718 ble_mesh: Allow empty sensor settings exist 2020-04-30 11:35:11 +00:00
lly d51bd36142 ble_mesh: Add missing #ifdef __cplusplus 2020-04-30 08:45:55 +00:00
baohongde ddaa9d4523 Coexistence: Add coexist API to enable BLE connection dynamic priority 2020-04-29 13:57:59 +08:00
lly e6fc2a7bc8 ble_mesh: Fix time scene wrong macro name 2020-04-27 16:24:13 +08:00
Jiang Jiang Jian f646cdd6a8 Merge branch 'nimble/fix_ble_hs_reset_v4.1' into 'release/v4.1'
NimBLE: Reset master and slave states on host reset and few minor fixes  (backport v4.1)

See merge request espressif/esp-idf!8216
2020-04-15 13:23:59 +08:00
lly 1ac44aa202 ble_mesh: Support BLE advertising simultaneously 2020-04-10 17:34:06 +08:00
Prasad Alatkar acb92c225f NimBLE: Minor fix in esp_nimble_cfg and bleprph README (backport v4.1) 2020-04-09 16:05:14 +05:30
Prasad Alatkar 072d01da2f NimBLE: Reset master and slave states on host reset and fix build failure (backport v4.1) 2020-04-09 16:05:04 +05:30
lly 89f7e62011 ble_mesh: Add ble mesh white list test function
Using the ble mesh white list test functions, a node can choose to
only receive mesh messages from a specific node and relay the
messages for it. Messages from other nodes will be ignored.
2020-04-09 06:03:59 +00:00
Jiang Jiang Jian 9a1c5a903f Merge branch 'bugfix/btdm_backports_v4.1_0328' into 'release/v4.1'
Bugfix/btdm backports v4.1 0328

See merge request espressif/esp-idf!8150
2020-04-02 22:47:49 +08:00
xiewenxiang 79590d2e21 component/bt: fix don't dequeue the command queue after process the read_by_type_req 2020-03-31 16:27:08 +08:00
baohongde a8494b68e1 components/coex: Fix wakeup delay with DFS 2020-03-28 20:12:21 +08:00
gengyuchao 374e9b32d4 bugfix/fix_controller_disable_re_enable_crash 2020-03-28 17:14:37 +08:00
Jiang Jiang Jian 71ffae5d6e Merge branch 'bugfix/hfp_github_issues_v4.1' into 'release/v4.1'
Bugfix for HFP and some Github issue. v4.1

See merge request espressif/esp-idf!7975
2020-03-20 13:21:33 +08:00
weitianhua f5fc735711 Bugfix for HFP and some Github issue.
1. Bugfix for AG audio crash (change the return position)
2. Fix the error macro name and error return in hfp_hf demo
3. Fix the annotation error using UTF-8 ' (from Github)
4. Change or remove the log in SCO related code region.
5. Correct error of introduction of a function.
2020-03-18 04:06:24 +00:00