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

PSM on nRF9160 custom board

Hi,

I'm using latest master branch of nRF Connect SDK and pre-released modem FW 1.1.2 which is including ANT->AUX switching. I'm developing a firmware for a custom board that has nRF9160 SiP. I'm from Finland and currently using LTE-M SIM cards provided by DNA.

EDIT: The firmware is based on Asset Tracker application and here is some other stuff I have implemented:
https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/applications/asset_tracker/README.html
- the debug console is modified version of the Serial LTE Modem sample
https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/nrf9160/serial_lte_modem/README.html
- FOTA is from HTTP application update sample
https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/nrf9160/http_application_update/README.html
- NVS (non-volatile storage) is from Zephyr's NVS sample
https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/samples/subsys/nvs/README.html
- ADC is from Rallare's ADC sample
https://github.com/Rallare/fw-nrfconnect-nrf/tree/nrf9160_samples/samples/nrf9160/adc
- data sending to the server is from HTTPS Client sample with help of Rallare's HTTP and HTTPS simple samples
https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/nrf9160/https_client/README.html
https://github.com/Rallare/fw-nrfconnect-nrf/tree/nrf9160_samples/samples/nrf9160/http
https://github.com/Rallare/fw-nrfconnect-nrf/tree/nrf9160_samples/samples/nrf9160/https_simple

So, for now, I'm trying to get PSM (Power Saving Mode) to use but I'm actually not sure how it should really work. We have a combined antenna for LTE and GPS so we can't use them at the same time. It's been planned that our device would be 1 week in PSM but it could be sending data to our server if the device has not moved lately enough (triggered by accelerometer).

