Hi:
I want to realise the bluetooth mesh scenes,but I can't find out any detail document about this,I want to know if anyone has implemented the bluetooth mesh scene.
I am expecting a reply !
thanks!
Solved! Go to Solution.
Hi mandy wu,
Please follow below steps:
NOTE:
Thanks,
-Dheeraj
Hi mawu_4270096
It's our pleasure to support you in your project development.:)
Also Cypress support all Mesh Core and Model features defined in SIG BLE MESH specification.
We have code examples of scene server and client models implemented that you can get from Github (Please select code examples compatible with your hardware from app/snip/mesh). Initially you can try using code examples: mesh_onoff_server, mesh_scene_client and mesh_provision_client to understand the scene functionalities.
I would suggest you to start with Getting Started with Bluetooth Mesh guide.
Please watch How To Design With Bluetooth Mesh (Hands-On) if you prefer video lecture.
Other Links:
Helper application guide: MeshClient and ClientControlMesh App User Guide
Other supported documents: https://www.cypress.com/products/ble-mesh
Please refer to BT SIG Mesh Specification also - https://www.bluetooth.com/specifications/mesh-specifications
Thanks,
-Dheeraj
thanks!
I have browsed the code of mesh_scene_client. It seems that a host computer needs to send instructions to communicate with the scene client. The following is part of the code of the scene client
/*
* In 2 chip solutions MCU can send commands to change scene state.
*/
uint32_t mesh_app_proc_rx_cmd(uint16_t opcode, uint8_t *p_data, uint32_t length)
{
wiced_bt_mesh_event_t *p_event;
WICED_BT_TRACE("[%s] cmd_opcode 0x%02x\n", __FUNCTION__, opcode);
switch (opcode)
{
case HCI_CONTROL_MESH_COMMAND_SCENE_STORE:
case HCI_CONTROL_MESH_COMMAND_SCENE_RECALL:
case HCI_CONTROL_MESH_COMMAND_SCENE_GET:
case HCI_CONTROL_MESH_COMMAND_SCENE_REGISTER_GET:
case HCI_CONTROL_MESH_COMMAND_SCENE_DELETE:
break;
default:
WICED_BT_TRACE("unknown\n");
return WICED_FALSE;
}
p_event = wiced_bt_mesh_create_event_from_wiced_hci(opcode, MESH_COMPANY_ID_BT_SIG, WICED_BT_MESH_CORE_MODEL_ID_SCENE_CLNT, &p_data, &length);
if (p_event == NULL)
{
WICED_BT_TRACE("bad hdr\n");
return WICED_TRUE;
}
switch (opcode)
{
case HCI_CONTROL_MESH_COMMAND_SCENE_STORE:
mesh_scene_client_store(p_event, p_data, length);
break;
case HCI_CONTROL_MESH_COMMAND_SCENE_RECALL:
mesh_scene_client_recall(p_event, p_data, length);
break;
case HCI_CONTROL_MESH_COMMAND_SCENE_GET:
mesh_scene_client_get(p_event, p_data, length);
break;
case HCI_CONTROL_MESH_COMMAND_SCENE_REGISTER_GET:
mesh_scene_client_register_get(p_event, p_data, length);
break;
case HCI_CONTROL_MESH_COMMAND_SCENE_DELETE:
mesh_scene_client_delete(p_event, p_data, length);
break;
}
return WICED_TRUE;
}
if there is any document to introduce how to send instructions to the scene client through the host computer!
thanks
Hi mandy wu,
Please follow below steps:
NOTE:
Thanks,
-Dheeraj