3 Replies Latest reply on Jul 2, 2019 4:52 AM by DheerajP_41

    how  to realise the  bluetooth mesh  scene and if there is any document to make a detailed introduction

    mawu_4270096

      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!

        • 1. Re: how  to realise the  bluetooth mesh  scene and if there is any document to make a detailed introduction
          DheerajP_41

          Hi mandy wu,

           

          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

          1 of 1 people found this helpful
          • 2. Re: how  to realise the  bluetooth mesh  scene and if there is any document to make a detailed introduction
            mawu_4270096

            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

            • 3. Re: how  to realise the  bluetooth mesh  scene and if there is any document to make a detailed introduction
              DheerajP_41

              Hi mandy wu,

               

              Please follow below steps:

              1. Download mesh_provision_client  and mesh_onoff_server (you can use any other server app which has scene server model defined) on two devices. (make sure you enable scene_client model for mesh_provision_client by selecting 'change application settings')
              2. Open ClientControl - Light Control tab and open COM port of the mesh_provision_client device. And then, provision mesh_onoff_server device.
              3. Note down the address allocated to mesh_onoff_server device (Eg: 0002).
              4. Goto ClientControl directory (.\components\BT-SDK\common\apps\snip\mesh\ClientControl\Release) and open Network.JSON. And check the appKeys generated.
              5. Select model tab on MeshClientControl and use appropriate destination address and app_key_index. (For GET messages you have to use Generic appKey index and for SET messages you have to use Setup appKey index.)
              6. Select Scene from the drop down menu and then use Scene commands (Store, recall, delete,...) to do operations.

               

              NOTE:

              • Please use Helper application guide: MeshClient and ClientControlMesh App User Guide if you have any doubt in the usage of MeshClient or MeshClientControl.
              • In the ModusToolbox click on the Documentation tab, the WICED API Reference then WICED HCI Control Protocol Also, please search wiced_bt_mesh_app.h for getting mesh_app_proc_rx_cmd definition.
              • You can use independent mesh_scene_client app also instead of mesh_provision_client app. But still you definitely need provision_client app to provision all the devices into a network.

               

              Thanks,

              -Dheeraj

              1 of 1 people found this helpful