Commit graph

239 commits

Author SHA1 Message Date
lly 6ca4ea1a1f ble_mesh: stack: Update some fast prov functions 2020-07-01 13:26:06 +00:00
lly 64e76ee019 ble_mesh: stack: Move fast prov functions to a single file 2020-07-01 13:26:06 +00:00
Island a97a16202e Merge branch 'bugfix/ble_mesh_compile_error' into 'master'
bugfix: ble mesh proxy compile error

See merge request espressif/esp-idf!9334
2020-07-01 11:17:26 +08:00
lly 6aef6c5f1c ble_mesh: stack: Copy recv_rssi for other received messages
Follow the commit: 2b80cb6883,
copy the recv_rssi for other mesh messages.
2020-06-29 20:07:42 +08:00
mbroek 2b80cb6883 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-06-29 19:54:23 +08:00
lly c8112454c3 ble_mesh: stack: Fix compile error when only proxy enabled
Also remove some redundant CONFIG_BLE_MESH_PROXY checks, because
when the following options are satisfied, the CONFIG_BLE_MESH_PROXY
option will be selected mandatorily.
2020-06-28 23:09:47 +00:00
Island 3266511582 Merge branch 'bugfix/ble_mesh_split_tinycrypt' into 'master'
Bugfix/ble mesh split tinycrypt

See merge request espressif/esp-idf!9098
2020-06-23 19:07:31 +08:00
Island 07b15b0d36 Merge branch 'bugfix/ble_mesh_get_node_with_name' into 'master'
ble_mesh: Get node info with pre-configured node name

Closes BMCI-88

See merge request espressif/esp-idf!9089
2020-06-23 19:04:06 +08:00
Island 33282d9c94 Merge branch 'bugfix/ble_mesh_check_subnet_before_update_beacon_sent' into 'master'
ble_mesh: Check if subnet exists before updating beacon_sent

Closes BLEMESH-198

See merge request espressif/esp-idf!8709
2020-06-23 19:03:50 +08:00
Island 1420b6dd89 Merge branch 'bugfix/ble_mesh_bt_hex' into 'master'
ble_mesh: Fix wrong log output with bt_hex

See merge request espressif/esp-idf!9119
2020-06-23 19:02:58 +08:00
Island 371d590ca7 Merge branch 'bugfix/ble_mesh_not_define_bool' into 'master'
Bugfix/ble mesh not define bool

Closes IDFGH-3078 and BMCI-71

See merge request espressif/esp-idf!9135
2020-06-23 19:02:05 +08:00
lly 9e293b2e1f ble_mesh: Mark platform related default RNG as 0 2020-06-23 06:19:08 +00:00
lly 763f3ace61 ble_mesh: Remove the previously added redundant aes files 2020-06-23 06:19:08 +00:00
lly eecf9cc595 ble_mesh: Update tinycrypt header file include guards
Add BLE_MESH in the macro to make it specific for BLE Mesh.
2020-06-23 06:19:08 +00:00
lly eb7b2b5ae0 ble_mesh: Format source and header files of tinycrypt 2020-06-23 06:19:08 +00:00
lly ff7f088ebb ble_mesh: Port full implementation of tinycrypt [Zephyr]
- Original code is here: https://github.com/zephyrproject-rtos/tinycrypt
- Also this fixes the compile error when NimBLE and ESP BLE Mesh
  both uses the tinycrypt.
2020-06-23 06:19:08 +00:00
lly 4ae7efb4c0 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-06-20 05:47:19 +00:00
lly 8bfccba598 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-06-20 05:32:13 +00:00
lly ba5da8b086 ble_mesh: stack: Check model status with variable length 2020-06-19 21:30:55 +08:00
lly d7bd5c002e 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-16 06:32:12 +00:00
lly a0f1a43edc ble_mesh: Remove boolean type definitions 2020-06-11 16:17:49 +08:00
Nikolaos Strikos c04cfc2545 ble_mesh: Do not #define bool when compiling in C++ 2020-06-11 16:13:26 +08:00
Island b2a0e63ca8 Merge branch 'bugfix/ble_mesh_remove_relay_dependency' into 'master'
ble_mesh: Remove relay option dependency

