BLE - Manufacturer Specific Data

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

cross mob
chva_349096
Level 3
Level 3
5 sign-ins 10 replies posted 5 replies posted

Hello,

   

My company was recently assigned a Bluetooth Company ID.  How can I set that ID in the "Manufacturer Specific Data" in the advertisement packet if it does not show up in the pull down list in the component?

   

Also, is there a call to change the value of the manufacturer specific data?

   

Maybe there is a way to alter the entire advertisement packet (31 bytes)?

   

Thanks.

   

- Chris

0 Likes
1 Solution
Anonymous
Not applicable

Hi,

   

You can call the CyBle_GapUpdateAdvData API after the CYBLE_STACK_ON event to update the advertisement data.

   

Please refer the BLE Component Datasheet for more details on this API

   

Regards,

   

-Madhu Sudhan

View solution in original post

0 Likes
5 Replies
Anonymous
Not applicable

Hi,

   

You can call the CyBle_GapUpdateAdvData API after the CYBLE_STACK_ON event to update the advertisement data.

   

Please refer the BLE Component Datasheet for more details on this API

   

Regards,

   

-Madhu Sudhan

0 Likes
chva_349096
Level 3
Level 3
5 sign-ins 10 replies posted 5 replies posted

Thanks Madhu.  I will give that a try.

   

- Chris

0 Likes
Anonymous
Not applicable

@Madhu I am attempting to use CyBle_GapUpdateAdvData to update manufacturer data dynamically. First I have this simple test:

   
#define MANUFACTURER_SPECIFIC_DYNAMIC_DATA_INDEX (28u) /* index of the dynamic data in the ADV packet */ ​uint8 someValue = 0x7; (cyBle_discoveryModeInfo.advData->advData)[MANUFACTURER_SPECIFIC_DYNAMIC_DATA_INDEX] = someValue; CyBle_GapUpdateAdvData(cyBle_discoveryModeInfo.advData, cyBle_discoveryModeInfo.scanRspData);
   

 

   

However, I am not seeing the value change in the advertising packet. I did try the Dynamic Broadcaster example, which worked great. Our project is in the Peripheral role, but my understanding was that CyBle_GapUpdateAdvData would still work. No?

0 Likes
Anonymous
Not applicable

I was able to figure this out. The problem for me was the 
MANUFACTURER_SPECIFIC_DYNAMIC_DATA_INDEX I was using was beyond the bounds of the advertising packet! For me the bytes happened to be indexes 20-23. Once I fixed that, I was able to dynamically update the manufacturer data.

Anonymous
Not applicable

I try to do the same job but I find this error in BLE PSoC® Creator™ Component Datasheet manual page 114 Revised December 22, 2015:

   

<<CyBle_GapUpdateAdvData ....

   

This function allows setting the ADV data and SCAN response data while advertising is ongoing. Application

   

shall preserve Bluetooth Spec 4.1 mandated AD flags fields corresponding to the type of discovery mode the

   

device is in and only change the rest of the data. This API must be called when API CyBle_GetBleSsState()

   

returns CYBLE_BLESS_STATE_EVENT_CLOSE state. If API is called in any of the BLESS Low Power Modes,

   

it will force exit BLESS from Low Power Mode state to update ADV Data.

   

>>

   

In contrast the demo project  Dynamic_Broadcaster show in the function void DynamicADVPayloadUpdate(void) the condition:

   

if(CyBle_GetBleSsState() == CYBLE_BLESS_STATE_ACTIVE)

   

This create misunderstanding.

   

 

   

In my case I can't setup one time the Manufactored Specific Data and must keep the function call DynamicADVPayloadUpdate() into infinite while loop.

   

I'm trying to move at inizialization this procedure to do only one time.

0 Likes