Can not use NRF_SO_RAI_LAST with SLM/nRF9160

SLM returns ERROR after AT#XSOCKETOPT=1,51 NRF_SO_RAI_LAST
https://github.com/nrfconnect/sdk-nrfxlib/blob/main/nrf_modem/include/nrf_socket.h#L218

SLM returns OK for AT#XSOCKETOPT=1,50 or AT#XSOCKETOPT=1,52. 

NCS 2.0.2
Serial LTE Modem 
nRF9160DK

prj.conf changes from default in NCS 2.0.2
    CONFIG_SLM_START_SLEEP=y
    CONFIG_SLM_WAKEUP_PIN=6
    CONFIG_SLM_INDICATE_PIN=2
    CONFIG_NRF_MODEM_LIB_TRACE_ENABLED=y
Full AT dialogue:
[PPK2] DUT Powered, Measurement started
0.17 <RESET> Wed Aug 24 22:02:59 2022
1.04 [PPK2] 100k/s AVG 4.31 mA Max 33.4 mA
2.04 [PPK2] 100k/s AVG 1.99 mA Max 32.0 mA
3.02 [PPK2] 100k/s AVG 0.002mA Max 0.009mA
4.03 [PPK2] 100k/s AVG 0.002mA Max 0.007mA
5.04 [PPK2] 100k/s AVG 0.002mA Max 0.009mA
5.10 <WAKEUP>
6.03 [PPK2] 100k/s AVG 1.36 mA Max 23.9 mA
6.47 [RX] Ready
6.47 [TX] AT
6.48 [RX] OK
6.48 [TX] AT%XMODEMTRACE=1,2
6.49 [RX] OK
6.49 [TX] AT%MDMEV=1
6.50 [RX] OK
6.50 [TX] AT%HWVERSION
6.52 [RX] %HWVERSION: nRF9160 SICA BQA
6.52 [RX] OK
6.52 [TX] AT%SHORTSWVER
6.54 [RX] %SHORTSWVER: nrf9160_1.3.1
6.54 [RX] OK
6.54 [TX] AT#XSLMVER
6.54 [RX] #XSLMVER: "2.0.2"
6.54 [RX] OK
6.54 [TX] AT%XPOFWARN=1,30
6.56 [RX] OK
6.56 [TX] AT%XSYSTEMMODE=0,1,0,0
6.58 [RX] OK
6.58 [TX] AT%REL14FEAT=1,1,1,1,0
6.60 [RX] OK
6.60 [TX] AT+CNEC=24
6.61 [RX] OK
6.61 [TX] AT+CMEE=1
6.62 [RX] OK
6.62 [TX] AT+CEPPI=1
6.63 [RX] OK
6.63 [TX] AT%RAI=1
6.64 [RX] OK
6.64 [TX] AT%XDATAPRFL=0
6.65 [RX] OK
6.65 [TX] AT%XNETTIME=1
6.66 [RX] OK
6.66 [TX] AT%XSIM=1
6.67 [RX] OK
6.67 [TX] AT+CEREG=5
6.68 [RX] OK
6.68 [TX] AT+CGEREP=1
6.69 [RX] OK
6.69 [TX] AT+CSCON=1
6.70 [RX] OK
6.70 [TX] AT%XTIME=1
6.71 [RX] OK
6.71 [TX] AT%XMODEMSLEEP=1,0,10240
6.72 [RX] OK
6.72 [TX] AT+CPSMS=1,,,"00111000","00000000"
6.72 [RX] %XMODEMSLEEP: 4
6.74 [RX] OK
6.74 [TX] AT#XSLEEP=2
6.75 [RX] OK
7.05 [PPK2] 100k/s AVG 4.04 mA Max 32.0 mA
8.03 [PPK2] 100k/s AVG 0.021mA Max 0.054mA
9.03 [PPK2] 100k/s AVG 0.022mA Max 0.028mA
10.02 [PPK2] 100k/s AVG 0.022mA Max 0.032mA
10.91 [PPK2] ====== SUM: INIT 0.003uA/h ======
11.69 <WAKEUP>
11.70 [RX] Ready
11.82 [TX] AT%XMODEMTRACE=1,2
11.84 [RX] OK
11.84 [TX] AT%XBANDLOCK=1,"0000000000000000000000000000000000000000000000000000000000001000000010000000100010011010"
11.87 [RX] OK
11.87 [TX] AT+COPS=1,2,"23003"
11.89 [RX] OK
11.89 [TX] AT+CGDCONT=1,"IP","hardwario.com"
11.90 [RX] OK
11.90 [TX] AT+CFUN=1
11.99 [RX] OK
11.99 [RX] %XMODEMSLEEP: 4,0
12.03 [PPK2] 100k/s AVG 3.11 mA Max 49.1 mA
12.89 [RX] %XSIM: 1
12.89 [TX] AT+CGSN
12.90 [RX] 352656106109476
12.90 [RX] OK
12.90 [TX] AT+CIMI
12.90 [RX] 901288000012723
12.90 [RX] OK
13.01 [PPK2] 100k/s AVG 33.4 mA Max 40.9 mA
14.01 [PPK2] 100k/s AVG 40.1 mA Max 888mA
14.48 [RX] +CEREG: 2,"AE38","000AC51F",9
15.03 [PPK2] 100k/s AVG 10.0 mA Max 57.9 mA
15.13 [RX] +CSCON: 1
16.01 [PPK2] 100k/s AVG 44.4 mA Max 349mA
17.01 [PPK2] 100k/s AVG 40.2 mA Max 280mA
17.25 [RX] +CGEV: ME PDN ACT 0,0
17.25 [RX] +CNEC_ESM: 50,0
17.25 [RX] %MDMEV: SEARCH STATUS 2
17.27 [RX] +CEREG: 5,"AE38","000AC51F",9,,,"00000000","00111000"
17.27 [TX] AT+COPS?
17.27 [RX] +COPS: 1,2,"23003",9
17.27 [RX] OK
17.27 [TX] AT%XCBAND
17.28 [RX] %XCBAND: 20
17.28 [RX] OK
17.28 [TX] AT+CEINFO?
17.30 [RX] +CEINFO: 0,1,C,8,1,-99,13
17.30 [RX] OK
17.30 [TX] AT+CGDCONT?
17.31 [RX] +CGDCONT: 0,"IP","hardwario.com","10.0.0.157",0,0
17.32 [RX] +CGDCONT: 1,"IP","hardwario.com","",0,0
17.32 [RX] OK
17.32 [TX] AT#XDATACTRL=40
17.32 [RX] OK
17.32 [TX] AT#XSOCKET=1,2,0
17.33 [RX] #XSOCKET: 0,2,17
17.33 [RX] OK
17.59 [RX] %XTIME: ,"22804202305180","01"
17.59 [TX] AT#XSOCKETOPT=1,51
17.59 [RX] ERROR
18.01 [PPK2] 100k/s AVG 37.6 mA Max 281mA
19.02 [PPK2] 100k/s AVG 36.9 mA Max 51.0 mA
Parents Reply Children
  • Sure, attached.
    trace-2022-10-06T01-40-20.128Z.bin

    [PPK2] DUT Powered, Measurement started
       0.15 <RESET> Thu Oct  6 03:40:23 2022
       1.02 [PPK2] 100k/s AVG   4.27 mA    Max  34.0  mA
       1.25 <INDICATE transition> -> High
       2.02 [PPK2] 100k/s AVG   2.75 mA    Max  30.5  mA
       3.02 [PPK2] 100k/s AVG   0.002mA    Max   0.008mA
       4.03 [PPK2] 100k/s AVG   0.002mA    Max   0.008mA
       5.02 [PPK2] 100k/s AVG   0.002mA    Max   0.008mA
       5.05 <WAKEUP>
       6.03 [PPK2] 100k/s AVG   1.33 mA    Max  24.3  mA
       6.42     [RX] Ready
       6.42 [TX] AT
       6.44     [RX] OK
       6.44 [TX] AT%XMODEMTRACE=1,2
       6.45     [RX] OK
       6.45 [TX] AT%MDMEV=1
       6.46     [RX] OK
       6.46 [TX] AT%HWVERSION
       6.47     [RX] %HWVERSION: nRF9160 SICA BQA
       6.47     [RX] OK
       6.47 [TX] AT%SHORTSWVER
       6.48     [RX] %SHORTSWVER: nrf9160_1.3.2
       6.48     [RX] OK
       6.48 [TX] AT#XSLMVER
       6.49     [RX] #XSLMVER: "2.1.0"
       6.49     [RX] OK
       6.49 [TX] AT%XPOFWARN=1,30
       6.51     [RX] OK
       6.51 [TX] AT%XSYSTEMMODE=0,1,0,0
       6.51     [RX] OK
       6.51 [TX] AT%REL14FEAT=1,1,1,1,0
       6.52     [RX] OK
       6.52 [TX] AT+CNEC=24
       6.54     [RX] OK
       6.54 [TX] AT+CMEE=1
       6.54     [RX] OK
       6.54 [TX] AT+CEPPI=1
       6.56     [RX] OK
       6.56 [TX] AT%RAI=1
       6.57     [RX] OK
       6.57 [TX] AT%XDATAPRFL=0
       6.57     [RX] OK
       6.59 [TX] AT%XNETTIME=1
       6.59     [RX] OK
       6.59 [TX] AT%XSIM=1
       6.61     [RX] OK
       6.61 [TX] AT+CEREG=5
       6.61     [RX] OK
       6.61 [TX] AT+CGEREP=1
       6.62     [RX] OK
       6.62 [TX] AT+CSCON=1
       6.64     [RX] OK
       6.64 [TX] AT%XTIME=1
       6.64     [RX] OK
       6.64 [TX] AT%XMODEMSLEEP=1,0,10240
       6.66     [RX] OK
       6.66 [TX] AT+CPSMS=1,,,"00111000","00000000"
       6.66     [RX] %XMODEMSLEEP: 4
       6.67     [RX] OK
       6.67 [TX] AT#XSLEEP=2
       6.67     [RX] OK
       7.02 [PPK2] 100k/s AVG   4.32 mA    Max  30.5  mA
       8.02 [PPK2] 100k/s AVG   0.025mA    Max   4.53 mA
       9.01 [PPK2] 100k/s AVG   0.021mA    Max   0.032mA
      10.01 [PPK2] 100k/s AVG   0.021mA    Max   0.032mA
      10.81 [PPK2] ====== SUM: INIT   0.004uA/h ======
      11.59 <WAKEUP>
      11.59     [RX] Ready
      11.69 [TX] AT%XMODEMTRACE=1,2
      11.71     [RX] OK
      11.71 [TX] AT%XBANDLOCK=1,"0000000000000000000000000000000000000000000000000000000000001000000010000000100010011010"
      11.74     [RX] OK
      11.74 [TX] AT+COPS=1,2,"23003"
      11.76     [RX] OK
      11.76 [TX] AT+CGDCONT=1,"IP","hardwario.com"
      11.76     [RX] OK
      11.76 [TX] AT+CFUN=1
      11.81     [RX] OK
      11.81     [RX] %XMODEMSLEEP: 4,0
      12.01 [PPK2] 100k/s AVG   5.65 mA    Max  51.2  mA
      12.73     [RX] %XSIM: 1
      12.73 [TX] AT+CGSN
      12.73     [RX] 352656106109476
      12.73     [RX] OK
      12.73 [TX] AT+CIMI
      12.74     [RX] 901288000012723
      12.74     [RX] OK
      13.01 [PPK2] 100k/s AVG  33.3  mA    Max  42.3  mA
      14.01 [PPK2] 100k/s AVG  31.2  mA    Max 383mA
      14.65     [RX] +CEREG: 2,"AE38","000AC51F",9
      14.99     [RX] +CSCON: 1
      15.01 [PPK2] 100k/s AVG  26.7  mA    Max 1021mA
      16.02 [PPK2] 100k/s AVG  37.2  mA    Max 256mA
      16.31     [RX] +CGEV: ME PDN ACT 0,0
      16.31     [RX] +CNEC_ESM: 50,0
      16.31     [RX] %MDMEV: SEARCH STATUS 2
      16.31     [RX] +CEREG: 5,"AE38","000AC51F",9,,,"00000000","00111000"
      16.33 [TX] AT+COPS?
      16.33     [RX] +COPS: 1,2,"23003",9
      16.33     [RX] OK
      16.33 [TX] AT%XCBAND
      16.33     [RX] %XCBAND: 20
      16.33     [RX] OK
      16.33 [TX] AT+CEINFO?
      16.35     [RX] +CEINFO: 0,1,C,8,1,-90,15
      16.35     [RX] OK
      16.35 [TX] AT+CGDCONT?
      16.36     [RX] %XTIME: ,"22016010048380","01"
      16.36     [RX] +CGDCONT: 0,"IP","hardwario.com","10.0.0.157",0,0
      16.36     [RX] +CGDCONT: 1,"IP","hardwario.com","",0,0
      16.36     [RX] OK
      16.36 [TX] AT#XDATACTRL=40
      16.36     [RX] OK
      16.36 [TX] AT#XSOCKET=1,2,0
      16.38     [RX] #XSOCKET: 0,2,17
      16.38     [RX] OK
      16.38 [TX] AT#XSOCKETOPT=1,50
      16.38     [RX] ERROR
      17.02 [PPK2] 100k/s AVG  36.5  mA    Max 218mA
      18.02 [PPK2] 100k/s AVG  36.8  mA    Max  50.6  mA
      19.02 [PPK2] 100k/s AVG  36.8  mA    Max  50.7  mA
      20.02 [PPK2] 100k/s AVG  36.0  mA    Max  50.7  mA

  • The modem team wants to know which function call is returning the error. Are you able to identify this?

  • Hi,

    it is clear from AT dialogue, as you can see it in ticket already:
    16.38 [TX] AT#XSOCKETOPT=1,50
    16.38 [RX] ERROR

    Why do you struggle to see that?

    SO_RAI_LAST and SO_RAI_ONE_RESP works fine.

  • That's fine. Are you gonna answer my question or not? I asked what function is returning the error, not what at cmd returns the error. Again, the modem team wants to know this.

  • You will need to to turn on logging in the application and put the log level to DBG.

Related