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

  • This is eror code if i try compile serial_lte_modem 

    [92/401] Building C object CMakeFiles/app.dir/src/mqtt_c/slm_at_mqtt.c.obj
    In file included from C:/Users/42073/serial_lte_modem/src/mqtt_c/slm_at_mqtt.c:12:
    C:/ncs/v2.9.0/zephyr/include/zephyr/random/rand32.h:13:2: warning: #warning "<zephyr/random/rand32.h> is deprecated, include <zephyr/random/random.h> instead" [-Wcpp]
    13 | #warning "<zephyr/random/rand32.h> is deprecated, include <zephyr/random/random.h> instead"
    | ^~~~~~~
    [118/401] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/dfu/img_util/flash_img.c.obj
    FAILED: zephyr/CMakeFiles/zephyr.dir/subsys/dfu/img_util/flash_img.c.obj
    C:\ncs\toolchains\2d382dcd92\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DEXT_API_MAGIC=0x281ee6de,0xb845acea,23298 -DFIRMWARE_INFO_MAGIC=0x281ee6de,0x8fcebb4c,23298 -DKERNEL -DK_HEAP_MEM_POOL_SIZE=16384 -DMBEDTLS_CONFIG_FILE=\"nrf-config.h\" -DMBEDTLS_PSA_CRYPTO_CONFIG_FILE=\"nrf-psa-crypto-config.h\" -DNRF9120_XXAA -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DNRF_TRUSTZONE_NONSECURE -DPICOLIBC_DOUBLE_PRINTF_SCANF -DUSE_PARTITION_MANAGER=1 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/ncs/v2.9.0/zephyr/kernel/include -IC:/ncs/v2.9.0/zephyr/arch/arm/include -IC:/Users/42073/serial_lte_modem/build/serial_lte_modem/zephyr/include/generated/zephyr -IC:/ncs/v2.9.0/zephyr/include -IC:/Users/42073/serial_lte_modem/build/serial_lte_modem/zephyr/include/generated -IC:/ncs/v2.9.0/zephyr/soc/nordic -IC:/ncs/v2.9.0/zephyr/soc/nordic/nrf91/. -IC:/ncs/v2.9.0/zephyr/soc/nordic/common/. -IC:/ncs/v2.9.0/zephyr/subsys/net/ip -IC:/ncs/v2.9.0/zephyr/subsys/settings/include -IC:/ncs/v2.9.0/nrf/include -IC:/ncs/v2.9.0/nrf/lib/at_cmd_parser/include -IC:/ncs/v2.9.0/nrf/lib/at_parser/include -IC:/Users/42073/serial_lte_modem/build/serial_lte_modem/tfm/api_ns/interface/include -IC:/ncs/v2.9.0/nrf/subsys/net/lib/nrf_cloud/./include -IC:/ncs/v2.9.0/nrf/subsys/net/lib/nrf_cloud/coap/include -IC:/ncs/v2.9.0/nrf/subsys/net/lib/download_client/./include -IC:/ncs/v2.9.0/nrf/subsys/net/lib/fota_download/./include -IC:/ncs/v2.9.0/nrf/subsys/net/lib/download_client/include -IC:/ncs/v2.9.0/nrf/modules/trusted-firmware-m/. -IC:/ncs/v2.9.0/nrf/include/tfm -IC:/ncs/v2.9.0/nrf/tests/include -IC:/ncs/v2.9.0/modules/lib/cjson -IC:/ncs/v2.9.0/nrf/modules/cjson/include -IC:/ncs/v2.9.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.9.0/zephyr/modules/cmsis/. -IC:/ncs/v2.9.0/modules/hal/nordic/nrfx -IC:/ncs/v2.9.0/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.9.0/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.9.0/zephyr/modules/hal_nordic/nrfx/. -IC:/ncs/v2.9.0/modules/debug/segger/SEGGER -IC:/ncs/v2.9.0/modules/debug/segger/Config -IC:/ncs/v2.9.0/nrfxlib/nrf_modem/include -IC:/Users/42073/serial_lte_modem/src/gnss/. -IC:/Users/42073/serial_lte_modem/src/nrfcloud/. -IC:/Users/42073/serial_lte_modem/src/ftp_c/. -IC:/Users/42073/serial_lte_modem/src/mqtt_c/. -IC:/Users/42073/serial_lte_modem/src/http_c/. -IC:/Users/42073/serial_lte_modem/src/twi/. -IC:/Users/42073/serial_lte_modem/src/gpio/. -IC:/Users/42073/serial_lte_modem/src -IC:/Users/42073/serial_lte_modem/build/serial_lte_modem/generated/interface_nrf_security_psa -IC:/ncs/v2.9.0/nrf/subsys/nrf_security/include -IC:/ncs/v2.9.0/modules/crypto/oberon-psa-crypto/include -IC:/ncs/v2.9.0/nrf/subsys/nrf_security/src/utils -IC:/ncs/v2.9.0/modules/crypto/oberon-psa-crypto/library -IC:/ncs/v2.9.0/modules/crypto/mbedtls/library -IC:/ncs/v2.9.0/modules/crypto/mbedtls/include -IC:/ncs/v2.9.0/modules/crypto/mbedtls/include/library -IC:/ncs/v2.9.0/nrfxlib/crypto/nrf_oberon/include -IC:/ncs/v2.9.0/nrfxlib/crypto/nrf_oberon/include/mbedtls -IC:/ncs/v2.9.0/bootloader/mcuboot/boot/bootutil/zephyr/.. -IC:/ncs/v2.9.0/bootloader/mcuboot/boot/bootutil/zephyr/../include -IC:/ncs/v2.9.0/bootloader/mcuboot/boot/bootutil/zephyr/../../zephyr/include -isystem C:/ncs/v2.9.0/zephyr/lib/libc/common/include -Os -DNDEBUG -fno-strict-aliasing -Os -imacros C:/Users/42073/serial_lte_modem/build/serial_lte_modem/zephyr/include/generated/zephyr/autoconf.h -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mfp16-format=ieee -mtp=soft --sysroot=C:/ncs/toolchains/2d382dcd92/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v2.9.0/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wdouble-promotion -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/serial_lte_modem=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.9.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.9.0=WEST_TOPDIR -ffunction-sections -fdata-sections -specs=picolibc.specs -D_POSIX_THREADS -std=c99 -MD -MT zephyr/CMakeFiles/zephyr.dir/subsys/dfu/img_util/flash_img.c.obj -MF zephyr\CMakeFiles\zephyr.dir\subsys\dfu\img_util\flash_img.c.obj.d -o zephyr/CMakeFiles/zephyr.dir/subsys/dfu/img_util/flash_img.c.obj -c C:/ncs/v2.9.0/zephyr/subsys/dfu/img_util/flash_img.c
    In file included from C:/ncs/v2.9.0/zephyr/include/zephyr/storage/flash_map.h:300,
    from C:/ncs/v2.9.0/zephyr/subsys/dfu/img_util/flash_img.c:13:
    C:/ncs/v2.9.0/zephyr/subsys/dfu/img_util/flash_img.c: In function 'flash_img_init':
    C:/ncs/v2.9.0/nrf/include/flash_map_pm.h:47:22: error: 'PM_mcuboot_secondary_ID' undeclared (first use in this function)
    47 | #define PM_ID(label) PM_##label##_ID
    | ^~~
    C:/ncs/v2.9.0/nrf/include/flash_map_pm.h:52:35: note: in expansion of macro 'PM_ID'
    52 | #define FIXED_PARTITION_ID(label) PM_ID(label)
    | ^~~~~
    C:/ncs/v2.9.0/zephyr/subsys/dfu/img_util/flash_img.c:33:30: note: in expansion of macro 'FIXED_PARTITION_ID'
    33 | #define UPLOAD_FLASH_AREA_ID FIXED_PARTITION_ID(UPLOAD_FLASH_AREA_LABEL)
    | ^~~~~~~~~~~~~~~~~~
    C:/ncs/v2.9.0/zephyr/subsys/dfu/img_util/flash_img.c:150:39: note: in expansion of macro 'UPLOAD_FLASH_AREA_ID'
    150 | return flash_img_init_id(ctx, UPLOAD_FLASH_AREA_ID);
    | ^~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.9.0/nrf/include/flash_map_pm.h:47:22: note: each undeclared identifier is reported only once for each function it appears in
    47 | #define PM_ID(label) PM_##label##_ID
    | ^~~
    C:/ncs/v2.9.0/nrf/include/flash_map_pm.h:52:35: note: in expansion of macro 'PM_ID'
    52 | #define FIXED_PARTITION_ID(label) PM_ID(label)
    | ^~~~~
    C:/ncs/v2.9.0/zephyr/subsys/dfu/img_util/flash_img.c:33:30: note: in expansion of macro 'FIXED_PARTITION_ID'
    33 | #define UPLOAD_FLASH_AREA_ID FIXED_PARTITION_ID(UPLOAD_FLASH_AREA_LABEL)
    | ^~~~~~~~~~~~~~~~~~
    C:/ncs/v2.9.0/zephyr/subsys/dfu/img_util/flash_img.c:150:39: note: in expansion of macro 'UPLOAD_FLASH_AREA_ID'
    150 | return flash_img_init_id(ctx, UPLOAD_FLASH_AREA_ID);
    | ^~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.9.0/zephyr/subsys/dfu/img_util/flash_img.c:151:1: warning: control reaches end of non-void function [-Wreturn-type]
    151 | }
    | ^
    

    Regards

    Jaroslav

  • Jaroslav, could you please provide full build log? How are you initiating the build process for Serial LTE Modem? 

    Have you added any changes to the SLM application? I am not able to reproduce the issue you are seeing. 


  • Thank you for help, but now I am able to compile serial_lte_modem example and switch modem to PPP.

    As you mentioned, problem was in build configuration, where i used SDK v2.5.1. Now, with SDK v.2.9.0 I am able to add config files and compile project.

    I am sorry for the misunderstanding, but I think we understand each other now. The problem was that the serial modem application that can be launched via Quick Start does not support PPP. Therefore, it is necessary to create another application with a serial LTE modem (with SDK v2.9.0) and upload it to the Nordic nrf9151-DK in order to use PPP in the form of AT commands. The problem was probably that with SDK v2.5.1 it is not possible to add additional configuration files (with PPP) to the project, so the modem still behaves as if without PPP. In addition, I must have had a damaged project somehow due to my own fault... I have no idea how it happened, anyway thanks again for your help.

    Could I ask for some more example of how to work with PPP directly in Zephyr? I am more concerned with the lower layers of this application, i.e. mapping PPP to a specific peripheral, switching the modem to PPP mode directly by the ARM core, etc.

    Thank you for help.

    Best regards

    Jaroslav

Related