ppp to the internet trough the nrf9151-dk

hello to all.

i been strugling the last couple of days to make a simple PPP connection from a debian12 laptop to the internet passing trough the nrf9151. I followed the documentation for SLM and modem_shell:

https://docs.nordicsemi.com/bundle/ncs-2.9.1/page/nrf/applications/serial_lte_modem/README.html

https://docs.nordicsemi.com/bundle/ncs-2.9.1/page/nrf/samples/cellular/modem_shell/README.html#modem-shell-application

my projet consists in attaching a raspberry PI to the the nrf9151-dk kit, and make a PPP connection to the internet. Then, ill do everything else (routing, nat, etc) from the raspberry. The only thing i really need is to program the modem in such a way that allows the PPP incoming petition and allow the debian12 to rise a ppp interface that allow me to work with.  I took the sample files of modem_shell and SLM from SDK 2.9.1 and tried to recompile with diferents options. Nothing works.

Linux detects it only as J-link

root@DietPi:~# lsusb
Bus 001 Device 006: ID 1366:1059 SEGGER J-Link
Bus 001 Device 004: ID 0424:7800 Microchip Technology, Inc. (formerly SMSC)
Bus 001 Device 003: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus 001 Device 002: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

/dev/ttyACM0

/dev/ttyACM1

/dev/ttyAMA0

usbmodeswitch doesnt seem to find it as a standar modem, so the compiling must be the problem (i guess). Im a total newbie in Nordic.

