Commit graph

1564 commits

Author SHA1 Message Date
lly b186be52f0 ble_mesh: Add support for 48 bit data type [Zephyr]
This enables pulling and pushing values in 48 bit format.
2020-05-11 02:29:18 +00:00
lly 23c8bbcbf5 ble_mesh: Add 48 bit variants [Zephyr]
This adds sys_*_*48 functions that operation on a 48 bits values.
2020-05-11 02:29:18 +00:00
lly 4e1d3974fb ble_mesh: Add support for 24 bit data type [Zephyr]
This enables pulling and pushing values in 24 bit format.
2020-05-11 02:29:18 +00:00
lly 26dbfdcb9d ble_mesh: Add 24 bit variants [Zephyr]
This adds sys_*_*24 functions that operation on a 24 bits values.
2020-05-11 02:29:18 +00:00
lly 95440c4d28 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 02:29:18 +00:00
lly 1f47cfff7f 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 02:29:18 +00:00
lly 31b175e372 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 02:29:18 +00:00
lly e385197c27 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 02:29:18 +00:00
lly cc549897d5 ble_mesh: Check device uuid when init provisioning 2020-05-11 02:29:18 +00:00
lly ca3d1637ca 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 02:29:18 +00:00
lly 6c868a070b 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 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 eaeb465767 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-04-30 06:42:54 +00:00
Island 18950d5780 Merge branch 'bugfix/ble_mesh_provisioner_check_key' into 'master'
ble_mesh: Check if appkey exist before deleting it

See merge request espressif/esp-idf!8332
2020-04-29 21:12:14 +08:00
Jiang Jiang Jian 922a0fa485 Merge branch 'feature/esp-hid-component' into 'master'
ESP-HID Component

See merge request espressif/esp-idf!6908
2020-04-29 17:24:02 +08:00
Hristo Gochkov 25281ef4de Add HID Support to IDF
- Adds HID Host support in Buedroid
- Adds BLE HID Host and Device support
- Adds some general HID utilities and definitions to help integrate with other stacks and native USB
2020-04-29 17:24:01 +08:00
Jiang Jiang Jian aad3b0e3a2 Merge branch 'bugfix/coex_fix_wifi_performance_when_ble_conn' into 'master'
Coexistence: Add coexist API to enable BLE connection dynamic priority

See merge request espressif/esp-idf!8466
2020-04-28 19:55:31 +08:00
Island 8ef0b66a3b Merge branch 'bugfix/ble_mesh_compile_error_o2' into 'master'
ble_mesh: Fix compile error when -O2 (performance) is chosen

Closes BLEMESH-187

See merge request espressif/esp-idf!8217
2020-04-28 17:29:09 +08:00
baohongde 95f47a2d4d Coexistence: Add coexist API to enable BLE connection dynamic priority 2020-04-28 16:16:27 +08:00
lly c8a7d20946 ble_mesh: Check if appkey exist before deleting it 2020-04-27 06:27:35 +00:00
lly fab9b944a4 ble_mesh: Add length check for some mesh operations 2020-04-27 14:24:07 +08:00
lly c77b7394ed ble_mesh: Fix compile error when -O2 (performance) is chosen 2020-04-27 14:24:07 +08:00
lly 75cf2d7a17 ble_mesh: Fix time scene wrong macro name 2020-04-27 04:17:04 +00:00
Island feb7f9683c Merge branch 'bugfix/ble_mesh_add_missing_cpp' into 'master'
ble_mesh: Add missing #ifdef __cplusplus

Closes BLEMESH-194

See merge request espressif/esp-idf!8310
2020-04-27 11:47:44 +08:00
Island 1e12673b3c Merge branch 'feat/ble_mesh_sensor_model_example' into 'master'
ble_mesh: Add ble mesh sensor model examples

Closes BLEMESH-190

See merge request espressif/esp-idf!8253
2020-04-27 11:47:06 +08:00
Island 71dc5eb276 Merge branch 'doc/ble_mesh_fixes' into 'master'
doc: Fix some ble mesh description

Closes BLEMESH-189

See merge request espressif/esp-idf!8240
2020-04-27 11:43:48 +08:00
lly 91d70cd128 ble_mesh: Add missing #ifdef __cplusplus 2020-04-26 06:50:35 +00:00
lly 77bb7806a0 ble_mesh: Fix client local parameters not initialized 2020-04-26 06:25:08 +00:00
lly 713581ae87 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-26 06:25:08 +00:00
lly 73804ef4d3 ble_mesh: Remove some redundant functions 2020-04-26 06:25:08 +00:00
lly f37bc1a515 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-26 06:25:08 +00:00
lly 88b0cd918a 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-26 06:25:08 +00:00
lly 7486616382 ble_mesh: Update next alloc address when node info is added 2020-04-26 06:25:08 +00:00
lly a4d9259912 ble_mesh: Fix Provisioner provisioning deadlock 2020-04-26 06:25:08 +00:00
lly 8d57ebf57d 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-26 06:25:08 +00:00
lly ec2324edbe 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-26 06:25:08 +00:00
lly 2f6a4140fa doc: Fix some ble mesh description 2020-04-26 06:22:33 +00:00
lly e8c5f5dc03 ble_mesh: Add some common macros for sensor model 2020-04-26 06:08:44 +00:00
lly 361dd8b29c ble_mesh: Allow empty sensor series column value 2020-04-26 06:08:44 +00:00
lly 561191d50f ble_mesh: Check if same sensor (settings) property id exists 2020-04-26 06:08:44 +00:00
lly 3862f0e784 ble_mesh: Allow empty sensor settings exist 2020-04-26 06:08:44 +00:00
sushant.chougule 4cd6f09427 components/bt: Fix for HCI desync deadlock issue in BLE controller 2020-04-02 09:54:16 +00:00
Jiang Jiang Jian 20a972d91e Merge branch 'feat/ble_mesh_ble_adv_simultaneously' into 'master'
ble_mesh: Support BLE advertising simultaneously

Closes BLEMESH-125

See merge request espressif/esp-idf!7802
2020-04-02 12:17:42 +08:00
lly a919e20c1a ble_mesh: Support BLE advertising simultaneously 2020-04-02 01:03:25 +00:00
Prasad Alatkar be8c847b06 NimBLE: Reset master and slave states on host reset
Closes IDFGH-2743 & IDFGH-2956
2020-04-01 10:09:26 +00:00
xiewenxiang 5d0b6da6a0 component/bt: fix don't dequeue the command queue after process the read_by_type_req 2020-03-31 15:10:01 +08:00
Jiang Jiang Jian 79e92b0e6a Merge branch 'bugfix/ble_mesh_add_test_function' into 'master'
ble_mesh: Add ble mesh white list test function

See merge request espressif/esp-idf!8046
2020-03-27 19:53:54 +08:00
Prasad Alatkar 38fc242914 NimBLE: Fix build failures due to non static declarations in RPA feature
CLoses IDFGH-2891
2020-03-27 14:06:55 +08:00
Prasad Alatkar 2bc28bbd5a NimBLE: Fix NIMBLE_HS_FLOW_CTRL_TX_ON_DISCONNECT in esp_nimble_cfg and bleprph README 2020-03-27 14:05:32 +08:00
Angus Gratton 88bf21b21e Merge branch 'nimble/iram_allocation_strategy' into 'master'
NimBLE: Add support to IRAM allocation strategy

See merge request espressif/esp-idf!8015
2020-03-27 13:54:25 +08:00