From bfed4fc90cfd8561d7ceb1e2fa93bfad656ad336 Mon Sep 17 00:00:00 2001 From: lly Date: Tue, 25 Feb 2020 10:43:04 +0800 Subject: [PATCH] ble_mesh: Allow maximum 377 octets payload --- components/bt/esp_ble_mesh/btc/btc_ble_mesh_prov.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/bt/esp_ble_mesh/btc/btc_ble_mesh_prov.c b/components/bt/esp_ble_mesh/btc/btc_ble_mesh_prov.c index 28e64b767e..067a35ded7 100644 --- a/components/bt/esp_ble_mesh/btc/btc_ble_mesh_prov.c +++ b/components/bt/esp_ble_mesh/btc/btc_ble_mesh_prov.c @@ -1944,8 +1944,8 @@ void btc_ble_mesh_model_call_handler(btc_msg_t *msg) break; } case BTC_BLE_MESH_ACT_SERVER_MODEL_SEND: { - /* arg->model_send.length contains opcode & message, 8 is used for TransMIC */ - struct net_buf_simple *buf = bt_mesh_alloc_buf(arg->model_send.length + 8); + /* arg->model_send.length contains opcode & message, 4 is used for TransMIC */ + struct net_buf_simple *buf = bt_mesh_alloc_buf(arg->model_send.length + 4); if (!buf) { BT_ERR("%s, Failed to allocate memory", __func__); break; @@ -1962,8 +1962,8 @@ void btc_ble_mesh_model_call_handler(btc_msg_t *msg) } case BTC_BLE_MESH_ACT_CLIENT_MODEL_SEND: { bt_mesh_role_param_t common = {0}; - /* arg->model_send.length contains opcode & message, 8 is used for TransMIC */ - struct net_buf_simple *buf = bt_mesh_alloc_buf(arg->model_send.length + 8); + /* arg->model_send.length contains opcode & message, 4 is used for TransMIC */ + struct net_buf_simple *buf = bt_mesh_alloc_buf(arg->model_send.length + 4); if (!buf) { BT_ERR("%s, Failed to allocate memory", __func__); break;