Activate PSM with EMnify SIM on nRF9160

Commenti

16 commenti

  • Avatar
    Ertan Metin

    Hi Androbi,

    I have the same modem (Nordic nRF9160) on an EVB. Tomorrow I can test the PSM mode to see if I have the same issue in Germany as you have in Spain. I will let you know about my results. In the meantime, what reply do you get for

    AT+CPSMS?

    and what is the command (with parameters) that you use for activating PSM?

    and do you also use eDRX at the same time?

    AT+CEDRXS?

     

    0
    Azioni per commenti Permalink
  • Avatar
    Androbi

    Hi Ertan, great!

    I use the same method (LTE link controller) as in the udp example:

    https://github.com/nrfconnect/sdk-nrf/blob/main/samples/nrf9160/udp/src/main.c#L92

    I first call `lte_lc_psm_req(true)` which uses the settings in prj.conf:

    ## PSM
    CONFIG_UDP_PSM_ENABLE=y
    CONFIG_LTE_PSM_REQ_RPTAU="00100001"
    CONFIG_LTE_PSM_REQ_RAT="00000000"

     

    and then I check the tau value in the `lte_handler`:

    case LTE_LC_EVT_PSM_UPDATE:
    printk("PSM parameter update: TAU: %d, Active time: %d\n",
    evt->psm_cfg.tau, evt->psm_cfg.active_time);
    break;

    I always get -1 with the EMnify SIM, whereas with the "home" SIM I get TAU=3600.

    Kind regards, Claus

    0
    Azioni per commenti Permalink
  • Avatar
    Ertan Metin

    Hi Claus,

    OK thank you. I will get my hands on my modem tomorrow and try.

    So, I understand you do not have direct access to AT commands, right?

    0
    Azioni per commenti Permalink
  • Avatar
    Androbi

    I do have if necessary, but using the LTE link controller is usually the safer choice. You can query PSM using AT+CEREG=5 and AT+CEREG? though.

    0
    Azioni per commenti Permalink
  • Avatar
    Ertan Metin

    Hi Claus,

    Unfortunately I can't get the Nordic nRF9160 EVB to test with today. I am hoping I will get it tomorrow to run my tests. FYI.

    Regards,
    Ertan

    0
    Azioni per commenti Permalink
  • Avatar
    Ertan Metin

    Hi Claus,

    Please find the results from my tests with an EMnify SIM card inside nRF9160 development kit, connected to Telekom in Germany via LTE-M.

    //TURN OFF PSM
    AT+CPSMS=0
    > OK

    AT+CPSMS?
    > +CPSMS: 0

    AT+CEREG?
    > +CEREG: 5,5,"05D7","02279D06",7,,,"11100000","11100000"
    //Active Time value (T3324) allocated to the device in E-UTRAN "11100000": Value indicates that the timer is deactivated
    //Extended periodic TAU value (T3412) allocated to the device in EUTRAN "11100000": Value indicates that the timer is deactivated

    AT%XMONITOR
    > %XMONITOR: 5,"","","26201","05D7",7,20,"02279D06",272,6400,41,25,"","11100000","11100000","01001001"
    //Active Time value (T3324) allocated to the device in E-UTRAN "11100000": Value indicates that the timer is deactivated
    //Extended periodic TAU value (T3412) allocated to the device in EUTRAN "11100000": Value indicates that the timer is deactivated
    //Extended periodic TAU value (T3412_EXT extended value) allocated to the device in E-UTRAN "01001001": Value is incremented in multiples of 10 hours


    //TURN ON PSM
    AT+CPSMS=1
    > OK

    AT+CPSMS=?
    > +CPSMS: 1,,,"00000110","00100001"  
    //Requested_Periodic-TAU: Value is incremented in multiples of 10 minutes
    //Requested_Active-Time: Value is incremented in multiples of 1 minute

    AT+CEREG?
    > +CEREG: 5,5,"05D7","0197BB00",7,,,"00011110","11100000"
    //Active Time value (T3324) allocated to the device in E-UTRAN "00011110": Value is incremented in multiples of 2 seconds
    //Extended periodic TAU value (T3412) allocated to the device in EUTRAN "11100000": Value indicates that the timer is deactivated

    AT%XMONITOR
    > %XMONITOR: 5,"","","26201","05D7",7,3,"0197BB00",151,1300,38,24,"","00011110","11100000","01001010"
    //Active Time value (T3324) allocated to the device in E-UTRAN "00011110": Value is incremented in multiples of 2 seconds
    //Extended periodic TAU value (T3412) allocated to the device in EUTRAN "11100000": Value indicates that the timer is deactivated
    //Extended periodic TAU value (T3412_EXT extended value) allocated to the device in E-UTRAN "01001010": Value is incremented in multiples of 10 hours


    Communication with the network for PSM setting works well with the device. Could you find a way to check these with your script so that we can compare?

     

     

    0
    Azioni per commenti Permalink
  • Avatar
    Androbi

    Great, thanx a lot! I will try to check what I get here this weekend with a suitable firmware.

    0
    Azioni per commenti Permalink
  • Avatar
    Androbi

    Hi Ertan,

    I have checked at a different location and here I get a connection with Orange (roaming). In this case I seem to get PSM

    AT+CPSMS=1
    OK
    +CEREG: 5,"8A0F","09A56DA2",9,,,"00011110","11100000"
    AT%XMONITOR
    %XMONITOR: 5,"","","21403","8A0F",9,20,"09A56DA1",,,,,"","00011110","11100000","01000111"
    OK

    I think your interpretation of the last value in XMONITOR is not correct though, it should be 

    "00011110","11100000","01000111" -> active, tau-ext, tau 

    and both "active" and "tau" are given in bits 8-6 by

    0 0 0 – Value is incremented in multiples of 2 seconds
    0 0 1 – Value is incremented in multiples of 1 minute
    0 1 0 – Value is incremented in multiples of 6 minutes
    1 1 1 – Value indicates that the timer is deactivated

    So in this example I get an "active" of 2*30 secs = 1 minute and a "tau" of 6*7 = 42 minutes.

    I have found out that for this network (Orange) the problem lies more in the assignation of the active time. I always get a correct tau value, but active time is sometimes "111". This results in the device being always in "active mode" after the send, which is a low power mode, but due to intermittent connections we are still not in real low power mode.

    EDIT: After a few more tests I think the invalid active times I got came all from Telefonica connections. So with Orange everything is fine.

    I attach a screenshot of the power profiler for an example of an active time of 16s (udp example). The current after the "active" time is around 9 uA, this is the important value to reach, as during "active" we still have 600uA of mean current. When active time is returned as "111" I get these spikes til the next send and never reach the 9uA.

    I have not yet managed to connect to a Telefonica network here where I had the problems last time. I'll check and report.

    0
    Azioni per commenti Permalink
  • Avatar
    Androbi

    I can confirm now that roaming with Telefonica I always get 11100000 for active time (I have tried quite a few different settings), i.e. the device will be active (in the sense of the gray zone in the graph) until the next send which is not what we want for low power :(

    As pointed out in this recent post active time = 11100000 means that PSM is not granted by the network provider. The Telefonica SIM (not roaming) does grant PSM.

    0
    Azioni per commenti Permalink
  • Avatar
    Ertan Metin

    This is great input! Thank you.

    Yes, you are right about the order of tau-ext and tau in XMONITOR response! I was deceived by the difference in order between different versions of nRF9160 as the the way it was presented in nRF91 AT Commands manual from Nordic Semiconductor under section "8.12 Read modem parameters %XMONITOR" / "Response syntax:".

    One thing that caught my eye in your %XMONITOR response is that it uses
    <AcT>: 9 – E-UTRAN NB-S1
    <band>: 20

    whereas my %XMONITOR response has
    <AcT>: 7 – E-UTRAN
    <band>: 3

    Is your modem on NB-IoT mode?
    If that's the case, we do not have any roaming for NB-IoT in Spain yet. You can check the current status of NB-IoT on the below page which we keep updated:
    https://www.emnify.com/nb-iot-coverage

    (Similar page for LTE-M is: https://www.emnify.com/lte-m-coverage)

    Now, that may explain Telefonica case but I am surprised with Orange case. The results from Orange are with EMnify SIM, right?

    By the way, is your purpose to use PSM with LTE-M or with NB-IoT?

    Regards,

    0
    Azioni per commenti Permalink
  • Avatar
    Androbi

    I would like to have both working with PSM, so I can fallback to LTE-M when NB-IoT is not available. In this test I configured the modem for NB-IoT, but the same happens with LTE-M. Yes the tests above are all with the EMnify SIM, I do have a Telefonica SIM however and with the Telefonica SIM the PSM works (this is why I posted my question). Looks like Telefonica does not accept roaming for PSM?

    I think Orange has NB-IoT coverage here in Spain.

    0
    Azioni per commenti Permalink
  • Avatar
    Ertan Metin

    Our support group has just run a remote test for PSM on LTE-M with Telefonica Spain. The test was successful. The next step for us would be to contact Telefonica Spain about this issue.

    Could you please run a PSM test with LTE-M, and then send me the logs including

    AT+CPSMS=1
    AT+CEREG?
    AT%XMONITOR

    with timestamps?

    These logs will include date&time and cell-id which will be useful for investigations at Telefonica side.
    Please set the module to LTE-M mode. We do not have NB-IoT support in Spain currently.

    You are using your EMnify SIM card whose ICCID ends with "...8906", right?

    Thanks,

    0
    Azioni per commenti Permalink
  • Avatar
    Androbi

    OK, I'll do ASAP! Could you provide a private contact/mail? You can get my mail from my account I'd guess.
    You are right with the SIM, I only activated one of the three SIMs I got. 

    0
    Azioni per commenti Permalink
  • Avatar
    Androbi

    Here you go. As the device does not have its own time I query network time (which is UTC). Subsequent AT command are with a 1 second delay between commands.

    *** Booting Zephyr OS build v2.7.99-ncs1-1  ***
    UDP sample has started
    AT+CEREG=5
    response: OK

    AT+CFUN=1
    response: OK

    waiting for connection
    status: +CEREG: 2,"A0BE","0643600A",7

    status: +CSCON: 1

    status: +CEREG: 5,"A0BE","0643600A",7,,,"11100000","11100000"

    AT+CCLK?
    response: +CCLK: "22/06/07,18:02:29+08"
    OK

    AT+CPSMS=1
    response: OK

    AT+CPSMS?
    response: +CPSMS: 1,,,"10101010","00100001"
    OK

    AT%%XMONITOR
    response: %XMONITOR: 5,"","","21407","A0BE",7,3,"0643600A",495,1301,36,40,"","11100000","11100000","01001011"
    OK

    Transmitting UDP/IP payload of 38 bytes to the IP address 8.8.8.8, port number 2469
    status: +CSCON: 0

    As a comparision, here is a session with Orange (same application code, the modem just picks up another carrier). The important difference is in the "active time" assigned.

    *** Booting Zephyr OS build v2.7.99-ncs1-1  ***
    UDP sample has started
    AT+CEREG=5
    response: OK

    AT+CFUN=1
    response: OK

    waiting for connection
    status: +CEREG: 2,"A810","01881C14",7

    status: +CSCON: 1

    status: +CEREG: 5,"A810","01881C14",7,,,"00011110","11100000"

    AT+CCLK?
    response: +CCLK: "22/06/07,18:09:42+08"
    OK

    AT+CPSMS=1
    response: OK

    AT+CPSMS?
    response: +CPSMS: 1,,,"10101010","00100001"
    OK

    AT%%XMONITOR
    response: %XMONITOR: 5,"Orange","Orange","21403","A810",7,20,"01881C14",39,6200,29,29,"","00011110","11100000","00111001"
    OK

    Transmitting UDP/IP payload of 38 bytes to the IP address 8.8.8.8, port number 2469

    0
    Azioni per commenti Permalink
  • Avatar
    Ertan Metin

    Hi there,

    Thank you for the logs. It clearly shows the device does not get PSM support from Telefonica (Movistar).

    I have contacted our Support and Network Access (Roaming) teams about this internally for the next step of contacting Telefonica for the issue. However, the response I received was: "LTE-M in Telefonica is not commercially launched yet, so we can not raise a ticket towards them at this point in time."

    When we check our LTE-M coverage page,
    https://www.emnify.com/lte-m-coverage

    we see that PSM status is marked as "validated" for both Movistar (Telefonica) and Orange.
    The definition of "Validated" is given at the bottom of the page as "LTE-M availability is frequently tested and confirmed by EMnify for this network."

    So, it is not at guaranteed status yet which would mean that it is guaranteed with EMnify's dedicated roaming agreements.

    Therefore, we can say that it works on best effort basis currently. As I said, our remote test was successful yesterday for PSM on LTE-M with Movistar (Telefonica). Our probe for this test is located in Madrid. So, perhaps Telefonica may have different deployment levels between Madrid and your location.

    We continually make progress in extending our roaming agreements, especially with relatively new deployment areas such as LPWAN networks. We update our LTE-M coverage page as soon as there is a change. So, it is better to check this page again in the future for a "guaranteed" service.

    Regards,
    Ertan

    0
    Azioni per commenti Permalink
  • Avatar
    Androbi

    If LTE-M for Telefonica is not commercially launched and thus no issues can be raised, I think it would be better to remove them from the compatibility list or indicate this status. I would not have gone through the details If I knew this beforehand. "Validated" and "Not comercially available" are two different things. Thanks for your efforts anyhow!

    0
    Azioni per commenti Permalink

Accedi per aggiungere un commento.