This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

gazell out_of_sync and in_sync

hi ,all

I feel confused about" out_of_sync" and" in_sync" parameters .If a devece is in sync,how the channels was changed ?And what's the use of"nrf_gzll_set_device_channel_selection_policy())"? And how could I get the sync_lifetime in our softcode ?

  • Hi Anna

    In Gazell the host is continuously cycling through the channel table at a fixed rate, regardless of what the devices are doing.

    A device being out of sync simply means that the device don't know what channel the host is currently on, and it will then have to retransmit the packet on the same channel while waiting for the host to respond. As soon as the device gets an ACK from the host it know what channel the host is on, and it will then switch to in_sync mode. Once the device is in sync it can immediately send new packets on the correct channel of the host, reducing the number of retransmits needed.

    If you are in sync but don't send any data for a long time you might drop out of sync, because the timers in the device and host don't run at exactly the same speed.

    The nrf_gzll_set_device_channel_selection_policy() function is documented here.

    To get the sync_lifetime you can use the nrf_gzll_get_sync_lifetime(void) function.

    Best regards
    Torbjørn

  • Is there a way to ask the Gazell stack if the device is currently in sync with the host?

  • Not really, but whenever you successfully send a packet the device will assume that it is in sync until a number if timeslots has passed, equal to the sync lifetime.
    In other words the device should always be in sync after you get the TX success event.
    If you are sending packets at a fixed rate, faster than the sync lifetime, the device should always stay in sync (unless the packet loss gets too high).

  • thank you very much.I still have a question . If the device is in sync, how could i do to keep sync ? I mean the device and host still keep in same channel .

  • Hi ,Torbjørn In my project ,there are one host and four devices .In order to avoid interference ,the host has 16 channels and every device has 4 different channels .Is this a right way ? And can you give me some suggetions to configue the parameters such as " timeslot per channle ",in order to keep in sync.If i use the last successful channel to transmit a new packet but failed,what's the channel will be chosen for the retransmit ?

Related