Cannot set Generic Level Server with BLE Mesh

gandiii
Posts: 5
Joined: Tue Jul 09, 2019 3:45 pm

Cannot set Generic Level Server with BLE Mesh

Postby gandiii » Sat Jul 13, 2019 5:44 pm

Hi,

I am trying to set the level state on a generic level server and get
the following error message:

Code: Select all

E (71794) BLE_MESH: bt_mesh_client_send_msg, Busy sending message to DST 0x0002
E (71794) BLE_MESH: gen_set_state, Failed to send Generic Set message (err -16)
W (71794) BLE_MESH: Receive generic status message timeout
I (71804) ble_mesh_client: esp_ble_mesh_generic_cb: event is 1, error code is -16, opcode is 0x8206
I (71814) ble_mesh_client: ESP_BLE_MESH_GENERIC_CLIENT_SET_STATE_EVT
I (71814) ble_mesh_client: esp_ble_mesh_generic_cb: event is 3, error code is 0, opcode is 0x8206
I (71824) ble_mesh_client: ESP_BLE_MESH_GENERIC_CLIENT_TIMEOUT_EVT
Generic Level Server:
Nordic NRF52832
Address 0x0002
App Key Index 0
Subscribed to 0xC001

Generic Level Client:
ESP32
Address 0x001D
App Key Index 0
Publishes to 0xC001

Wangcheng
Posts: 73
Joined: Wed Mar 06, 2019 3:26 am

Re: Cannot set Generic Level Server with BLE Mesh

Postby Wangcheng » Mon Jul 15, 2019 3:01 am

gandiii wrote:
Sat Jul 13, 2019 5:44 pm
Hi,

I am trying to set the level state on a generic level server and get
the following error message:

Code: Select all

E (71794) BLE_MESH: bt_mesh_client_send_msg, Busy sending message to DST 0x0002
E (71794) BLE_MESH: gen_set_state, Failed to send Generic Set message (err -16)
W (71794) BLE_MESH: Receive generic status message timeout
I (71804) ble_mesh_client: esp_ble_mesh_generic_cb: event is 1, error code is -16, opcode is 0x8206
I (71814) ble_mesh_client: ESP_BLE_MESH_GENERIC_CLIENT_SET_STATE_EVT
I (71814) ble_mesh_client: esp_ble_mesh_generic_cb: event is 3, error code is 0, opcode is 0x8206
I (71824) ble_mesh_client: ESP_BLE_MESH_GENERIC_CLIENT_TIMEOUT_EVT
Generic Level Server:
Nordic NRF52832
Address 0x0002
App Key Index 0
Subscribed to 0xC001

Generic Level Client:
ESP32
Address 0x001D
App Key Index 0
Publishes to 0xC001
1. Log means: After the first message is sent. Should be answered by the corresponding status message.
If the corresponding status message is not received, it will wait for the timeout.
The default time for waiting for the timeout is 4s. This default value is set in menuconfig(timeout(ms) for client message response).

2. Reference Code:
msg_common.opcode = ESP_BLE_MESH_MODEL_OP_GEN_LEVEL_SET;
generic_set.level_set.level = PARAM(0);
generic_set.level_set.tid = PARAM(1);
generic_set.level_set.op_en = false;
if (param_num == 4) {
generic_set.level_set.trans_time = PARAM(2);
generic_set.level_set.delay = PARAM(3);
generic_set.level_set.op_en = true;
}
msg_common.model = gen_level_client.model;
err = esp_ble_mesh_generic_client_set_state(&msg_common, &generic_set);
if (err) {
ESP_LOGE(TAG, "Failed to send Generic Level Set");
break;
}
Note: “PARAM” Indicates that the parameter is variable
3. If you have not solved your problem, you can provide the code to us.

Who is online

Users browsing this forum: robizzar72 and 131 guests