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.
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)
uint8_t YOUR_OPCODE = 0X02;
if (p_scan_result! = NULL)
uint8_t data ;
memcpy (data, p_scan_result-> remote_bd_addr, 6);
data  = 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");
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
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);
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);
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?
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.
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
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.
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.
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
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