Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

Bluetooth SDK Forum Discussions

Level 3
25 replies posted 10 replies posted 5 replies posted
Level 3

Good afternoon

could you help me this is urgent

I have 2 code with CYBT-213043-MESH

1- It is a code that scans and can the mac adress or host of the devices that are nearby, and prints them on the line: WICED_BT_TRACE ("Host =% B RSSI:% d \ r \ n", p_scan_result-> remote_bd_addr, p_scan_result-> rssi); (this code works fine)

2- It is the vendor specific code modified so that when it receives the message ("0x670x650x740x730x740x6c"), it responds with the same message or another message to the board with the code: Provision client / vendor client, (this code works well)

I want to combine these 2 codes, so that the board with this code can receive the message ("0x670x650x740x730x740x6c") and then it responds with the message saved in the line: WICED_BT_TRACE ("Host =% B RSSI:% d \ r \ n ", p_scan_result-> remote_bd_addr, p_scan_result-> rssi);


I want you to review these codes, and we need you to combine these 2 codes

In our work we want to buy 3000 or more BLE modules, but we only need this to buy BLE modules

1 Solution
5 comments on blog 25 sign-ins 250 likes received

Hi Martinez,

I tried to read messages in the thread, but I am still not clear what you want to do. If I understand correctly you want to use mesh_provision_client on one side and mesh_vendor_specific_app on another side. But you want to modify the content of the message that is sent in mesh_vendor_server_send_data, and the content of the message should depend on what advertising packets you receive. If this is what you need, this should be very simple to do. The mesh_vendor_specific_app is scanning as close to 100% as possible and receives and processes all adverts. This is done (I assume you are using ModusToolbox) in the wiced_btsdk/dev-kit/libraries/btsdk-mesh/COMPONENT_mesh_app_lib/mesh_application.c in the function mesh_adv_report. For example, if you want to count number of adverts sent by a device with Bluetooth Device Address 010203040506 you can modify function as

// Handle received adv packet

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;

    if (p_scan_result == NULL)


    if ((p_scan_result->remote_bd_addr[0] == 0x01) &&

        (p_scan_result->remote_bd_addr[1] == 0x02) &&

        (p_scan_result->remote_bd_addr[2] == 0x03) &&

        (p_scan_result->remote_bd_addr[3] == 0x04) &&

        (p_scan_result->remote_bd_addr[4] == 0x05) &&

        (p_scan_result->remote_bd_addr[5] == 0x06))


RSSI is available for you to use as well in p_scan_result->rssi

View solution in original post

25 Replies