best practice to suppress roaming?

You will select format of response to AT+COPS command from two options: numeric or text. You need to use “numeric” option and will compare this field with SIM card data returned by AT+CIMI. IMSI always starts by MCC-MNC.

I do not know about standard way to ask APN from all GSM provider. So, we have a local database on our device to resolving MCCMNC → APN. But you may be faced with uncertainty, as some providers have many different APN for different users, such as contract / prepaid.

For example, ukrainian Kyivstar GSM use pair “www.kyivstar.net” and “ab.kyivstar.net”. For client’s VPN Kyivstar will use “xxxx.kyivstar.net”… is it unlimited number of APN? Up to you! But you will know an MCC-MNC pair and to narrow the search.

OK. We use the SIM card switch for cost cutting and it make a customers happy but for system stability you need more. I want to clarify: “The Magic power switch” :slight_smile: 90% of any program is error handlers, but without the circuit breaker (+watchdog) is all empty words. You will upset even humidity … modem blind hangs can not be cured by AT commands.

Luck to you!