Skip to main content

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Asked
Modified 30 days ago
Viewed 31 times
0

I do not know before hand which network provider's SIM card is going to be inserted into my device, so my current method is to just have a python script create multiple connections while iterating through a list of APNs of providers in the country such as -

for APN in APNS:
    sudo nmcli connection add type gsm ifname '*' con-name CellularCon apn <APN>

Is there a better way to do this? Can the APN be resolved by NetworkManager itself?

1
  • An alternative to nmcli is to open a serial connection and run AT commands, specifically for your case AT+COPS?.
    hlovdal
    –  hlovdal
    2025-09-18 14:05:30 +00:00
    Commented Sep 18 at 14:05

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.