uint16_t data_len = event->data_len;
uint8_t *data = event->data;
int n;
- const struct mesh_msg_cmd *cmd;
struct mesh_pending_request *req;
int result = BLUETOOTH_ERROR_NONE;
if (req) {
BT_INFO("Mesh: Got Request");
- cmd = req->cmd;
__mesh_request_remove(req);
l_queue_remove(pending_msg_requests, req);
- } else
- cmd = NULL;
+ }
bluetooth_mesh_model_msg_t param;
memset(¶m, 0x00, sizeof(bluetooth_mesh_model_msg_t));
param.opcode = opcode;
BT_INFO("Send response");
- switch (opcode & ~MESH_OPCODE_UNRELIABLE) {
- case MESH_OPCODE_MODEL_GENERIC_ONOFF_STATUS: {
- BT_INFO("Received Generic On off status");
-
- BT_INFO("Mesh: Node %4.4x", event->source);
- if (!cmd) {
- BT_INFO("No pending req for this status");
- break;
- }
- if (cmd->opcode == MESH_OPCODE_MODEL_GENERIC_ONOFF_GET)
- BT_INFO("Mesh: Resp recvd: MESH_OPCODE_MODEL_GENERIC_ONOFF_GET");
- else if (cmd->opcode == MESH_OPCODE_MODEL_GENERIC_ONOFF_SET)
- BT_INFO("Mesh: Resp recvd: MESH_OPCODE_MODEL_GENERIC_ONOFF_SET");
- else
- BT_INFO("Request opcode do not match !");
- }
- default:
- return;
- }
__bt_mesh_handle_pending_msg_request_info(result,
BT_MESH_MODEL_EXECUTE_MSG, ¶m,
sizeof(bluetooth_mesh_model_msg_t));
unicast = _bt_mesh_node_get_next_unicast(net_uuid,
MESH_DEFAULT_START_ADDRESS,
- MESH_DEFAULT_START_ADDRESS, count);
+ MESH_DEFAULT_MAX_ADDRESS, count);
BT_INFO("Mesh: Network: Got unicast [%4.4x]", unicast);
memcpy(uuid.uuid, net_uuid, 16);