1 2 Previous Next 25 Replies Latest reply on Jun 9, 2020 2:48 AM by DheerajP_41 Go to original post
      • 15. Re: we need help with BLE MESH
        VictorZ_46

        You need to get company ID from BT SIG. The process is described here https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers/#:~:text=Company%20identifiers%20are%20uni… .

        You need to create a model ID that you want to use, for example, 0x1000. Then you need to create Opcodes that you are planning to use, for example 0x00, 0x01, 0x02... You need to come up with a scheme how to provision and configure your devices. In that you will include configuring publication for your model.

        • 16. Re: we need help with BLE MESH
          jama_4535901

          I tried to send the data with the function that you recommend, but I did not succeed

           

          I edit the code:

           

          static void mesh_adv_report (wiced_bt_ble_scan_results_t * p_scan_result, uint8_t * p_adv_data)

          {

              wiced_bool_t processed = WICED_FALSE;

              /*...............*/

              wiced_bt_mesh_event_t * p_event;

           

              if (p_scan_result == NULL)

                    return;

              uint8_t YOUR_OPCODE = 0X02;

           

              if (p_scan_result! = NULL)

              {

                  uint8_t data [7];

                  memcpy (data, p_scan_result-> remote_bd_addr, 6);

                  data [6] = p_scan_result-> rssi;

           

          p_event=wiced_bt_mesh_create_event(0,MESH_COMPANY_ID_BT_SIG,WICED_BT_MESH_CORE_MODEL_ID_GENERIC_ONOFF_SRV, 0, 0);

           

              if (p_event == NULL)

              {

                WICED_BT_TRACE ("the device is not configured for publications \ n");

                      return;

              }

              else

                 {

              mesh_vendor_server_send_data (p_event, YOUR_OPCODE, data, 7);

                 }

              }

              /*..............*/

           

           

          during the tests

          I add as company id: MESH_COMPANY_ID_BT_SIG

          and i add id as model: WICED_BT_MESH_CORE_MODEL_ID_GENERIC_ONOFF_SRV

           

          these macros are in: wiced_bt_mesh_defs.h as the image shows

          prueba10.PNG

           

          and to use the line add the function: mesh_vendor_server_send_data (p_event, YOUR_OPCODE, data, 7); I added the following function:

           

          void mesh_vendor_server_send_data (wiced_bt_mesh_event_t * p_event, uint16_t opcode, uint8_t * p_data, uint16_t data_len)

          {

              p_event-> opcode = opcode;

              wiced_bt_mesh_core_send (p_event, p_data, data_len, NULL);

          }

           

          prueba11.PNG

           

          I declared this same function as in the vendor specific code as:

          static void mesh_vendor_server_send_data (wiced_bt_mesh_event_t * p_event, uint16_t opcode, uint8_t * p_data, uint16_t data_len);

          prueba12.PNG

           

          then load the code vendor specific with modifications in mesh_application.c to board number 1

           

           

          then load the code provisiont client / vendor client to board numbe 2

           

          create RED1, provisioned the board number 1 with the code vendor specific code

          but the board with bendor specific do not send the data: p_scan_result-> remote_bd_addr, p_scan_result-> rssi to board number 2 with the code vendor client

           

          can you tell me ?, why doesn't it work well?

          • 17. Re: we need help with BLE MESH
            VictorZ_46

            There are BT SIG defined models, and there are Vendor Specific models. To use Vendor Specific model you need to specify COMPANY_ID different than MESH_COMPANY_ID_BT_SIG. If you work for company that is a member of BT SIG you should be able to get a Company ID. I've sent you the link before.

            • 18. Re: we need help with BLE MESH
              jama_4535901

              the company where I work is not a member of BT SIG

               

              we want first if the code can work without using the information from BT SIG

               

              do we need to be members of BT SIG for our code to work?

               

              Is there anything we can do to make this code work without being members of BT SIG?

               

              if we need to be BT SIG members?

               

              we first want to test that the code works well

               

              so if the code works well, we will try to be members of BT SIG

              • 19. Re: we need help with BLE MESH
                VictorZ_46

                Makes perfect sense. You can use anything until you decide to ship the code to the market. I checked the Web site and the last timer used is 0x08DD, so you should be able to use 0x08DE or anything larger than that.

                • 20. Re: we need help with BLE MESH
                  jama_4535901

                  I already tried it, but it didn't work, I don't know why it didn't work,can you give me some advice?

                  I edit the code as shown in the photo, but it did not work well

                  PRUEBA13.PNG

                  • 21. Re: we need help with BLE MESH
                    VictorZ_46

                    Pretty much, but let me work with Dheeraj, and he will help you to write the code. One thing that you need to decide (and Dheeraj cannot help you with) is when to send the vendor specific messages. The place in the code that you hooked to receives all advertisement reports that happens in the area. It is quite likely is more than can go through the BLE mesh. You should figure out which exactly beacons you want to send.

                    • 22. Re: we need help with BLE MESH
                      jama_4535901

                      yes please help me with the code I can't get it to work well

                       

                      yes, with the code that you give me,  I will filter the data of: p_scan_result-> remote_bd_addr, p_scan_result-> rssi

                       

                      I waiting for your help,

                      It is veri important for us

                      • 23. Re: we need help with BLE MESH
                        DheerajP_41

                        Hi jama_4535901 ,

                         

                        • May I know which helper application are you using as provisioner for the mesh network? 
                        • Is your plan is to run vendor_specific_app on all your mesh devices/nodes?

                         

                        Thanks,

                        -Dheeraj

                        • 24. Re: we need help with BLE MESH
                          jama_4535901

                          I use the Mesh Client Control application that you gave me in this conversation: I need to send and receive messages with the Mesh Vendor_specific_app and mesh_provision_client app, please help me

                           

                          It can be with any application code, I use a specific provider because as it is the code that I saw that sends messages, I thought the code vendor specific is the most appropriate

                          • 25. Re: we need help with BLE MESH
                            DheerajP_41

                            HI,

                             

                            Please follow the instructions given in the attached doc.

                            Please find the attached mesh_specific_app.c/ .h

                             

                            Thanks,

                            -Dheeraj

                            1 of 1 people found this helpful
                            1 2 Previous Next