Commit graph

148 commits

Author SHA1 Message Date
lly
c1c4990f75 ble_mesh: stack: Add more checks about input prov bearers 2020-08-27 11:20:50 +00:00
Island
72f029abc3 Merge branch 'feat/ble_mesh_use_iram_for_mem_alloc_v3.3' into 'release/v3.3'
Feat/ble mesh use diff ram for mem alloc (v3.3)

See merge request espressif/esp-idf!9619
2020-08-27 19:19:23 +08:00
lly
2a6b0d68ce ble_mesh: stack: Rename mesh adv queue and relay queue 2020-08-26 08:24:55 +00:00
lly
da068a639f ble_mesh: stack: Use macros for adv task name & prio 2020-08-26 08:24:55 +00:00
lly
df8b2c5f3a ble_mesh: stack: Make freertos static allocation visible 2020-08-26 08:24:55 +00:00
lly
a194c415a8 ble_mesh: stack: Update option of using DRAM/SPIRAM for memory allocation 2020-08-26 08:24:55 +00:00
lly
28c0673376 ble_mesh: stack: Add two application macros for TTL 2020-07-10 09:15:56 +08:00
lly
9eb66d49e4 ble_mesh: stack: Update send_ttl in btc when recv a msg
Update send_ttl mainly for server models. When a server model
receives a message, and the status is required to be replied
by the application, we need to set send_ttl to the msg context.
If send_ttl is not updated in btc, and the applcation does not
set the TTL either, then the status will be replied with TTL=0,
which may cause the client side (e.g. the phone App) failed to
receive the status.

Closes https://github.com/espressif/esp-idf/issues/5300
2020-07-10 09:15:49 +08:00
lly
8753fb359a ble_mesh: stack: Update some fast prov functions 2020-07-03 08:54:59 +08:00
lly
bbf4ce8d18 ble_mesh: stack: Move fast prov functions to a single file 2020-07-03 08:54:51 +08:00
lly
e36105156c ble_mesh: Mark platform related default RNG as 0 2020-07-02 03:38:18 +00:00
lly
9060de827f ble_mesh: Remove the previously added redundant aes files 2020-07-02 03:38:18 +00:00
lly
0940f5b2c3 ble_mesh: Update tinycrypt header file include guards
Add BLE_MESH in the macro to make it specific for BLE Mesh.
2020-07-02 03:38:18 +00:00
lly
d690e52993 ble_mesh: Format source and header files of tinycrypt 2020-07-02 03:38:18 +00:00
lly
12b9f59559 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-07-02 03:38:18 +00:00
lly
f835011e2f 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-07-01 12:32:04 +08:00
Island
021e23ebf7 Merge branch 'bugfix/ble_mesh_check_subnet_before_update_beacon_sent_v3.3' into 'release/v3.3'
ble_mesh: Check if subnet exists before updating beacon_sent (v3.3)

See merge request espressif/esp-idf!9398
2020-07-01 11:17:08 +08:00
lly
9f6375db50 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-30 09:23:28 +08:00
lly
96865524c7 ble_mesh: stack: Copy recv_rssi for other received messages
Follow the commit: 2b80cb6883,
copy the recv_rssi for other mesh messages.
2020-06-30 09:06:42 +08:00
mbroek
86cad8b825 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-30 09:06:31 +08:00
Island
370bb55f42 Merge branch 'bugfix/ble_mesh_get_node_with_name_v3.3' into 'release/v3.3'
ble_mesh: Get node info with pre-configured node name (v3.3)

See merge request espressif/esp-idf!9304
2020-06-28 20:25:13 +08:00
Island
1fb6ffecad Merge branch 'bugfix/ble_mesh_bt_hex_v3.3' into 'release/v3.3'
ble_mesh: Fix wrong log output with bt_hex (v3.3)

See merge request espressif/esp-idf!9311
2020-06-28 20:23:56 +08:00
Island
036828a172 Merge branch 'bugfix/ble_mesh_not_define_bool_v3.3' into 'release/v3.3'
Bugfix/ble mesh not define bool (v3.3)

