nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches

◆ lte_lc_psm_param_set_seconds()

int lte_lc_psm_param_set_seconds ( int  rptau,
int  rat 
)

#include <include/modem/lte_lc.h>

Set modem PSM parameters.

Requested periodic TAU (RPTAU) and requested active time (RAT) are used when PSM mode is subsequently enabled using lte_lc_psm_req(). These are the requested values and network determines the final values.

This is a convenience function to set PSM parameters in seconds while lte_lc_psm_param_set() requires the caller to encode the values. However, note that 3GPP specifications do not support all possible integer values but the encoding limits the potential values. The values are rounded up to the next possible value. There may be significant rounding up, especially when rptau is tens and hundreds of hours.

For more information about the encodings, see the description of the lte_lc_psm_param_set() function.

Parameters
[in]rptau

Requested periodic TAU in seconds as a non-negative integer. Range 0 - 35712000 s. Set to -1 to use modem's default value. The given value will be rounded up to the closest possible value that is calculated by multiplying the timer unit with the timer value:

  • Timer unit is one of: 2 s, 30 s, 60 s, 600 s (10 min), 3600 s (1 h), 36000 s (10 h), 1152000 s (320 h)
  • Timer value range is 0-31
Parameters
[in]rat

Requested active time in seconds as a non-negative integer. Range 0 - 11160s. Set to -1 to use modem's default value. The given value will be rounded up to the closest possible value that is calculated by multiplying the timer unit with the timer value:

  • Timer unit is one of: 2 s, 30 s, 360 s (6 min)
  • Timer value range is 0-31
Return values
0if successful.
-EINVALif an input parameter was invalid.