cancel
Showing results for 
Search instead for 
Did you mean: 

Smart Bluetooth

Anonymous
Not applicable

We want our central to advertise its ID all the time.

But it only sends the ad set at boot-time specified by .local_name in the BLE_PROFILE_CFG array.

When we change the ad, it still keeps sending the boot-time data.

We copied the method to set the ad from our peripheral, which updates its ad ok.

Here's how we set the ad:

char ad_name_frame[LOCAL_NAME_LEN_MAX + 1];

adv[0].len = 1 + 1;

adv[0].val = ADV_FLAGS;

adv[0].data[0] = LE_GENERAL_DISCOVERABLE  /* LE_LIMITED_DISCOVERABLE */ | BR_EDR_NOT_SUPPORTED;

sprintf(ad_name_frame, "zz %d %3d %2d %4d"

adv[1].len = strlen(ad_name_frame) + 1;

adv[1].val = ADV_LOCAL_NAME_COMP;

strcpy(adv[1].data, ad_name_frame);

bleprofile_GenerateADVData(adv, BLE_ADV_FIELD_ELEMENTS);

0 Likes
1 Solution
MichaelF_56
Moderator
Moderator

Is this resolved?  I spoke with the developers and they said that there are examples within the SDK which show how to format advertisements.

View solution in original post

0 Likes
1 Reply
MichaelF_56
Moderator
Moderator

Is this resolved?  I spoke with the developers and they said that there are examples within the SDK which show how to format advertisements.

View solution in original post

0 Likes