Hi,
We are using DA14580 in peripheral mode.
We need to implement an use case, wherein an accessory first advertises with 20 msec interval for 10 sec and then restarts (stops and starts) advertisement with interval 1.25 sec.
With the current implementation of ble_app_peripheral, I see that the interval is to be given in user_config.h through intv_min and intv_max parameters as a part of static const struct and advertisement is started using user_app_adv_start. Does that mean that I cannot change these values (intv_min and intv_max) at any other time?
If no, what is the right way in which the above usecase can be implemented.
Thanks,
Hrishikesh
Device:
Hi,
In the first circle of advertising the interval is given by the standard values which you can change them in the value that you want. After that when the advertising stops and starts again, you simply can use the callback of the kind of advertising you want to use(undirected-non connectable etc.) and in this function give the values you want in the interval through the pointer that is returned by the app_easy_gap_undirected_advertise_get_active. In our case in user_app_adv_undirect_complete, the code is below:
void user_app_adv_undirect_complete(uint8_t status)
{
// If advertising was canceled then update advertising data and start advertising again
如果(= = GAP_ER地位R_CANCELED)
{
// Schedule the next advertising data update
struct gapm_start_advertise_cmd* cmd;
cmd = app_easy_gap_undirected_advertise_get_active();
cmd->intv_min = 2000 ;
cmd->intv_max = 2000;
app_easy_gap_undirected_advertise_start();
}
}
Thanks,
STS_Dialog.