cancel
Showing results for 
Search instead for 
Did you mean: 

BlueNRG-LP, Multiple Adverts

DLoza.2
Associate III

Hi, 

I'm trying to make a program where multiple adverts are transmitted (when an adv interval of a message is finished, the follow is sent). I have 7 messages, and I have the 7 handles, but when I try to check in my phone what is sent, I see that ony the last message is transmitted. What I'm doing wrong?

This is how I set the adverts: 

for (int i = 0; i < NUM_OF_MESSAGES ; i++)

{

Advertising_Set_Parameters[i].Advertising_Handle = i;

Advertising_Set_Parameters[i].Duration = 0;

Advertising_Set_Parameters[i].Max_Extended_Advertising_Events = 0;

status = aci_gap_set_advertising_configuration

(

i,

GAP_MODE_BROADCAST,

ADV_PROP_LEGACY,

3000*0.635,

3000*0.635,

ADV_CH_ALL,

0,

NULL,

ADV_NO_WHITE_LIST_USE,

0,

LE_1M_PHY,

0,

LE_1M_PHY,

0,

0

);

status = aci_gap_set_advertising_data(i, ADV_COMPLETE_DATA, sizeof(adv_data[i]), adv_data[i]);

status = aci_gap_set_advertising_enable(ENABLE, NUM_OF_MESSAGES, Advertising_Set_Parameters);

All status returns are SUCCESS.

Thanks,

0 REPLIES 0