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
Related