cancel
Showing results for 
Search instead for 
Did you mean: 

extended advertisement problem

Hardik02
Associate II

Hello team ST,

I am working on application, for this application i want to send 251 bytes of the data. currently i am using BLE extended advertising mode for my application with STM32  WBA52CG board. To send this data, I have used  BLE_P2P_Server_Ext example from the Git repo. Now, I am trying to modify the existing ADV_EXT_Config function to advertise more than 31 bytes of data, but I am unable to do so. Below, you can find the parameters for the Extended NO SCANNABLE-NO CONNECTABLE advertisement:

 

/* Extended NO SCANNABLE-NO CONNECTABLE */
data_cpt = 0;
memcpy(&a_p2p_extended_buff[0], &a_AdvData[0], sizeof(a_AdvData));
data_cpt += sizeof(a_AdvData);
i = 1;
adv_set_param[i].enable = 1;
adv_set_param[i].data = &a_p2p_extended_buff[0];
adv_set_param[i].data_len = data_cpt;
strcpy(adv_set_param[i].username, "ext_noscan_noconn");
adv_set_param[i].sid = i;
adv_set_param[i].interval_min = 200;
adv_set_param[i].interval_max = 300;
adv_set_param[i].tx_power = CFG_TX_POWER;
adv_set_param[i].adv_channels = ADV_CH_37 | ADV_CH_38 | ADV_CH_39;
adv_set_param[i].property = /*0x00*/ HCI_ADV_EVENT_PROP_LEGACY;
adv_set_param[i].address_type = GAP_STATIC_RANDOM_ADDR;
adv_set_param[i].peer_address_type = GAP_PUBLIC_ADDR;
adv_set_param[i].p_peer_address = &a_peeraddr[0];
adv_set_param[i].adv_set.Advertising_Handle = i;
adv_set_param[i].adv_set.Duration = 0;
adv_set_param[i].adv_set.Max_Extended_Advertising_Events = 0;

 

By default, the property in the following parameters is set to `0x00`:
adv_set_param[i].property = 0x00

With this property, I am not able to see any data on my ST BLE Toolbox application. When I changed it to `HCI_ADV_EVENT_PROP_LEGACY`, I was able to see data up to 31 bytes. However, once I try to exceed the limit of LEGACY data, it shows as empty.

Could you please help me with this?

Best regards,

2 REPLIES 2
Andrew Neil
Evangelist III
STTwo-32
ST Employee

Hello @Hardik02 

For the STM32WBA52, I suggest you try to convert the example From the STM32WBA55 to the STM32WBA52. It should work exactly as mentioned by the example. Don't Forget, the Connectivity functions are not supported On the versions that came after the 1.1.0 of the STM32CubeWBA (Just for the STM32WBA52, it works fine for other STM32WBA MCUs). So, you have to use the 1.1.0 version if you are looking to use BLE with an STM32WBA52.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.