See merge request espressif/esp-idf!9318
2020-06-28 20:22:50 +08:00
lly
ad970addf0 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-24 11:53:59 +00:00
lly
adbc337023 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-24 11:50:58 +00:00
lly
1dbbc55cc0 ble_mesh: Remove boolean type definitions 2020-06-24 11:46:51 +00:00
Nikolaos Strikos
0526de4536 ble_mesh: Do not #define bool when compiling in C++ 2020-06-24 11:46:51 +00:00
lly
366dd9759d ble_mesh: stack: Check model status with variable length 2020-06-24 11:41:58 +00:00
Island
ad2447a6ea Merge branch 'bugfix/ble_mesh_remove_relay_dependency_v3.3' into 'release/v3.3'
ble_mesh: Remove relay option dependency (v3.3)

See merge request espressif/esp-idf!9028
2020-06-03 15:20:56 +08:00
Island
686530d373 Merge branch 'bugfix/ble_mesh_example_nvs_store_v3.3' into 'release/v3.3'
Bugfix/ble mesh example nvs store (v3.3)

See merge request espressif/esp-idf!9018
2020-06-03 15:12:28 +08:00
Island
c3902be87f Merge branch 'bugfix/ble_mesh_model_recv_fix_v3.3' into 'release/v3.3'
Bugfix/ble mesh model recv fix (v3.3)

See merge request espressif/esp-idf!9009
2020-06-03 15:11:38 +08:00
Island
88937185ac Merge branch 'bugfix/ble_mesh_rework_prov_pdu_len_check_v3.3' into 'release/v3.3'
ble_mesh: Rework prov pdu length check (v3.3)

See merge request espressif/esp-idf!9005
2020-06-03 15:11:11 +08:00
lly
7937a51779 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:19:18 +08:00
lly
cb0288d399 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-06-02 14:05:26 +08:00
lly
59cdd33dcf ble_mesh: Add more checks of net_idx & app_idx 2020-06-02 14:05:19 +08:00
lly
36c476833f ble_mesh: Optimize some send & recv logs 2020-06-02 14:05:12 +08:00
lly
ac565c97a3 ble_mesh: correct the return type [Zephyr] 2020-06-02 10:33:12 +08:00
lly
8c5a8bef50 ble_mesh: Add net_buf_simple_init_with_data [Zephyr] 2020-06-02 10:33:05 +08:00
lly
ac76870ad7 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-02 10:32:57 +08:00
lly
a96e1b80ac ble_mesh: Rework prov pdu length check 2020-06-02 10:17:20 +08:00
lly
6abdc9e542 ble_mesh: Local model (un)subscribes group address 2020-06-01 09:13:57 +08:00
lly
0ee9227b45 ble_mesh: Define a macro for invalid company id 2020-06-01 09:13:43 +08:00
lly
b5f3f79716 ble_mesh: Check the result of creating timer 2020-05-28 10:28:36 +08:00
Island
5f43d69d21 Merge branch 'bugfix/ble_mesh_sync_zephyr_fixes_v3.3' into 'release/v3.3'
Bugfix/ble mesh sync zephyr fixes (v3.3)

See merge request espressif/esp-idf!8950
2020-05-28 10:17:29 +08:00
Island
a70c956a75 Merge branch 'bugfix/ble_mesh_not_use_same_private_key_v3.3' into 'release/v3.3'
ble_mesh: Not using pre-initialized private key (v3.3)

See merge request espressif/esp-idf!8947
2020-05-28 10:15:40 +08:00
lly
822b20eb40 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:12 +08:00
lly
b381998a23 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:44:58 +08:00
lly
393e4e9007 ble_mesh: Not using pre-initialized private key 2020-05-27 17:38:41 +08:00
lly
4b191ac6fb ble_mesh: Same func for storing/restoring comp data 2020-05-27 17:32:56 +08:00
lly
879bfc608c ble_mesh: Fix Provisioner failed to publish 2020-05-22 15:49:30 +08:00