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
  • Hello,

    what modem firmware version and SIM are you using?

  • Hello, is there any update on this issue please ?

  • Hi,

    it is sufficient to just open UDP socket and do AT#XSOCKETOPT for SO_RAI_LAST to reproduce the issue.

    I tested that with NCS 2.1.0, SO_RAI_LAST is 50 there based on https://github.com/nrfconnect/sdk-zephyr/blob/main/include/zephyr/net/socket_ncs.h#L58

    Regards,
    Michal

  • It's possible that your network does not support it. Can you do a modem trace so it can be checked?

  • Sure, attached.
    trace-2022-10-06T01-40-20.128Z.bin

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

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

Children
  • 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.

  • Are you (or modem team) able to use AT#XSOCKETOPT=1,50 in any working scenario without ERROR?

    How do you test AT#XSOCKETOPT=1,50 before SLM release?

    Did you (or modem team) tried to replicate issue?

    I will try to collect DBG, but there were another issue preventing that.

  • Michal Mühlpachr said:
    Did you (or modem team) tried to replicate issue?

    At the moment there seems to be a lack of SIM cards supporting the RAI functionality in the office, so I haven't been able to reproduce it. I will let you know if I can obtain one.

    Michal Mühlpachr said:
    I will try to collect DBG, but there were another issue preventing that.

    You can also run the code through a debugger if that's a better option for you.

  • With prj.conf

    CONFIG_LOG_DEFAULT_LEVEL=4

    I got: