Adding new 4G router devices

I am working on porting OpenWrt to a number of industrial 4G routers.

While the SoCs and Wi-Fi components are clearly defined, the 4G modems typically utilize a PCIe slot on the board that can be populated with different models—even within the same product line (e.g., sometimes a Quectel EC200A, other times an EC25G, etc.).

What are the best practices here? Should the image definitions for these devices include all possible modem drivers upfront (QMI, MBIM, CDC-Ether,...), or should the base configurations be kept as minimal as possible?

Hi,
It all depends on modem you're using, I don't recommend installing every possible package, as this could cause conflicts.

Some modems have branded firmware versions and for example, will only support one protocol. There is no single universal solution.

Read modem settings and configure the packages based on those settings.

Ok, understood. So e.g. target/linux/ramips/image/mt7621.mk should only include modules for those components in DEVICE_PACKAGES , that are soldered on the board, and considered non-replaceable. Modem specific packages will then be added using the image builder, correct?

Each platform has its own minimum set of packages. When you define, add a new router, you create your own list of packages necessary for proper operation, specific to that device (e.g., drivers for Wi-Fi, USB ports, and packages for modem, if device has a modem and it is working). Check how other routers are described that should clarify everything.

I have checked other lte routers. Some of them include modem packages (e.g. tplink devices), others (like zbt) don't. I assume it's depends if the modem is modular (e.g. pcie) or fix.

Also, thank you very much for the SMS and modemdata addons, just realized those are written by you! :+1: