Merge branch 'bugfix/ble_mesh_update_send_ttl' into 'master'

Bugfix/ble mesh update send ttl

Closes BMCI-79

See merge request espressif/esp-idf!9446
This commit is contained in:
Island 2020-07-09 23:05:28 +08:00
commit cf056a7d0b
7 changed files with 18 additions and 1 deletions

View file

@ -61,6 +61,12 @@ typedef uint8_t esp_ble_mesh_octet8_t[ESP_BLE_MESH_OCTET8_LEN];
/*!< Invalid Company ID */
#define ESP_BLE_MESH_CID_NVAL 0xFFFF
/*!< Special TTL value to request using configured default TTL */
#define ESP_BLE_MESH_TTL_DEFAULT 0xFF
/*!< Maximum allowed TTL value */
#define ESP_BLE_MESH_TTL_MAX 0x7F
#define ESP_BLE_MESH_ADDR_UNASSIGNED 0x0000
#define ESP_BLE_MESH_ADDR_ALL_NODES 0xFFFF
#define ESP_BLE_MESH_ADDR_PROXIES 0xFFFC
@ -522,7 +528,7 @@ typedef struct {
/** Force sending reliably by using segment acknowledgement */
uint8_t send_rel: 1;
/** TTL, or BLE_MESH_TTL_DEFAULT for default TTL. */
/** TTL, or ESP_BLE_MESH_TTL_DEFAULT for default TTL. */
uint8_t send_ttl;
/** Opcode of a received message. Not used for sending message. */

View file

@ -352,6 +352,7 @@ void bt_mesh_config_client_cb_evt_to_btc(u32_t opcode, u8_t evt_type,
params.ctx.recv_op = ctx->recv_op;
params.ctx.recv_dst = ctx->recv_dst;
params.ctx.recv_rssi = ctx->recv_rssi;
params.ctx.send_ttl = ctx->send_ttl;
cb_params.error_code = 0;
cb_params.params = &params;
@ -753,6 +754,7 @@ void bt_mesh_config_server_cb_evt_to_btc(u8_t evt_type,
cb_params.ctx.recv_op = ctx->recv_op;
cb_params.ctx.recv_dst = ctx->recv_dst;
cb_params.ctx.recv_rssi = ctx->recv_rssi;
cb_params.ctx.send_ttl = ctx->send_ttl;
if (val && len) {
length = (len <= sizeof(cb_params.value)) ? len : sizeof(cb_params.value);

View file

@ -420,6 +420,7 @@ void bt_mesh_generic_client_cb_evt_to_btc(u32_t opcode, u8_t evt_type,
params.ctx.recv_op = ctx->recv_op;
params.ctx.recv_dst = ctx->recv_dst;
params.ctx.recv_rssi = ctx->recv_rssi;
params.ctx.send_ttl = ctx->send_ttl;
cb_params.error_code = 0;
cb_params.params = &params;
@ -744,6 +745,7 @@ void bt_mesh_generic_server_cb_evt_to_btc(u8_t evt_type,
cb_params.ctx.recv_op = ctx->recv_op;
cb_params.ctx.recv_dst = ctx->recv_dst;
cb_params.ctx.recv_rssi = ctx->recv_rssi;
cb_params.ctx.send_ttl = ctx->send_ttl;
if (val && len) {
length = (len <= sizeof(cb_params.value)) ? len : sizeof(cb_params.value);

View file

@ -286,6 +286,7 @@ void bt_mesh_health_client_cb_evt_to_btc(u32_t opcode, u8_t evt_type,
params.ctx.recv_op = ctx->recv_op;
params.ctx.recv_dst = ctx->recv_dst;
params.ctx.recv_rssi = ctx->recv_rssi;
params.ctx.send_ttl = ctx->send_ttl;
cb_params.error_code = 0;
cb_params.params = &params;

View file

@ -264,6 +264,7 @@ void bt_mesh_lighting_client_cb_evt_to_btc(u32_t opcode, u8_t evt_type,
params.ctx.recv_op = ctx->recv_op;
params.ctx.recv_dst = ctx->recv_dst;
params.ctx.recv_rssi = ctx->recv_rssi;
params.ctx.send_ttl = ctx->send_ttl;
cb_params.error_code = 0;
cb_params.params = &params;
@ -559,6 +560,7 @@ void bt_mesh_lighting_server_cb_evt_to_btc(u8_t evt_type,
cb_params.ctx.recv_op = ctx->recv_op;
cb_params.ctx.recv_dst = ctx->recv_dst;
cb_params.ctx.recv_rssi = ctx->recv_rssi;
cb_params.ctx.send_ttl = ctx->send_ttl;
if (val && len) {
length = (len <= sizeof(cb_params.value)) ? len : sizeof(cb_params.value);

View file

@ -502,6 +502,7 @@ void bt_mesh_sensor_client_cb_evt_to_btc(u32_t opcode, u8_t evt_type,
params.ctx.recv_op = ctx->recv_op;
params.ctx.recv_dst = ctx->recv_dst;
params.ctx.recv_rssi = ctx->recv_rssi;
params.ctx.send_ttl = ctx->send_ttl;
cb_params.error_code = 0;
cb_params.params = &params;
@ -876,6 +877,7 @@ void bt_mesh_sensor_server_cb_evt_to_btc(u8_t evt_type,
cb_params.ctx.recv_op = ctx->recv_op;
cb_params.ctx.recv_dst = ctx->recv_dst;
cb_params.ctx.recv_rssi = ctx->recv_rssi;
cb_params.ctx.send_ttl = ctx->send_ttl;
if (val && len) {
length = (len <= sizeof(cb_params.value)) ? len : sizeof(cb_params.value);

View file

@ -266,6 +266,7 @@ void bt_mesh_time_scene_client_cb_evt_to_btc(u32_t opcode, u8_t evt_type,
params.ctx.recv_op = ctx->recv_op;
params.ctx.recv_dst = ctx->recv_dst;
params.ctx.recv_rssi = ctx->recv_rssi;
params.ctx.send_ttl = ctx->send_ttl;
cb_params.error_code = 0;
cb_params.params = &params;
@ -463,6 +464,7 @@ void bt_mesh_time_scene_server_cb_evt_to_btc(u8_t evt_type,
cb_params.ctx.recv_op = ctx->recv_op;
cb_params.ctx.recv_dst = ctx->recv_dst;
cb_params.ctx.recv_rssi = ctx->recv_rssi;
cb_params.ctx.send_ttl = ctx->send_ttl;
if (val && len) {
length = (len <= sizeof(cb_params.value)) ? len : sizeof(cb_params.value);