4G LTE & ModemManager Setup
Once you are booted into Debian or postmarketOS, you need to manage the Qualcomm MDM9625/MDM9207/MSM8916 baseband processor. In modern Linux distributions, this is handled through ModemManager and its command-line companion mmcli.
1. Verifying Modem Detection
Section titled “1. Verifying Modem Detection”Check if ModemManager recognizes the integrated cellular baseband:
# List detected modemsmmcli -LExpected output:
/org/freedesktop/ModemManager1/Modem/0 [QUALCOMM] MSM8916Inspect detailed modem status:
mmcli -m 0This command outputs manufacturer info, hardware revision, IMEI, SIM status, power state, and supported frequency bands.
2. Unlocking and Enabling the Radio
Section titled “2. Unlocking and Enabling the Radio”Ensure the cellular radio is powered on:
# Enable the modemmmcli -m 0 -eIf your SIM card has a PIN code:
mmcli -i 0 --pin="1234"3. Configuring Carrier APN with NetworkManager
Section titled “3. Configuring Carrier APN with NetworkManager”The easiest and most reliable way to maintain persistent cellular connectivity on Linux is using nmcli (NetworkManager):
# Create a cellular connection profilesudo nmcli connection add \ type gsm \ ifname cdc-wdm0 \ con-name "Cellular-4G" \ apn "YOUR_CARRIER_APN"
# Example for T-Mobile:# apn "fast.t-mobile.com"
# Example for Vodafone:# apn "live.vodafone.com"
# Activate the cellular connectionsudo nmcli connection up "Cellular-4G"Test your internet connection over 4G:
curl -I https://openstick.org4. Reading and Sending SMS via Terminal
Section titled “4. Reading and Sending SMS via Terminal”Because the modem communicates directly with Linux via QMI/MBIM, you can read incoming verification codes (2FA) and send text messages directly from scripts:
Sending an SMS
Section titled “Sending an SMS”# Create SMS objectmmcli -m 0 --messaging-create-sms="text='Hello from OpenStick Linux!',number='+1234567890'"
# Send the created SMS (usually ID 0)mmcli -s 0 --sendReading Incoming SMS
Section titled “Reading Incoming SMS”# List all messages on the SIM cardmmcli -m 0 --messaging-list-sms
# View message content (e.g. message 0)mmcli -s 0This capability forms the foundation of automated SMS verification gateways and Telegram notification bots!