PPP via AT command on nrf9151-DK doesn't work

Hi everybody,

I have problem with my nrf9151-DK. If I switch my kit do AT-Command mode (I use Serial Terminal of Nordic, v 1.4.3), I am not able to switch my kit to PPP mode. I tried some combination of mode selection (with LTE-M enabled, only NB-IOT enabled, both enabled) with AT%XSYSTEMMODE command. But if I used AT+CFUN=1 command as is shown in this example:

https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/applications/serial_lte_modem/doc/PPP_AT_commands.html

I am not able switch my kit to PPP mode using AT#XPPP=1.

If i use AT#XPPP? command, I will get error. But why. It sounds like nrfd9151-DK doesn't know this AT command. If I do something wrong, i belive i will not be able to switch modem to PPP mode, but if i use AT#XPPP?, I could get regular answer. I belive if i will do something wrong with order of AT commands, I would get standard answer of AT#XPPP? command. I am able to connect kit to TCP server (connect it to APN).

Could somebody please show me how to work with PPP with nrf9151-DK (with AT commands). Order of command and syntax. I do what I see in example (without CMUX), but it doesn't work.

What I am doing wrong?

Parametrs of nrf9151-DK:

> AT+CGMI

Nordic Semiconductor ASA

OK
> AT+CGMM

nRF9151-LACA

OK
> AT+CGMR

mfw_nrf91x1_2.0.1

OK
> AT+CGSN

359404230050685

OK

Regards

