Maximum value to be input to otLinkSetPollPeriod function as parameter

Hi,

Using windows 10 OS, and SES v5.40.

I am using nRF52833 device in my project along with nRF5_SDK_for_Thread_and Zigbee_v4.1.0_32ce5f8 SDK.

I am using openthread protocol and specifically otError otLinkSetPollPeriod( otInstance *aInstance, uint32_t aPollPeriod ) function to input the poll period.
Problem statement : the above said function is nothing but the communication poll period and i see from the documentation(https://openthread.io/reference/group/api-link-link) that it is a U32 variable which has max limit of 0x3FFFFFFF and min 10ms for its operation.
But if i run a test by inputting aPollPeriod to some higher value i can see that the value is somehow cutting down to 188s(approx. 3mins).
Ex : Test 1 : if i run with 60 sec(60000) as input i can see that the value of poll period is 60s(59999ms).
Ex : Test 2 : if i run with 200 sec(200000) as input i can see that the value of poll period is 188s(188676ms).
Ex : Test 2 : if i run with 350 sec(350000) as input i can see that the value of poll period is 188s(188676ms).

I am trying to test this with a inbuilt feature of our code that can measure the time and i have attached the debug information for further reference.

Questions:
1. what is the max value that can be input to this aPollPeriod (practically)?
2. Is 188s is the threshold for the pollperiod? 

Regards
Abhijith Desai

  • Hi,

    I can't see any limitations mentioned in the documentation, and I would expect longer periods to be supported (OpenThread specifically mentions longest poll period cap would be ~18.6 hours). Have you verified with a sniffer if the poll period is actually set to 188s, or if it is set to the requested value?

    How do you check the poll period? Note that the chip may wakeup more frequent, without actually sending packets on the radio, for instance to handle overflow event in RTC peripheral (which handles the wakeup events).

    Best regards,
    Jørgen

  • Hi,

    Thanks for your reply on this..

    Even i dont see any limitations listed in the documentation related to poll value.

    I tried to do the above tests with RF wakeup (printed as wakeup in eosm) and device wakeupp (Printed as wakeup in CSA) and along with that i ran sniffer where i could see that when ever i see the RF wakeup printed at the same time i see some packets getting exchanged(the one in white lines in sniffer window) 

    From that it is clear that, the poll period itsef is set to 188s even if it is set to 200 or any value above that.

    Is there anyway we could see what is the exact poll period that is set inside the OT stack with some sort of library return function.

    Best Regards

    Abhijith Desai

  • Hi.

    Additionally, i used a get function otLinkGetPollPeriod(instance) where it returns the set opll period value.. and i just printed that value before going to sleep every time.

     It seems that this return function:

    During joining returns some default value 236000 

    Once joining is completed and poll period is executed is see it returns the value we have set(it doesnt set to 188s here).

    This makes clear that OT function has nothing to do with the set poll period value it works perfectly.

    Issue maybe something else i guess.. please give some clues to check further..

    During joining

    Once joining is completed

    Best Regards

    Abhijith Desai

  • What is the value of your child timeout? 

    I tested the CLI example, and I'm not able to set the poll period above 236000 ms with the default child timeout (240s). If I increase the child timeout, I can set longer poll periods.

    This makes sense, as the child would time out before polling the parent on every wakeup.

  • Hi,

    Yes i am using 300s as child timeout value. but i tried to increase and still it seems poll period is clipped to 188s..

    and in all the examples with SDK is see the poll period and child timeout value is very less (1000ms or less)sniff for 188s.pcapng

    wake up in CSA is 4999ms
     Wake Up Application= 26994ms
    
    Thread version   : OPENTHREAD/20191113-00534-gc6a258e3; NRF52833; Apr  5 2020 21:43:42
    Network name     : OpenThread
    802.15.4 Channel : 11
    802.15.4 PAN ID  : 0xffff
    Radio mode       : rx-on-when-idle
     Start joining ...
    
    wake up in eosm is 40500ms
    wake up in eosm is 0ms
    wake up in eosm is 0ms
    wake up in eosm is 3ms
    wake up in eosm is 297ms
    wake up in eosm is 0ms
    wake up in eosm is 3ms
    wake up in eosm is 297ms
    wake up in eosm is 0ms
    wake up in eosm is 3ms
    wake up in eosm is 298ms
    wake up in eosm is 0ms
    wake up in eosm is 3ms
    wake up in eosm is 297ms
    wake up in eosm is 0ms
    wake up in eosm is 4ms
    wake up in eosm is 297ms
    wake up in eosm is 0ms
    wake up in eosm is 4ms
    wake up in eosm is 298ms
    wake up in eosm is 0ms
    wake up in eosm is 3ms
    wake up in eosm is 298ms
    wake up in eosm is 0ms
    wake up in eosm is 4ms
    wake up in eosm is 297ms
    wake up in eosm is 0ms
    wake up in eosm is 4ms
    wake up in eosm is 298ms
    wake up in eosm is 0ms
    wake up in eosm is 3ms
    wake up in eosm is 298ms
    wake up in eosm is 0ms
    wake up in eosm is 3ms
    wake up in eosm is 298ms
    wake up in eosm is 0ms
    wake up in eosm is 4ms
    wake up in eosm is 297ms
    wake up in eosm is 1ms
    wake up in eosm is 3ms
    wake up in eosm is 297ms
    wake up in eosm is 0ms
    wake up in eosm is 3ms
    wake up in eosm is 297ms
    wake up in eosm is 0ms
    wake up in eosm is 3ms
    wake up in eosm is 297ms
    wake up in eosm is 0ms
    wake up in eosm is 3ms
    wake up in eosm is 8588ms
    wake up in eosm is 1ms
    wake up in eosm is 5ms
    wake up in eosm is 0ms
    wake up in eosm is 7ms
    wake up in eosm is 0ms
    wake up in eosm is 6ms
    wake up in eosm is 0ms
    wake up in eosm is 6ms
    wake up in eosm is 0ms
    wake up in eosm is 4ms
    wake up in eosm is 113ms
    wake up in eosm is 0ms
    wake up in eosm is 0ms
    wake up in eosm is 7ms
    wake up in eosm is 0ms
    wake up in eosm is 8ms
    wake up in eosm is 0ms
    wake up in eosm is 11ms
    wake up in eosm is 0ms
    wake up in eosm is 7ms
    wake up in eosm is 0ms
    wake up in eosm is 7ms
    wake up in CSA is 54999ms
    wake up in eosm is 34093ms
    wake up in eosm is 0ms
    wake up in eosm is 0ms
    wake up in eosm is 5ms
    wake up in eosm is 0ms
    wake up in eosm is 6ms
    wake up in eosm is 0ms
    wake up in eosm is 6ms
    wake up in eosm is 0ms
    wake up in eosm is 7ms
    wake up in eosm is 0ms
    wake up in eosm is 6ms
    wake up in eosm is 0ms
    wake up in eosm is 6ms
    wake up in eosm is 0ms
    wake up in eosm is 7ms
    wake up in eosm is 0ms
    wake up in eosm is 7ms
    wake up in eosm is 0ms
    wake up in eosm is 6ms
    wake up in eosm is 143ms
    wake up in eosm is 1ms
    wake up in eosm is 0ms
    wake up in eosm is 0ms
    wake up in eosm is 9ms
    wake up in eosm is 10ms
    wake up in eosm is 0ms
    wake up in eosm is 0ms
    wake up in eosm is 4ms
    wake up in eosm is 52ms
    wake up in eosm is 0ms
    wake up in eosm is 0ms
    wake up in eosm is 4ms
    JoinerCallback error code: 0
    Thread interface has been enabled.
    wake up in eosm is 95ms
     IP Device State status 1
    
     OT_DEVICE_ROLE_DETACHED
    Thread version : OPENTHREAD/20191113-00534-gc6a258e3; NRF52833; Apr  5 2020 21:43:42
    Network name   : OpenThread
    Channel        : 11
    PAN ID         : 0xc5da
    ExtendedAddress: c6 b0 7a bf 21 83 0b e9 
    MasterKey      : ca fe ca fe ca fe ca fe ca fe ca fe ca fe ca fe 
    
    wake up in eosm is 585ms
    wake up in eosm is 1ms
    wake up in eosm is 0ms
    wake up in eosm is 4ms
    wake up in eosm is 87ms
    wake up in eosm is 653ms
    wake up in eosm is 0ms
    wake up in eosm is 0ms
    wake up in eosm is 5ms
    wake up in eosm is 19ms
     IP Device State status 2
    
     OT_DEVICE_ROLE_CHILD
    Thread version : OPENTHREAD/20191113-00534-gc6a258e3; NRF52833; Apr  5 2020 21:43:42
    Network name   : sva-test-client
    Channel        : 11
    PAN ID         : 0xc5da
    ExtendedAddress: c6 b0 7a bf 21 83 0b e9 
    MasterKey      : ca fe ca fe ca fe ca fe ca fe ca fe ca fe ca fe 
    
    wake up in eosm is 99ms
    wake up in eosm is 0ms
    wake up in eosm is 0ms
    wake up in eosm is 4ms
    
     meta_read:
     ctx_id = 6, meta_id = 2, value.val_type = 204, value.val.v_u = 536873024
    wake up in eosm is 119ms
    wake up in eosm is 0ms
    wake up in eosm is 0ms
    wake up in eosm is 4ms
    Set new PollPeriod and disable RX when IDLE ...
    
     error 0
    wake up in eosm is 8421ms
    wake up in eosm is 0ms
     Wake Up Application= 2241ms
    
    wake up in eosm is 6ms
    wake up in eosm is 0ms
    wake up in eosm is 10ms
     Wake Up Application= 59990ms
    
    wake up in eosm is 81ms
     Wake Up Application= 59989ms
    
    wake up in CSA is 40499ms
     Wake Up Application= 59990ms
    
    wake up in CSA is 59999ms
     Wake Up Application= 59990ms
    
    wake up in CSA is 59999ms
     Wake Up Application= 59990ms
    
    wake up in CSA is 59999ms
     Wake Up Application= 59990ms
    
    wake up in eosm is 188684ms
    wake up in eosm is 0ms
    wake up in eosm is 0ms
    wake up in eosm is 7ms
    wake up in eosm is 2ms
     Wake Up Application= 59989ms
    
    wake up in CSA is 59999ms
     Wake Up Application= 59990ms
    
    wake up in CSA is 59999ms
     Wake Up Application= 59990ms
    
    wake up in CSA is 59999ms
     Wake Up Application= 59990ms
    
    wake up in eosm is 188672ms
    wake up in eosm is 0ms
    wake up in eosm is 1ms
    wake up in eosm is 5ms
    wake up in eosm is 4ms
     Wake Up Application= 59990ms
    
    wake up in CSA is 59999ms
     Wake Up Application= 59990ms
    
      

Related