See merge request espressif/esp-idf!9024
2020-06-03 15:20:24 +08:00
Island ae2898f12e Merge branch 'bugfix/ble_mesh_rework_prov_pdu_len_check' into 'master'
ble_mesh: Rework prov pdu length check

See merge request espressif/esp-idf!8993
2020-06-03 15:10:14 +08:00
lly 5ced2206b4 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-06-02 19:05:16 +08:00
Island bcbf2f2275 Merge branch 'bugfix/ble_mesh_model_recv_fix' into 'master'
Bugfix/ble mesh model recv fix

See merge request espressif/esp-idf!8988
2020-06-02 11:00:07 +08:00
lly c6e9d789b7 ble_mesh: Rework prov pdu length check 2020-06-01 20:44:52 +08:00
lly e41eae1b07 ble_mesh: correct the return type [Zephyr] 2020-06-01 14:08:21 +08:00
lly 1e29d86dd3 ble_mesh: Add net_buf_simple_init_with_data [Zephyr] 2020-06-01 13:57:41 +08:00
lly 8a8caebf51 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-06-01 13:57:33 +08:00
lly 9063821f01 ble_mesh: Config and health client btc fixes
Fix an issue which may cause no error code is returned
when sending config client or health client messages
with invalid parameters.
2020-05-29 21:10:13 +08:00
lly 409ea309f9 ble_mesh: Add more checks of net_idx & app_idx 2020-05-29 21:10:13 +08:00
lly 47609970db ble_mesh: Optimize some send & recv logs 2020-05-29 21:10:13 +08:00
lly 9aae4d3ba3 ble_mesh: Local model (un)subscribes group address 2020-05-29 09:40:19 +00:00
lly 2190c2c368 ble_mesh: Define a macro for invalid company id 2020-05-29 09:40:19 +00:00
lly 6768c2b7a1 ble_mesh: Check the result of creating timer 2020-05-27 09:30:34 +00:00
Island 3b85d4ef24 Merge branch 'bugfix/ble_mesh_sync_zephyr_fixes' into 'master'
Bugfix/ble mesh sync zephyr fixes

Closes BLEMESH-215

See merge request espressif/esp-idf!8912
2020-05-27 17:26:00 +08:00
Island d82f3372a0 Merge branch 'bugfix/ble_mesh_not_use_same_private_key' into 'master'
ble_mesh: Not using pre-initialized private key

Closes BLEMESH-214

See merge request espressif/esp-idf!8905
2020-05-27 17:25:39 +08:00
Island 02376b97d4 Merge branch 'bugfix/ble_mesh_uses_deprecated_config' into 'master'
ble_mesh: Fix using old config for duplicate scan

Closes BLEMESH-213

See merge request espressif/esp-idf!8898
2020-05-27 17:23:55 +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 05c287e05c ble_mesh: Not using pre-initialized private key 2020-05-26 10:46:22 +08:00
lly 3c1487be0e ble_mesh: Fix using old config for duplicate scan 2020-05-25 16:48:15 +08:00
lly bbbdbb8699 ble_mesh: Same func for storing/restoring comp data 2020-05-25 13:27:08 +08:00
lly af37aee5bf ble_mesh: Fix Provisioner failed to publish 2020-05-22 15:32:12 +08:00
lly b1f3843ed6 ble_mesh: Clear two more vars during proxy server deinit 2020-05-20 11:35:26 +00:00
lly d5b126667a ble_mesh: Add missing sdkconfig.h 2020-05-20 11:35:26 +00:00
lly 4e60919a66 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-20 11:35:26 +00:00
lly a0ce8c64b0 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-20 11:35:26 +00:00
lly 25a6ea9600 ble_mesh: Remove patch for the bug of an App 2020-05-14 10:24:15 +08:00