Nas client set preferred network

Dan Williams dcbw at redhat.com
Thu Mar 25 00:36:23 UTC 2021


On Wed, 2021-03-24 at 17:38 +0000, andrea.greco at external.marelli.com
wrote:
> Request help for setup network preference.
> I tring to setup preferred operator, after network scan.
> 
> Scan result contains array with all operator available and related
> status bits, described from ```enum QmiNasNetworkStatus```
> 
> From here seem that a Network, can be setup as forbidden, preferred
> or not_preferred.
> I tried search inside: 
> https://www.freedesktop.org/software/libqmi/libqmi-glib/1.28.0/libqmi-glib-NAS-Set-System-Selection-Preference-request.html
> And not found a valid method for change this bit and setup a
> preferred operator, enum also is used only for search.

I believe these values (forbidden, preferred, not_preferred) are
actually reported by the modem itself when it filters the providers
MCC/MNC through the various tables on the SIM card. Your carrier
programs the SIM with lists of their own home network, shared networks,
roaming networks, and forbidden networks, and that's what the modem is
reporting here.

The modem will simply refuse to attach to a forbidden network, and
without locking to a given MCC/MNC (which might disable roaming and
networks that your provider owns in other countries that aren't
roaming) the modem will first pick preferred networks, then maybe roam
to not_preferred.

> Is there any way for setup preferred operator or set "network" as
> forbidden.

I believe you'd have to edit the tables on the SIM that the operator
programs, which might be overwritten by carrier OTA updates too.

> Can be used this function for achieve this result?
> ```
> qmi_message_nas_set_system_selection_preference_input_get_network_sel
> ection_registration_restriction(PrefInput,
> QMI_NAS_NETWORK_SELECTION_REGISTRATION_RESTRICTION_LIMITED, &err);
> ```

I don't think so, but I could be wrong.

Dan

> Many thanks for help, and for all library.
> Regars, Andrea
> _______________________________________________
> libqmi-devel mailing list
> libqmi-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/libqmi-devel
> 




More information about the libqmi-devel mailing list