PPP mode via USB

Hi,

I am using an EC20 module connected to the UMTS & LTE EVB-KIT and STM32 microcontroller.
My requirement is to establish a PPP connection over USB between the STM32 and the EC20 module.
I would like to:

  • Send AT commands from STM32 to EC20 via UART.
  • Configure the module for PPP mode.
  • Use USB as the data interface for PPP communication.

Is this configuration possible?
Has anyone implemented PPP over USB with EC20 controlled by an STM32?

Any guidance or reference documents would be helpful.

Thank you.

Dear @Fahad ,

Yes, this is possible only in one specific case, and it depends on what your STM32 can do as a USB host.

PPP itself is a point-to-point serial protocol. On EC20, PPP can run on a serial-style data channel:

  1. The practical, MCU-friendly solution is PPP over UART
    If your STM32 is already talking to the EC20 on UART, you can establish the data call and switch that same UART into PPP/data mode. This is the common and reliable approach on microcontrollers because it doesn’t require a USB host stack, USB class handling, or composite USB interface management.

  2. “PPP over USB” is only feasible if the STM32 is a USB host and you use a USB serial interface
    This is not PPP over “raw USB lines”. The STM32 must run in USB host mode, enumerate the EC20 as a USB device, and then talk PPP over a USB virtual serial interface (CDC-ACM or an equivalent USB-serial function exposed by that EC20/EVB USB composition). Many STM32 projects fail here because they either don’t have USB host hardware, or their host stack doesn’t support the needed USB class/interfaces, or the module’s USB composition doesn’t expose a usable CDC-ACM channel for PPP.

  • If your STM32 is not operating as a USB host with the required class support, you cannot do PPP over USB. Use PPP over UART.
  • If your STM32 is a proper USB host and the EC20 enumerates a usable USB serial interface, then you can keep AT control on UART and run PPP on that USB serial channel.

If you share the exact STM32 part number and whether you already have USB host + CDC class support running, I can recommend the best architecture immediately. In most cases, PPP over UART is the correct solution for STM32, and if you really need USB as the data interface, using a small Linux host (or switching to a USB networking mode on a Linux-class host) is usually the more robust path.

Best Regards,
Aghelan