Currently I'm using lte_lc_psm_req(true) after lte_lc_connect() has been done successfully.

  1. First of all, do I even need the PSM because "is for receive "polling" only, you can send data at any time."? We are not receiving any other stuff than responses when data has been sent to the server. I think the only benefit would be that it would be already registered to network when the device is waking up and sending data again.
  2. Should I power off (or send to offline) the modem after entering PSM? Or should I let the modem be on, is the modem automatically "sleeping" when PSM is enabled?
  3. Do I have to request PSM every time I connect to LTE or just in LTE LC initialization or in first connection?
  4. Does the PSM timer start again if I send data to our server?
  5. If I set the CONFIG_LTE_PSM_REQ_RPTAU to "00010100" which is 200min/12000s (EDIT: seems to be that this values is the lowest possible) why does it set PTAU to 12000-15600? Does it depend on operator or is there some bug on your LTE LC driver? The get function (lte_lc_psm_get(&tau, &active_time);) gives this kind of log (and yes, I have set the active time to 0):
    [00:01:26.414,611] [1B][0m<dbg> lte_lc.lte_lc_psm_get: TAU: 14400 sec, active time: 0 sec
  6. How to get a certain information that the device is in PSM? Is there any other ways than just measuring the current or in software using lte_lc_psm_get()? How should the device be tested while in PSM?
  7. Should I need a some kind of timer to put the device sleeping while in PSM like Rallare has done in his udp_with_psm sample?
    https://github.com/Rallare/fw-nrfconnect-nrf/blob/nrf9160_samples/samples/nrf9160/udp_with_psm/src/main.c

I have gathered some information mainly from DevZone and collected them in one document. Please correct if there are some wrong information.
PSM.docx

This is a pretty complicated thing for me so I hope I will get some help from here. My post could be a little unclear but please ask me if you don't understand something. I would really appreciate any help!

Regards,
Tero

Parents
  • Hi Tero,

     

     

    First of all, do I even need the PSM because "is for receive "polling" only, you can send data at any time."? We are not receiving any other stuff than responses when data has been sent to the server. I think the only benefit would be that it would be already registered to network when the device is waking up and sending data again.

     PSM allows the modem to not go into RX mode for longer periods, so if you are concerned about power consumption, you want to use PSM (or eDRX).

    Should I power off (or send to offline) the modem after entering PSM? Or should I let the modem be on, is the modem automatically "sleeping" when PSM is enabled?

     No need to power off. You should request PSM, then the modem will start to negotiate with the eNB.

    Do I have to request PSM every time I connect to LTE or just in LTE LC initialization or in first connection?

     No, you do not need to do this, the modem will do this for you, as long as CPSMS holds valid PSM values.

    Does the PSM timer start again if I send data to our server?

     Yes. You will go out of PSM and start communicating with the network, and after a while (idle connection set by eNB, will differ from network-to-network), you'll enter PSM again.

    f I set the CONFIG_LTE_PSM_REQ_RPTAU to "00010100" which is 200min/12000s (EDIT: seems to be that this values is the lowest possible) why does it set PTAU to 12000-15600? Does it depend on operator or is there some bug on your LTE LC driver? The get function (lte_lc_psm_get(&tau, &active_time);) gives this kind of log (and yes, I have set the active time to 0):

    You can request a interval, but the network ultimately sets the interval. 60 minutes is the lowest I get in my area. You can still send data when-ever-you-want, the PSM value should be set to when your application expect to receive data.

    How to get a certain information that the device is in PSM? Is there any other ways than just measuring the current or in software using lte_lc_psm_get()? How should the device be tested while in PSM?

    AT+CEREG=5, then query AT+CEREG?, the last two bit patterns will return your current PSM. Unfortunately, you cannot get specific information on where you are in the current PSM "window".

    Should I need a some kind of timer to put the device sleeping while in PSM like Rallare has done in his udp_with_psm sample?
    https://github.com/Rallare/fw-nrfconnect-nrf/blob/nrf9160_samples/samples/nrf9160/udp_with_psm/src/main.c

    Very much depends on your application. If you send data periodically, send periodically. If you send data based on external asynchronous signals (like an accelerometer), then you can asynchronously. 

    I have gathered some information mainly from DevZone and collected them in one document. Please correct if there are some wrong information.
    PSM.docx

    Looks good, the only thing I can spot is the usage of GPS. GPS can be used in DRX/eDRX as well, as quoted from the modem fw v1.1.0 release notes:

    - GNSS interoperability and tracking during LTE idle mode DRx and idle mode eDRx.

     

    Kind regards,

    Håkon

Reply
  • Hi Tero,

     

     

    First of all, do I even need the PSM because "is for receive "polling" only, you can send data at any time."? We are not receiving any other stuff than responses when data has been sent to the server. I think the only benefit would be that it would be already registered to network when the device is waking up and sending data again.

     PSM allows the modem to not go into RX mode for longer periods, so if you are concerned about power consumption, you want to use PSM (or eDRX).

    Should I power off (or send to offline) the modem after entering PSM? Or should I let the modem be on, is the modem automatically "sleeping" when PSM is enabled?

     No need to power off. You should request PSM, then the modem will start to negotiate with the eNB.

    Do I have to request PSM every time I connect to LTE or just in LTE LC initialization or in first connection?

     No, you do not need to do this, the modem will do this for you, as long as CPSMS holds valid PSM values.

    Does the PSM timer start again if I send data to our server?

     Yes. You will go out of PSM and start communicating with the network, and after a while (idle connection set by eNB, will differ from network-to-network), you'll enter PSM again.

    f I set the CONFIG_LTE_PSM_REQ_RPTAU to "00010100" which is 200min/12000s (EDIT: seems to be that this values is the lowest possible) why does it set PTAU to 12000-15600? Does it depend on operator or is there some bug on your LTE LC driver? The get function (lte_lc_psm_get(&tau, &active_time);) gives this kind of log (and yes, I have set the active time to 0):

    You can request a interval, but the network ultimately sets the interval. 60 minutes is the lowest I get in my area. You can still send data when-ever-you-want, the PSM value should be set to when your application expect to receive data.

    How to get a certain information that the device is in PSM? Is there any other ways than just measuring the current or in software using lte_lc_psm_get()? How should the device be tested while in PSM?

    AT+CEREG=5, then query AT+CEREG?, the last two bit patterns will return your current PSM. Unfortunately, you cannot get specific information on where you are in the current PSM "window".

    Should I need a some kind of timer to put the device sleeping while in PSM like Rallare has done in his udp_with_psm sample?
    https://github.com/Rallare/fw-nrfconnect-nrf/blob/nrf9160_samples/samples/nrf9160/udp_with_psm/src/main.c

    Very much depends on your application. If you send data periodically, send periodically. If you send data based on external asynchronous signals (like an accelerometer), then you can asynchronously. 

    I have gathered some information mainly from DevZone and collected them in one document. Please correct if there are some wrong information.
    PSM.docx

    Looks good, the only thing I can spot is the usage of GPS. GPS can be used in DRX/eDRX as well, as quoted from the modem fw v1.1.0 release notes:

    - GNSS interoperability and tracking during LTE idle mode DRx and idle mode eDRx.

     

    Kind regards,

    Håkon

Children
  • Hi 

    Thanks a lot for your response!

    No, you do not need to do this, the modem will do this for you, as long as CPSMS holds valid PSM values.

    So, do I have to request PSM in first connection or in LTE LC initialization which does only the lte_lc_init() and not connect?

    Does the PSM timer start again if I send data to our server?
    Yes. You will go out of PSM and start communicating with the network, and after a while (idle connection set by eNB, will differ from network-to-network), you'll enter PSM again.

    Does the device resume the timer where it stayed before data sending or start again and be in PSM again the defined PTAU interval?

    If I set the CONFIG_LTE_PSM_REQ_RPTAU to "00010100" which is 200min/12000s (EDIT: seems to be that this values is the lowest possible) why does it set PTAU to 12000-15600?
    You can request a interval, but the network ultimately sets the interval.

    Why does it not set the exact defined value? Does the operator set the interval?

    EDIT:

    Should I power off (or send to offline) the modem after entering PSM? Or should I let the modem be on, is the modem automatically "sleeping" when PSM is enabled?
    No need to power off. You should request PSM, then the modem will start to negotiate with the eNB.

    What happens if I power off the modem? Or send it to offline mode? Does it disable the PSM or?

    Regards,
    Tero

Related