Jaroslav Havel

  • Hello, 

    What version of Serial LTE Modem are you running on your device? I.e. what version of nRF Connect SDK are you running?


    Did you follow the information on configuration files? I.e. did you build the sample for PPP? 

    Kind regards,
    Øyvind

  • Hello,

              thank you for your interest.

    I am running nRF Connect for desktop v5.1.0.

    Modem core runs on version 2.0.1 of firmware (that says Quick Start v1.0.0).

    I tried to build gnss_modem_ppp example, but I wasn't able to do it. I had some troubles with missing keywords... I am not able to say yes, cause of working/not working of this example I know PPP on my desk works/ doesn't work.

    Could you please recommend me some example with PPP? An example where it would be clearly visible how the UART connects to the modem, how the individual packets are created... rather based on lower layers.

    Regards

    Jaroslav

  • Hi Jaroslav, 

    Jaroslav Havel said:
    I tried to build gnss_modem_ppp example, but I wasn't able to do it. I had some troubles with missing keywords.

    Can you share logs of the issue? Make sure to build the Serial LTE Modem with PPP enabled as per the documentation, for example:

    Jaroslav Havel said:
    Modem core runs on version 2.0.1 of firmware (that says Quick Start v1.0.0).

    The Serial LTE Modem image included in the Quick Start app does not have PPP enabled.

    Kind regards,
    Øyvind

  • I think we have a little misunderstanding. The AT command to switch the modem to PPP mode does not work for me on my nrf9151-DK. Yes, the serial_modem example doesn't include ppp, but I wasn't talking about that example. I can add debugging messages from gsm_modem_ppp, but first I would solve why the command AT#XPPP does not work.


    Here is it.

    FAILED: CMakeFiles/app.dir/src/main.c.obj 
    C:\ncs\toolchains\2d382dcd92\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DMBEDTLS_CONFIG_FILE=\"nrf-config.h\" -DMBEDTLS_USER_CONFIG_FILE=\"nrf-config-user.h\" -DNRF9120_XXAA -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DNRF_TRUSTZONE_NONSECURE -DPICOLIBC_INTEGER_PRINTF_SCANF -DTFM_PSA_API -DUSE_PARTITION_MANAGER=1 -D_FORTIFY_SOURCE=1 -D_POSIX_C_SOURCE=200809 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/ncs/v2.5.1/zephyr/include -IC:/Users/42073/gsm_modem_ppp/build/zephyr/include/generated -IC:/ncs/v2.5.1/zephyr/soc/arm/nordic_nrf/nrf91 -IC:/ncs/v2.5.1/zephyr/lib/posix/getopt/. -IC:/ncs/v2.5.1/zephyr/soc/arm/nordic_nrf/common/. -IC:/ncs/v2.5.1/zephyr/subsys/net/conn_mgr/. -IC:/ncs/v2.5.1/nrf/include -IC:/Users/42073/gsm_modem_ppp/build/tfm/install/interface/include -IC:/ncs/v2.5.1/nrf/include/tfm -IC:/ncs/v2.5.1/nrf/tests/include -IC:/Users/42073/gsm_modem_ppp/build/tfm/generated/interface/include -IC:/ncs/v2.5.1/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.5.1/zephyr/modules/cmsis/. -IC:/ncs/v2.5.1/modules/hal/nordic/nrfx -IC:/ncs/v2.5.1/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.5.1/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.5.1/zephyr/modules/hal_nordic/nrfx/. -IC:/ncs/v2.5.1/nrfxlib/nrf_modem/include -IC:/Users/42073/gsm_modem_ppp/build/modules/nrf/subsys/nrf_security/src/include/generated -IC:/ncs/v2.5.1/nrf/subsys/nrf_security/include -IC:/ncs/v2.5.1/nrf/ext/oberon/psa/core/include -IC:/ncs/v2.5.1/nrf/ext/oberon/psa/core/library -IC:/ncs/v2.5.1/modules/crypto/mbedtls/include -IC:/ncs/v2.5.1/modules/crypto/mbedtls/library -IC:/ncs/v2.5.1/nrfxlib/crypto/nrf_oberon/include/mbedtls -IC:/ncs/v2.5.1/nrfxlib/crypto/nrf_oberon/include -fno-strict-aliasing -Os -imacros C:/Users/42073/gsm_modem_ppp/build/zephyr/include/generated/autoconf.h -fno-printf-return-value -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=C:/ncs/toolchains/2d382dcd92/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v2.5.1/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=C:/Users/42073/gsm_modem_ppp=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.5.1/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.5.1=WEST_TOPDIR -ffunction-sections -fdata-sections --specs=picolibc.specs -D_POSIX_THREADS -std=c99 -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles\app.dir\src\main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj -c C:/Users/42073/gsm_modem_ppp/src/main.c
    In file included from C:/ncs/v2.5.1/zephyr/include/zephyr/toolchain/gcc.h:92,
                     from C:/ncs/v2.5.1/zephyr/include/zephyr/toolchain.h:50,
                     from C:/ncs/v2.5.1/zephyr/include/zephyr/kernel_includes.h:19,
                     from C:/ncs/v2.5.1/zephyr/include/zephyr/kernel.h:17,
                     from C:/Users/42073/gsm_modem_ppp/src/main.c:7:
    C:/ncs/v2.5.1/zephyr/include/zephyr/device.h:85:41: error: '__device_dts_ord___ORD' undeclared here (not in a function); did you mean '__device_dts_ord_55'?
       85 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
          |                                         ^~~~~~~~~
    C:/ncs/v2.5.1/zephyr/include/zephyr/toolchain/common.h:132:26: note: in definition of macro '_DO_CONCAT'
      132 | #define _DO_CONCAT(x, y) x ## y
          |                          ^
    C:/ncs/v2.5.1/zephyr/include/zephyr/device.h:85:33: note: in expansion of macro '_CONCAT'
       85 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
          |                                 ^~~~~~~
    C:/ncs/v2.5.1/zephyr/include/zephyr/device.h:211:37: note: in expansion of macro 'DEVICE_NAME_GET'
      211 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
          |                                     ^~~~~~~~~~~~~~~
    C:/ncs/v2.5.1/zephyr/include/zephyr/device.h:228:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
      228 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
          |                                  ^~~~~~~~~~~~~~~~~~
    C:/Users/42073/gsm_modem_ppp/src/main.c:23:45: note: in expansion of macro 'DEVICE_DT_GET'
       23 | static const struct device *const gsm_dev = DEVICE_DT_GET(GSM_MODEM_NODE);
          |                                             ^~~~~~~~~~~~~
    C:/Users/42073/gsm_modem_ppp/src/main.c: In function 'main':
    C:/ncs/v2.5.1/zephyr/include/zephyr/device.h:85:41: error: '__device_dts_ord___BUS_ORD' undeclared (first use in this function); did you mean '__device_dts_ord_55'?
       85 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
          |                                         ^~~~~~~~~
    C:/ncs/v2.5.1/zephyr/include/zephyr/toolchain/common.h:132:26: note: in definition of macro '_DO_CONCAT'
      132 | #define _DO_CONCAT(x, y) x ## y
          |                          ^
    C:/ncs/v2.5.1/zephyr/include/zephyr/device.h:85:33: note: in expansion of macro '_CONCAT'
       85 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
          |                                 ^~~~~~~
    C:/ncs/v2.5.1/zephyr/include/zephyr/device.h:211:37: note: in expansion of macro 'DEVICE_NAME_GET'
      211 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
          |                                     ^~~~~~~~~~~~~~~
    C:/ncs/v2.5.1/zephyr/include/zephyr/device.h:228:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
      228 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
          |                                  ^~~~~~~~~~~~~~~~~~
    C:/Users/42073/gsm_modem_ppp/src/main.c:115:47: note: in expansion of macro 'DEVICE_DT_GET'
      115 |         const struct device *const uart_dev = DEVICE_DT_GET(UART_NODE);
          |                                               ^~~~~~~~~~~~~
    C:/ncs/v2.5.1/zephyr/include/zephyr/device.h:85:41: note: each undeclared identifier is reported only once for each function it appears in
       85 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
          |                                         ^~~~~~~~~
    C:/ncs/v2.5.1/zephyr/include/zephyr/toolchain/common.h:132:26: note: in definition of macro '_DO_CONCAT'
      132 | #define _DO_CONCAT(x, y) x ## y
          |                          ^
    C:/ncs/v2.5.1/zephyr/include/zephyr/device.h:85:33: note: in expansion of macro '_CONCAT'
       85 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
          |                                 ^~~~~~~
    C:/ncs/v2.5.1/zephyr/include/zephyr/device.h:211:37: note: in expansion of macro 'DEVICE_NAME_GET'
      211 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
          |                                     ^~~~~~~~~~~~~~~
    C:/ncs/v2.5.1/zephyr/include/zephyr/device.h:228:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
      228 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
          |                                  ^~~~~~~~~~~~~~~~~~
    C:/Users/42073/gsm_modem_ppp/src/main.c:115:47: note: in expansion of macro 'DEVICE_DT_GET'
      115 |         const struct device *const uart_dev = DEVICE_DT_GET(UART_NODE);
          |                                               ^~~~~~~~~~~~~


    My priority is to find out why the AT command for PPP doesn't work and possibly find some example where I can learn how to work with PPP

    Could I ask for some example on which I could understand the work of PPP within the application of communication via PPP for example? I would like it if it was an example focused more on the lower layers of programming, i.e. directly on how the PP is mapped to some UART, or to another communication peripheral.


    Regards
    Jaroslav

  • Jaroslav Havel said:
    I think we have a little misunderstanding

    Yes, that is correct. The nRF9151 is not a GSM device, and you are referring to the GSM sample in the Zephyr repository. This is not supported by our device

    I am referring to the official application for Serial LTE Modem designed for the nRF91 series. Please see my previous answers. 

    Kind regards,
    Øyvind

Related