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,

     

    anicare-tero said:
    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?

     You have to request PSM once in your application, via AT+CPSMS. There's helper functions that does this for you in lte_lc.

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

     No, it'll do a TAU and eventually renegotiate a new PSM. If you get 2 days, but start sending data after 1 hour, you do not have 1 day and 23 hours interval, but you renegotiate and (very likely) get the same 2 days back.

    anicare-tero said:
    Why does it not set the exact defined value? Does the operator set the interval?

     Its because the eNB is the master, and if they do not allow your requested interval, you'll get something else. If you ask for 120 minutes, you even might get it back as 2 hours instead (ie: a different bitmask, same timing). It all depends on what the eNB is configured to do.

    anicare-tero said:
    What happens if I power off the modem? Or send it to offline mode? Does it disable the PSM or?

    If you mean if it stores it locally or not, that is a quick test you can try with at_client + lte link monitor, then issue AT+CPSMS = <whatever>, CFUN=0 or 4, then read it back again.

     

    Kind regards,

    Håkon

  • Hi Håkon,

    Thanks again, this helped me a lot!

    What happens if I power off the modem? Or send it to offline mode? Does it disable the PSM or?
    If you mean if it stores it locally or not, that is a quick test you can try with at_client + lte link monitor, then issue AT+CPSMS = <whatever>, CFUN=0 or 4, then read it back again.

    It seems that AT+CPSMS holds the values when modem is offline. But lte_lc_psm_get() gives -1 for both PTAU and Active Time so I guess it means that PSM is disabled. What do you think? Or is it even possible to track programmatically or with AT commands?

    AT+CPSMS?
    +CPSMS: 1,,,"01011111","00000000"
    OK

    [00][00:05:09.051,269] [1B][0m<inf> anicare_rudolf: Modem entered to offline mode.[1B][0m
    [00:05:09.065,582] [1B][0m<dbg> lte_lc.lte_lc_psm_get: TAU: -1 sec, active time: -1 sec
    [1B][0m

    We are setting the PTAU to "01011111" which is 310h (~12,91 days), because it seems that 320h multiplier is not working so that's the maximum value we can set. We want the maximum value because we are not actually receiving anything from our server or from anywhere else.

    Our plan is to send data to the server once a week. Before sending data we have to do these:

    1. Check if there is a network available (any suggestions how to do this?)
    2. Send the modem to offline
    3. Switch to GPS and start to get a fix
    4. Send the modem to offline
    5. Switch to LTE and send data

    Modem going to offline before switching between LTE and GPS is because we have that combined antenna so they can't work at the same time.

    What do you suggest what I should do of the list below? I mean after data has been sent so it would be a week in that mode. What should consume the least power?

    1. Send the modem to offline mode
    2. MCU on IDLE, modem off, RTC on
    3. Let the modem be on and in PSM
    4. Go to System OFF mode

    If the device is in System OFF mode, should the accelerometer (in our case LIS2DW12) work normally and wakeup the device if there comes a trigger interrupt?

    I guess there won't work any timers (like RTC) while in System OFF so it could not be woken up after a week, right? If there isn't any that kind of timers/counters, that option is not valid for us.

    - Tero

  • Hi,

     

    anicare-tero said:
    With the one week interval, do you recommend to stay in PSM or power the modem off or send the modem to offline mode? What are the current consumptions for these:

     It is up to you what you choose. Test and make a choice that is best for your application.

    If you have other sensors in your application that requires the CPU to be in idle mode (not system off mode), then PSM might be a natural choice if current consumption is a high priority.

     

    anicare-tero said:
    As I said earlier (in my quote at the beginning of this message) we are using the combined antenna for LTE and GPS. After all, is it still possible to use LTE and GPS together while in PSM even though we have a combined antenna? If it is possible, I guess we would do this before sending data:

    There shouldn't be restrictions based on the antenna used, given that it is tuned for the bands you're using. 

    GPS is time multiplexed with the LTE traffic, but can only be concurrent with LTE in modes which allows for longer idle periods on the network (eDRX and PSM), regardless on how your physical configuration is.

     

    anicare-tero said:
    Are you able to tell when will the next modem FW be released?

     I am sorry, but personnel in technical support will never comment on upcoming features or roadmap related items.

    We focus on supporting what is currently available, and do not have detailed information on upcoming features/releases.

    Please contact your local regional sales manager (RSM) for such details. If you do not have the contact details of your local RSM, please send me a direct message with your location and I'll share this info with you.

     

    Kind regards,

    Håkon

  • Hi Håkon,

    Thanks a lot for your help! It has been clarified a lot of things for me. I think that I'm fine with this case for now but I will ask later if I still have some problems.

    Best 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

Reply
  • 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

Children
Related