i would wan't to implement support for 1MBPS (mobile phones without extended) and CODED (long range which uses extended) at the same time.
One idea is to use radio notification for changing between 1MBPS and CODED mode, another to use external timer and then switch?
From what i have found you have to stop adv, change the adv_params, configure with it and then start adv again.
With this approach my adv time gets lost (out of sync) because when i start adv i get the radio notification instantly.
What do you suggest?
I use nrf52840 and sdk15.2.
What is getting out of sync? The time between the advertising packets when you switch PHY ?
You are trying to maintain the time between the advertisement packets when switching PHY? (i.e. so that the adverisment interval is always e.g. 100 ms)
Yes. What i would really want is to be able to call sd_ble_gap_adv_set_configure while advertising with different ble_gap_adv_params_t which is not possible at this moment. The documentation says:
Advertising parameters. When this function is used to update advertising data while advertising, this parameter must be NULL. See @ref ble_gap_adv_params_t.
which means that i have to stop the adv make the changes and start again the adv.