Google Fast Pairing Advertise Data not changing

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

cross mob
alca_3047856
Level 1
Level 1
10 sign-ins 5 questions asked 5 sign-ins

Background:

In the hello_sensor application, the Advertise Data and Scan Response data was set using:

wiced_bt_ble_set_raw_advertisement_data(num_elem, adv_elem) && wiced_bt_ble_set_raw_scan_response_data(scan_response_num_elem, adv_elem) APIs.

I was able to do this fine, and added a 128bitUUID by doing something like the following.

adv_elem[num_elem].advert_type  = BTM_BLE_ADVERT_TYPE_128SRV_COMPLETE;

    adv_elem[num_elem].len          = LEN_UUID_128;

    adv_elem[num_elem].p_data       = hello_service_uuid;

    num_elem++;

wiced_bt_ble_set_raw_advertisement_data(num_elem, adv_elem);

...

adv_elem[scan_response_num_elem].advert_type  = BTM_BLE_ADVERT_TYPE_NAME_COMPLETE;

         adv_elem[scan_response_num_elem].len          =  advertisingNameLength;

        adv_elem[scan_response_num_elem].p_data       =  (uint8_t *)fullDeviceName;

        scan_response_num_elem++;

    wiced_bt_ble_set_raw_scan_response_data(scan_response_num_elem, adv_elem);

In another project ( Audio headset ), the advertisement is handled through the wiced_bt_gfps ( google fast pairing service).

When I try to set the advertising data in a similar way, it does not seem to work.  Device name seems to be the only thing I can add.  I do not see any API for setting Scan Response data in the wiced_bt_gfps APIs either. Below is a quick code snippet just to show what I was trying.

headset_control_le_adv_elem[num_elem].advert_type    = BTM_BLE_ADVERT_TYPE_NAME_COMPLETE;

    headset_control_le_adv_elem[num_elem].len            = dev_name_len;

    headset_control_le_adv_elem[num_elem].p_data         = (uint8_t *) p_headset_control_le_dev_name;

    num_elem++;

    uint8_t test[2] = {0xAA, 0xBB} ;

    headset_control_le_adv_elem[num_elem].advert_type  = BTM_BLE_ADVERT_TYPE_16SRV_COMPLETE;

    headset_control_le_adv_elem[num_elem].len          = 2;

    headset_control_le_adv_elem[num_elem].p_data       = test;

    num_elem++;

    fastpair_conf.appended_adv_data.p_elem      = &headset_control_le_adv_elem;

    fastpair_conf.appended_adv_data.elem_num    = num_elem;

    /* Initialize Google Fast Pair Service. */

    if (wiced_bt_gfps_provider_init(&fastpair_conf) == WICED_FALSE)

    {

        WICED_BT_TRACE("wiced_bt_gfps_provider_init fail\n");

    }

Questions:

1.  Does google fast pair service support changing of the advertising data?

2.  Does google fast pair service support scan response packets?

3.  If yes to either, is there a place where I have missed these APIs that anyone knows of?

4.  For google fast pair service, I did not see a "start advertising" API.  Is this the API which starts google fast pairing service advertising: wiced_bt_gfps_provider_init(&fastpair_conf) ? 

5.  Is there a corresponding way to stop advertising the google fast pair service?

0 Likes
1 Solution
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

The advertising data for google fast pair service is defined by google: Google Fast Pair Service  |  Google Developers

The adv packet is set in the API wiced_bt_gfps_provider_advertisement_start(). The adv is also started in the API.

To stop advertising, you can use the API wiced_bt_gfps_provider_disable.

They are all defined in the file gfps_provider.c.

View solution in original post

0 Likes
1 Reply
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

The advertising data for google fast pair service is defined by google: Google Fast Pair Service  |  Google Developers

The adv packet is set in the API wiced_bt_gfps_provider_advertisement_start(). The adv is also started in the API.

To stop advertising, you can use the API wiced_bt_gfps_provider_disable.

They are all defined in the file gfps_provider.c.

0 Likes