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

LPN polling period

Hello,

I am working with LPN example of SDK 3.1.0. In the example I need to change the poll interval time based on our application requirement. 

I looked at this equation used in lpn.c file.

m_lpn.poll_interval_ms = m_lpn.poll_timeout_ms -
(m_lpn.receive_delay_ms + m_lpn.receive_window_ms) * (MESH_LPN_POLL_RETRY_COUNT + 1);

In my application poll_timeout_ms is = 10000

receive_delay_ms = 100

receive_window_ms = 255 (I believe this parameter is set by the friend node)

MESH_LPN_POLL_RETRY_COUNT = 5

Hence, the poll_interval_ms comes to 7870 ms. But when I cross verify this with the current drawn by the chipset, I see a peak after every 2 sec. I believe it is a friend polling peak only. Please check attached the figure and correct me if I am wrong. 

Is there any other way to change the poll interval??

 

Parents
  • Hi.

    You can use the mesh_lpn_poll_interval_set() function to set the poll interval. 
    The poll interval is the interval between two separate Friend Poll actions. This is the interval between each time the node wakes up to empty the Friend Queue. The interval must be set in a way that the LPN is able to complete as many retry attempts as possible before the poll timeout expires. This means that it must satisfy the following equation:

    poll_interval_ms < (mesh_lpn_friend_request_t.poll_timeout_ms -
                        (mesh_lpn_friend_request_t.receive_delay_ms +
                         nrf_mesh_evt_lpn_friend_offer_t.offer.receive_window_ms) * (MESH_LPN_POLL_RETRY_COUNT + 1))

    Note that a low poll_timeout_ms and long receive_delay_ms and receive_window_ms can make it impossible to reach the MESH_LPN_POLL_RETRY_COUNT.

    Best regards, 
    Joakim
Reply
  • Hi.

    You can use the mesh_lpn_poll_interval_set() function to set the poll interval. 
    The poll interval is the interval between two separate Friend Poll actions. This is the interval between each time the node wakes up to empty the Friend Queue. The interval must be set in a way that the LPN is able to complete as many retry attempts as possible before the poll timeout expires. This means that it must satisfy the following equation:

    poll_interval_ms < (mesh_lpn_friend_request_t.poll_timeout_ms -
                        (mesh_lpn_friend_request_t.receive_delay_ms +
                         nrf_mesh_evt_lpn_friend_offer_t.offer.receive_window_ms) * (MESH_LPN_POLL_RETRY_COUNT + 1))

    Note that a low poll_timeout_ms and long receive_delay_ms and receive_window_ms can make it impossible to reach the MESH_LPN_POLL_RETRY_COUNT.

    Best regards, 
    Joakim
Children
No Data
Related