Is there a sample already build for this?

  • By the way, im know for sure that the modem registres at the isp. Both modem Shell and slm

  • Hello,

    i been strugling the last couple of days to make a simple PPP connection from a debian12 laptop to the internet passing trough the nrf9151.

    can you describe in detail what you do when building this? I got this to run on a run using a Linux computer and nrf9151 dk. I built with the ppp.overlay and ppp-overlay.conf.

  • Hi Hakon. I assume you are talking about SML. Here's my building config:

    overlay-ppp.conf  : 

    #
    # Copyright (c) 2023 Nordic Semiconductor ASA
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #

    CONFIG_SLM_PPP=y

    # When using PPP, disable commands of IP-based protocols to save flash space.
    CONFIG_SLM_FTPC=n
    CONFIG_SLM_TFTPC=n
    CONFIG_SLM_HTTPC=n
    CONFIG_SLM_MQTTC=n

    # NCS modem libraries
    CONFIG_PDN=y
    CONFIG_AT_CMD_CUSTOM=y

    CONFIG_NRF_MODEM_LIB_SHMEM_TX_SIZE=22528

    # Zephyr PPP support
    CONFIG_NET_NATIVE=y
    CONFIG_NET_L2_PPP=y
    CONFIG_MODEM_MODULES=y
    CONFIG_MODEM_PPP=y
    CONFIG_MODEM_BACKEND_UART=y
    CONFIG_MODEM_BACKEND_UART_ASYNC_TRANSMIT_TIMEOUT_MS=1000

    # L2 protocol
    CONFIG_NET_L2_PPP_MGMT=y
    CONFIG_NET_L2_PPP_OPTION_MRU=y
    CONFIG_NET_L2_PPP_OPTION_SERVE_IP=y
    CONFIG_NET_L2_PPP_OPTION_SERVE_DNS=y
    CONFIG_NET_L2_PPP_TIMEOUT=5000
    CONFIG_NET_L2_PPP_MAX_CONFIGURE_REQ_RETRANSMITS=20

    # IP stack
    CONFIG_NET_IP_ADDR_CHECK=n
    CONFIG_NET_SOCKETS_PACKET=y

    # network buffering
    CONFIG_NET_BUF=y
    CONFIG_NET_BUF_POOL_USAGE=y
    CONFIG_NET_PKT_RX_COUNT=44
    CONFIG_NET_BUF_RX_COUNT=88
    CONFIG_NET_PKT_TX_COUNT=44
    CONFIG_NET_BUF_TX_COUNT=88
    CONFIG_NET_TC_RX_COUNT=0

    # debug options
    #CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=4096
    #CONFIG_NET_LOG=y
    #CONFIG_NET_IF_LOG_LEVEL_DBG=y
    #CONFIG_NET_PKT_LOG_LEVEL_DBG=y
    #CONFIG_NET_L2_PPP_LOG_LEVEL_DBG=y
    #CONFIG_NET_MGMT_EVENT_LOG_LEVEL_DBG=y
    #CONFIG_MODEM_MODULES_LOG_LEVEL_DBG=y
    #CONFIG_UART_LOG_LEVEL_DBG=y
     
    overlay-ppp-without-cmux.conf     : 
    #
    # Copyright (c) 2024 Nordic Semiconductor ASA
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #

    # Include this Kconfig fragment only if using PPP without CMUX.

    # Ensure that HW RX byte counting is enabled for the PPP UART. This especially matters at higher baud rates.
    CONFIG_UART_1_NRF_HW_ASYNC=y
    CONFIG_UART_1_NRF_HW_ASYNC_TIMER=1
    overlay-ppp-without-cmux.overlay    :
    /*
     * Copyright (c) 2023 Nordic Semiconductor ASA
     *
     * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
     */

    /* Include this devicetree overlay only if using PPP without CMUX. */

     / {
        chosen {
            ncs,slm-ppp-uart = &uart1;
        };
    };

    /* PPP UART. Baud rates other than 115200/230400/1000000 didn't work on uart1. */
    &uart1 {
        status = "okay";
        hw-flow-control;
        current-speed = <1000000>;
    };
  • and this is my prj.conf:

    #
    # Copyright (c) 2020 Nordic Semiconductor ASA
    #
    # SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
    #
    # General config
    CONFIG_LOG=y
    CONFIG_LOG_DEFAULT_LEVEL=3
    CONFIG_STACK_SENTINEL=y
    CONFIG_PICOLIBC_IO_FLOAT=y
    CONFIG_RING_BUFFER=y
    CONFIG_REBOOT=y
    CONFIG_EVENTFD=y

    # Segger RTT
    CONFIG_USE_SEGGER_RTT=y
    # Where console messages (printk) are output.
    # By itself, SLM does not output any.
    CONFIG_RTT_CONSOLE=y
    CONFIG_UART_CONSOLE=n
    # Where SLM logs are output.
    CONFIG_LOG_BACKEND_RTT=y
    CONFIG_LOG_BACKEND_UART=n

    # Network
    CONFIG_NETWORKING=y
    CONFIG_NET_SOCKETS=y
    CONFIG_NET_NATIVE=n
    CONFIG_NET_IPV4=y
    CONFIG_NET_IPV6=y

    # Modem library
    CONFIG_NRF_MODEM_LIB=y
    CONFIG_AT_CMD_CUSTOM=y
    # Align the max FD entry to NRF_MODEM_MAX_SOCKET_COUNT(8)
    CONFIG_ZVFS_OPEN_MAX=8

    # Handle modem fault
    CONFIG_NRF_MODEM_LIB_ON_FAULT_APPLICATION_SPECIFIC=y

    # Use GPIO
    CONFIG_GPIO=y
    CONFIG_GPIO_NRFX=y

    # UART interface
    CONFIG_SERIAL=y
    CONFIG_UART_USE_RUNTIME_CONFIGURE=y
    CONFIG_UART_ASYNC_API=y
    CONFIG_NRFX_TIMER2=y

    # Stacks and heaps
    CONFIG_MAIN_STACK_SIZE=4096
    CONFIG_HEAP_MEM_POOL_SIZE=16384
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
    CONFIG_AT_MONITOR_HEAP_SIZE=4096

    # Device power management
    CONFIG_PM_DEVICE=y

    # FOTA
    CONFIG_HTTP_PARSER_URL=y
    CONFIG_FOTA_DOWNLOAD=y
    CONFIG_FOTA_DOWNLOAD_PROGRESS_EVT=y
    CONFIG_DFU_TARGET=y
    CONFIG_DOWNLOAD_CLIENT=y
    CONFIG_DOWNLOAD_CLIENT_STACK_SIZE=4096
    CONFIG_DOWNLOAD_CLIENT_MAX_FILENAME_SIZE=2048
    CONFIG_BOOTLOADER_MCUBOOT=y
    CONFIG_IMG_MANAGER=y

    # FLASH
    CONFIG_FLASH=y
    CONFIG_FLASH_PAGE_LAYOUT=y
    CONFIG_FLASH_MAP=y
    CONFIG_STREAM_FLASH=y
    CONFIG_MPU_ALLOW_FLASH_WRITE=y
    CONFIG_IMG_ERASE_PROGRESSIVELY=y

    # Settings
    CONFIG_SETTINGS=y
    CONFIG_SETTINGS_NVS=y
    CONFIG_NVS=y

    # nRF Cloud
    CONFIG_NRF_CLOUD_MQTT=y
    CONFIG_NRF_CLOUD_FOTA=n
    CONFIG_NRF_CLOUD_AGNSS=y
    CONFIG_NRF_CLOUD_AGNSS_FILTERED=n
    CONFIG_NRF_CLOUD_PGPS=n
    CONFIG_NRF_CLOUD_LOCATION=y
    CONFIG_NRF_CLOUD_LOG_LEVEL_INF=y
    CONFIG_NRF_CLOUD_GPS_LOG_LEVEL_INF=y
    CONFIG_NRF_CLOUD_CLIENT_ID_SRC_INTERNAL_UUID=y
    CONFIG_NRF_CLOUD_WIFI_LOCATION_ENCODE_OPT_MAC_RSSI=y
    CONFIG_DATE_TIME=y
    CONFIG_MODEM_INFO=y
    CONFIG_MODEM_INFO_ADD_DATE_TIME=n

    # UUID and JWT
    CONFIG_MODEM_JWT=y

    # MQTT client
    #CONFIG_MQTT_KEEPALIVE=60
    CONFIG_MQTT_CLEAN_SESSION=y

    # AT command helper libraries
    CONFIG_AT_PARSER=y
    CONFIG_AT_MONITOR=y

    # Disable TF-M logging.
    # TF-M log sending will block until remote end is ready, when HWFC is used on UART1.
    CONFIG_TFM_LOG_LEVEL_SILENCE=y

    #
    # SLM-specific configurations
    #
    CONFIG_SLM_CUSTOMER_VERSION=""
    CONFIG_SLM_EXTERNAL_XTAL=n

    # debug options
    #CONFIG_ASSERT=y
    #CONFIG_LOG_BUFFER_SIZE=16384
    #CONFIG_SLM_LOG_LEVEL_DBG=y
    #CONFIG_LOG_PRINTK=n
    #CONFIG_LOG_MODE_IMMEDIATE=y

    # For using external GNSS antenna
    #CONFIG_MODEM_ANTENNA=y
    #CONFIG_MODEM_ANTENNA_GNSS_EXTERNAL=y

    # Habilitar soporte para PPP
    CONFIG_SLM_PPP=y
  • Please write in detail what you would like to do. I built the modem shell sample unmodified using the PPP overlay files, and connected with picocom on linux. This works for me. Are you also able to do this? If there is something else you want to accomplish, I can try to help you with that.

Related