Send a SMS without PDN configured

Hi, 

I have a question about the SMS sample (https://docs.nordicsemi.com/bundle/ncs-2.6.1/page/nrf/samples/cellular/sms/README.html). I can use this sample to send and receive SMS, but when I configured the PDN with the different APN, the sample cannot send or receive SMS. Is it possible to send SMS without PDN configured? 

I think the function used in this sample to connect to LTE network (lte_lc_connect()), connects to LTE network with PDN already configured. If so, is it possible to send SMS without PDN configured?

Regards, 

GoncaloS

  • Hello, 

    I have tested the application with the correct and incorrect APN names for the same SIM card. I hide the phone number in the correct APN name logs. 

    *** Booting nRF Connect SDK 3758bcbfa5cd ***
    [00:00:00.403,869] <inf> SMS_sample: SMS sample starting
    [00:00:00.654,968] <inf> nrf_modem_lib_trace: Trace thread ready
    [00:00:00.656,768] <inf> nrf_modem_lib_trace: Trace level override: 2
    [00:00:00.661,956] <inf> SMS_sample: Initialize the Modem library and turn on the modem
    [00:00:00.696,380] <inf> SMS_sample: Initialize the modem information module
    [00:00:00.696,380] <inf> SMS_sample: Initialize the structure that stores modem information
    [00:00:00.698,303] <inf> SMS_sample: LTE mode = 4; LTE preference = 1
    [00:00:00.704,986] <inf> SMS_sample: PDN context 0 configured: APN: wrong_apn_name
    [00:00:00.705,657] <inf> SMS_sample: Default APN: wrong_apn_name
    [00:00:00.757,171] <dbg> pdn: on_cfun: Subscribing to +CNEC=16 and +CGEREP=1
    +CGEV: EXCE STATUS 0
    +CEREG: 2,"BE46","000DDD0C",7
    [00:00:02.546,875] <inf> SMS_sample: Not registered. Trying to attach or searching for an operator
    [00:00:02.546,905] <inf> SMS_sample: Network registration code: Connected - roaming
    +CSCON: 1
    [00:00:02.618,682] <inf> SMS_sample: RRC mode: Connected
    +CNEC_ESM: 27,0
    +CEREG: 2,"BE46","000DDD0C",7,0,19
    +CSCON: 0
    [00:00:03.268,280] <inf> SMS_sample: RRC mode: Idle
    
    *** Booting nRF Connect SDK 3758bcbfa5cd ***
    [00:00:00.385,955] <inf> SMS_sample: SMS sample starting
    [00:00:00.637,329] <inf> nrf_modem_lib_trace: Trace thread ready
    [00:00:00.639,129] <inf> nrf_modem_lib_trace: Trace level override: 2
    [00:00:00.644,287] <inf> SMS_sample: Initialize the Modem library and turn on the modem
    [00:00:00.678,710] <inf> SMS_sample: Initialize the modem information module
    [00:00:00.678,741] <inf> SMS_sample: Initialize the structure that stores modem information
    [00:00:00.680,633] <inf> SMS_sample: LTE mode = 4; LTE preference = 1
    [00:00:00.687,316] <inf> SMS_sample: PDN context 0 configured: APN: correct_apn_name
    [00:00:00.687,988] <inf> SMS_sample: Default APN: correct_apn_name
    [00:00:00.739,501] <dbg> pdn: on_cfun: Subscribing to +CNEC=16 and +CGEREP=1
    +CGEV: EXCE STATUS 0
    +CEREG: 2,"BE46","000DDD0C",7
    [00:00:02.485,961] <inf> SMS_sample: Not registered. Trying to attach or searching for an operator
    [00:00:02.485,992] <inf> SMS_sample: Network registration code: Connected - roaming
    +CSCON: 1
    [00:00:02.557,861] <inf> SMS_sample: RRC mode: Connected
    +CGEV: ME PDN ACT 0
    +CEREG: 1,"BE46","000DDD0C",7,,,"11100000","00000101"
    [00:00:03.375,976] <inf> SMS_sample: Network registration code: Connected - home network
    [00:00:03.379,150] <inf> SMS_sample: SMS sample is ready for receiving messages
    [00:00:07.362,121] <wrn> SMS_sample: Time to receive SMS: 4.0 s
    [00:00:07.362,152] <inf> SMS_sample:    SMS received:
    [00:00:07.362,182] <inf> SMS_sample:    Time:   24-10-23 10:55:56
    [00:00:07.362,213] <inf> SMS_sample:    Text:   'Test1'
    [00:00:07.362,213] <inf> SMS_sample:    Length: 5
    +CMT: "phone number",24
    0791539126010000040C9153917668753000004201320155654005D4F29C1E03
    +CSCON: 0
    [00:00:12.810,302] <inf> SMS_sample: RRC mode: Idle
    +CSCON: 1
    [00:00:17.518,432] <inf> SMS_sample: RRC mode: Connected
    [00:00:17.773,620] <wrn> SMS_sample: Time to receive SMS: 14.4 s
    [00:00:17.773,620] <inf> SMS_sample:    SMS received:
    [00:00:17.773,651] <inf> SMS_sample:    Time:   24-10-23 10:56:06
    [00:00:17.773,681] <inf> SMS_sample:    Text:   'Test2'
    [00:00:17.773,681] <inf> SMS_sample:    Length: 5
    +CMT: "phone number",24
    0791539126010000040C9153917668753000004201320165604005D4F29C2E03
    +CSCON: 0
    [00:00:22.733,520] <inf> SMS_sample: RRC mode: Idle
    +CSCON: 1
    [00:00:25.198,638] <inf> SMS_sample: RRC mode: Connected
    [00:00:25.613,555] <wrn> SMS_sample: Time to receive SMS: 22.2 s
    [00:00:25.613,586] <inf> SMS_sample:    SMS received:
    [00:00:25.613,616] <inf> SMS_sample:    Time:   24-10-23 10:56:12
    [00:00:25.613,647] <inf> SMS_sample:    Text:   'Test3'
    [00:00:25.613,647] <inf> SMS_sample:    Length: 5
    +CMT: "phone number",24
    0791539126010000040C9153917668753000004201320165214005D4F29C3E03
    +CSCON: 0
    [00:00:30.250,732] <inf> SMS_sample: RRC mode: Idle
    

    For the modem traces, I activated the CONFIG_NRF_MODEM_LIB_TRACE and CONFIG_AT_HOST_LIBRARY flags and used Cellular Monitor v2.4.1 from the nRF Connect for Desktop v5.0.2 application, but I got the following error:

    Error when creating trace: unable to locate db directory plugin path: C:\Users\xxx\.nrfconnect-apps\node_modules\pc-nrfconnect-cellularmonitor\node_modules\@nordicsemiconductor\nrf-monitor-lib-js\Release\win32-x64\nrfml-insight-source.nrfml

    How can I solve this problem?

    Regards, 
    GoncaloS

  • Hello, 

    From the logs I can see that your device receives reject cause 19 in the CEREG response. 

    Cause #19 – ESM failure
    This EMM cause is sent to the UE when there is a failure in the ESM message contained in the EMM message.

    This means we do need a modem trace from your device. 

    GoncaloS said:
    Error when creating trace: unable to locate db directory plugin path: C:\Users\xxx\.nrfconnect-apps\node_modules\pc-nrfconnect-cellularmonitor\node_modules\@nordicsemiconductor\nrf-monitor-lib-js\Release\win32-x64\nrfml-insight-source.nrfml

    Could you please provide more information about this, e.g. screenshot of your Cellular Monitor?

  • Hello, 

    Sure, I'll send you two pictures.

    Regards,
    GoncaloS

  • Hello, thanks for your patience with this 

    When trying to start a modem trace, can you please try selecting mfw 2.0.1 manually from the modem trace database list

    Kind regards,
    Øyvind

  • Hello, 

    Modem trace with SMS sample working:

    trace-2024-11-05T15-37-33.314Z.mtrace
    Modem trace with SMS sample that not works:

    trace-2024-11-05T15-41-15.049Z.mtrace

    I still have another question: when we use the lte_lc_connect function, does the device connect to an LTE network with an active data connection or not?

    Regards,
    GoncaloS

Related