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

LPN : periodic peaks

Hello,

I am working on LPN node code from the mesh SDK 3.2.0. When I run the example code, I see a current peak at every 2 sec interval. Please check the image attached. 

I tried changing the poll_interval_ms and other parameters as well but these periodic peaks are always there with 2 sec period. Can anyone please help me understand what these peaks are?? Can I change this interval??

Regards,

Sameer 

  • Hello? Where, and in what project (lpn or the friend node) did you try to change poll_interval_ms? And in what function is that poll_interval_ms used? And what did that function call return?

    The spikes in your graph look very much like radio spikes, so you are on the right track, but it doesn't look like the polling interval is actually changed.

    Best regards,

    Edvin

  • Hello Edvin, hello Sameer,

    I can confirm this behavior and add additional information as I have measured different polling intervals. Please see the measurement below with 30 second polling interval in an established friendship. During each sleep cycle a message for the LPN arrives at the friend node and gets queued up. The polling exchange happens after the 30 seconds of sleep are over and can also be seen in my sniffer. Here is the Power Profiler App Measurement:

    LPN_sleep_30_seconds

    However there still is the periodic two second spike in every of my measurements during sleep:

    spike_every_2s_during_sleep

    My first guess was it could be a heartbeat message, but that interval seems to be set way higher in health_server.c ( #define ATTENTION_TIMER_INTERVAL 1000000u ). It seems to be some sort of GATT proxy advertising for the nRF Mesh App, because I can see the LPN when I try to reconnect to the network in the App, even if it is asleep. Although I saw none of that advertising in the sniffer.

    I have a second issue with the LPN example, which is described here: https://devzone.nordicsemi.com/f/nordic-q-a/42473/mesh-lpn-rx-race-condition/165496#165496 .

    So in the test setup with two light switch servers and one LPN, the friendship is terminated with reason NRF_MESH_EVT_FRIENDSHIP_TERMINATED_REASON_NO_REPLY when 5 or more poll exchanges need to happen during polling. Increasing MESH_LPN_POLL_RETRY_COUNT has also not solved the issue, is there any news on this?

    Also I want to address another issue. I bought some nRF6707 Power Profiler Kits and was surprised to see that there is no logging function like discussed here devzone.nordicsemi.com/.../exporting-data-from-power-profiler-v2-0-0 since it is mentioned as 'Export measurement data for post-processing' in the Product Brief ( https://www.nordicsemi.com/-/media/Software-and-other-downloads/Product-Briefs/PowerProfilerKit-product-brief.pdf?la=en&hash=81DB9B626015BEB68F135F23A3F8CB9A3804F4BA ). I tried using version 1.1.0, but when I measuring for an hour the last log entry was at 470 seconds, so something seems to not work properly. Is there an update when logging will be implemented in the Power Profiler App?

    Best regards,

    Florian

  • Thanks Florian for the detailed analysis. 

    Hello Edvin,

    I am talking about the experimental LPN application. The poll_interval_ms is being set in mesh_lpn_friend_accept() function and it returns NRF_SUCCESS. I tried different values of poll_interval_ms from 1 sec to few minutes but this 2 sec peak is consistent and is always there. And I am also not sending anything from the LPN while conducting this experiment. 

    but it doesn't look like the polling interval is actually changed.

    I believe it is changing as I see the polling related logs as per the set value of poll_interval_ms only and not at every 2sec. 

    Regards,

    Sameer  

  • Hello Sameer,

    When the device is provisioned it will still advertise at a given interval with it's proxy service. The interval of these advertisements are set by:

    MESH_GATT_PROXY_NETWORK_ID_ADV_INT_MS in nrf_mesh_config_core.h. Try to change it to e.g. 3000, and you will see that there are 3 seconds between the spikes. 

    If you want to stop these advertisements, you can try to call proxy_stop(), and it should stop these advertisements. 

    If you do not want to stop the proxy advertisements, there are a few of them you should look into:

    When a device is unprovisioned:
    NRF_MESH_PROV_BEARER_GATT_UNPROV_BEACON_INTERVAL_MS controls the advertising intervals.

    For a provisioned node:

    (Node ID and Network ID advertisements are cycled one after the other. So both intervals should be changed)

    MESH_GATT_PROXY_NODE_IDENTITY_ADV_INT_MS
    MESH_GATT_PROXY_NETWORK_ID_ADV_INT_MS

  • Hello Edvin,

    Yes this works. It solved the issue. 

    Thanks,

    Sameer 

Related