Permanently lock to a specific mobile provider?

I live near the border between two countries, and it so happens that the antennas on the other side are more powerful than the ones in the country I live in. I regularly pass through “dead zones” where only the foreign network is visible. So my Librem5 frequently decides to connect to those in roaming and then I receive bills with roaming charges if I happen to get a message or phone call when roaming. I also noticed web pages were still loading even though I disabled data roaming, but maybe they were in cache? I didn’t investigate that one too much to avoid losing too much money.
I have tried many times to select my phone provider’s network and disable the “Automatic” network selection in mobile network settings, but it keeps switching back to automatic.

Is there a way to permanently (or until I manually reactivate it, that is) disable automatic network selection? I want my phone offline when my preferred network is out of range to avoid losing more money because of roaming charges.

I’m open to script-based solutions. Can I programmatically select a specific network and disable automatic selection? (I might try doing that from a startup script or a cron job), Can I access the current network from a command line tool? (If so I might try to programmatically disable mobile connectivity for like 30 minutes if the current network is not my preferred one). Any other options?


Probably yes. Refer:

You really need to get to the bottom of why you are not able to control roaming.

Thanks for your reply! I read the mmcli documentaion and am now waiting for the problem to occur again to see what mmcli returns when roaming. But of course since I read your message my phone has stayed nicely locked to my provider which I suppose is a good thing :slight_smile:

1 Like

Does your carrier provide a toggle to turn off international roaming within your online account?