This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Live switch 1MBPS (no extended) and CODED

Hi guys,

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.

Thanks

Parents Reply
  • When you want to change the PHY, you set a flag to true, and when this flag is true, it will start a one-shot timer (with a timeout equal to the advertising interval) when you receive a radio notification.(remember to set the flag to false afterwards). For the same radio notification, you also stop the advertising and configure the new advertising parameters and data. Then some time later, the timer you stared will timeout, and then you start the advertising again in the timeout callback. I have not tested it myself, but I think it should work. 

    Let me know if I have misunderstood what you are trying to achieve

Children
Related