I've got a custom Buildroot-based Linux system (running on a Raspberry Pi) that uses systemd for the init system. I've plugged a Quectel LTE EC20 modem into it and created the following file /etc/systemd/network/10-wwan.network



Now, on reboot, the wwan0 interface is automatically brought up and initialised and I can connect to the internet.

However, I want to be able to configure the APN settings of the modem (custom APN, username, password). Reading through the documentation of the systemd network files, I was unable to see any options that would allow these settings to be modified. How can this be done?


So 4G/LTE modems provide a set of usb cdc emulated ethernet interfaces, including DHCP, and then provide a usbmic device for cell modem specific configuration activity, as well as the classic AT /serial interface on usb TTY functions.

Unfortunately, systemd does not have any baked in support for QMI/3gpp AT command configuration for these devices. If you have ModemManager available in your setup, you can install and use that, or you have two options for baking your own integration, assuming you're still using systemd-networkd as your DHCP client. You may also have ModemManager installed and running already.

  1. Use mmcli/libqmi-util to setup qmi-network and configure APN/connect settings for the modem.
  2. Use GSM/3G AT commands to configure the modem with an automatically activated access profile. If your modem is working via DHCP with no other configuration, this is probably how you're currently setup. You can refer to ETSI Specification 27.007 (available at https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=1515)), and in specific the +CGDCONT,+CGATT,+CGAUTO,+CGAUTH commands. In addition, your vendor may have some specific commands to auto attach or whatnot, but you'll have to hunt down what your modem is and find vendor manuals for that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.