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

  • Hi Tero,

     

    I'm glad to hear that, and I'm always happy to help!

    Let us know if anything else is unclear or if any issues occur.

     

    Kind regards,

    Håkon

  • Hello Håkon,

    We tested PSM today and this is what I found. In every case below I did this: power on device, connect to LTE network, go to PSM. And after those I did k_sleep(K_SECONDS(30)) and then the following cases below and at the same time we looked at the control panel on the local operator DNA (there is a column for In session: Yes/No). So, here are the cases and results.

    1. Power off from power supply - the device was in session
    2. Power off via PWR_OFF pin without shutting down the modem - the device was in session
    3. Send modem to offline mode - the device was NOT in session
    4. Power off the modem - the device was NOT in session
    You are not in PSM if you turn off the modem (CFUN != 1). The modem must be active, and you have to have a connection in order to be in PSM.

    From DNA, they said that the device should be registered to the network even though the modem has been powered off. So, which one is really the correct case?

    Could there be some bug on your modem FW or LTE Link Control which doesn't allow the device stay in PSM while the modem is offline or powered off?

    Regards,
    Tero

  • Hi Tero,

     

    Seen from the modem, sending it to offline is the same as performing a reset. You start from scratch.

    It will do a discovery and a ATTACH to the network when you enable it again.

    Since the network provider can only track the nRF after it has awoken from PSM (either by timeout or you triggering a send()), it makes sense that it was still present in their network, even though you have powered off the modem. I am not sure what you are testing.

    Use AT+CEREG=5, then query AT+CEREG? to see if you have successfully gone into PSM (or use the lte_lc helper function to verify)

     

    PS: 30 seconds is too low to guarantee that you have entered PSM. You risk not entering PSM mode properly, as networks will force the nRF into DRX before performing a RRC release, and entering PSM. This interval depends on what network you are connected to. In my area, its 30 seconds, but might be another value with your local network provider.

     

    Kind regards,

    Håkon

  • From DNA, they said that the device should be registered to the network even though the modem has been powered off.

    So what they are saying from DNA is not correct?

  • anicare-tero said:
    So what they are saying from DNA is not correct?

    Please read my former explanation. 

Related