Does NetworkManager support blocking non-home networks (UMTS/3g)

View: New views
12 Messages — Rating Filter:   Alert me  

Does NetworkManager support blocking non-home networks (UMTS/3g)

by nodata-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I can't seem to find it in the GUI or in the documentation.

Can NetworkManager be configured to only connect to home networks? Say I
am on Vodafone and get free data usage, but then move to an area with
poor signal for Vodafone, can I prevent switching to T-Mobile which
costs me money?

If yes, can this be determined automatically, or is this done with a
string match?

Thanks.
_______________________________________________
NetworkManager-list mailing list
NetworkManager-list@...
http://mail.gnome.org/mailman/listinfo/networkmanager-list

Re: Does NetworkManager support blocking non-home networks (UMTS/3g)

by Gianluca Sforna :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, Nov 8, 2009 at 3:55 PM, nodata <lsof@...> wrote:

> Hello,
>
> I can't seem to find it in the GUI or in the documentation.
>
> Can NetworkManager be configured to only connect to home networks? Say I am
> on Vodafone and get free data usage, but then move to an area with poor
> signal for Vodafone, can I prevent switching to T-Mobile which costs me
> money?
>
> If yes, can this be determined automatically, or is this done with a string
> match?

For this purpose, it seems you can stick the MCC/MNC code for your
operator into the "Network" field in the connection preferences.

The list of codes is here:
http://en.wikipedia.org/wiki/Mobile_Network_Code



--
Gianluca Sforna

http://morefedora.blogspot.com
http://www.linkedin.com/in/gianlucasforna
_______________________________________________
NetworkManager-list mailing list
NetworkManager-list@...
http://mail.gnome.org/mailman/listinfo/networkmanager-list

Re: Does NetworkManager support blocking non-home networks (UMTS/3g)

by Dan Williams :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, 2009-11-08 at 15:55 +0100, nodata wrote:

> Hello,
>
> I can't seem to find it in the GUI or in the documentation.
>
> Can NetworkManager be configured to only connect to home networks? Say I
> am on Vodafone and get free data usage, but then move to an area with
> poor signal for Vodafone, can I prevent switching to T-Mobile which
> costs me money?
>
> If yes, can this be determined automatically, or is this done with a
> string match?

For cards where we actually know the commands for controlling roaming,
yes we can do this, otherwise NM will need to send the specific MCC/MNC
of your operator to the modem, which has its own problems.  This is
definitely going to be fixed in the near future, but there's no facility
for doing so now other than entering the MCC/MNC of your operator into
teh Network entry in the connection editor.

Dan

_______________________________________________
NetworkManager-list mailing list
NetworkManager-list@...
http://mail.gnome.org/mailman/listinfo/networkmanager-list

Re: Does NetworkManager support blocking non-home networks (UMTS/3g)

by Marcel Holtmann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Dan,

> > I can't seem to find it in the GUI or in the documentation.
> >
> > Can NetworkManager be configured to only connect to home networks? Say I
> > am on Vodafone and get free data usage, but then move to an area with
> > poor signal for Vodafone, can I prevent switching to T-Mobile which
> > costs me money?
> >
> > If yes, can this be determined automatically, or is this done with a
> > string match?
>
> For cards where we actually know the commands for controlling roaming,
> yes we can do this, otherwise NM will need to send the specific MCC/MNC
> of your operator to the modem, which has its own problems.  This is
> definitely going to be fixed in the near future, but there's no facility
> for doing so now other than entering the MCC/MNC of your operator into
> teh Network entry in the connection editor.

what do you mean by this. It makes no sense. Which card can be
controlled to roam or not via its firmware. Normally this is all host
stack stuff.

You get the current MCC/MNC from the network notifications and your home
network is part of the IMSI. Only trick part with the IMSI is that you
have to check first if the MNC is two or three digits long. That value
is stored somewhere in the SIM card.

The network notifications also tell you if you are roaming not. So in
case you go over to roaming and don't wanna allow it, you have to
disconnect the GPRS connection at that point.

Regards

Marcel


_______________________________________________
NetworkManager-list mailing list
NetworkManager-list@...
http://mail.gnome.org/mailman/listinfo/networkmanager-list

Re: Does NetworkManager support blocking non-home networks (UMTS/3g)

by Dan Williams :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, 2009-11-10 at 09:28 +0100, Marcel Holtmann wrote:

> Hi Dan,
>
> > > I can't seem to find it in the GUI or in the documentation.
> > >
> > > Can NetworkManager be configured to only connect to home networks? Say I
> > > am on Vodafone and get free data usage, but then move to an area with
> > > poor signal for Vodafone, can I prevent switching to T-Mobile which
> > > costs me money?
> > >
> > > If yes, can this be determined automatically, or is this done with a
> > > string match?
> >
> > For cards where we actually know the commands for controlling roaming,
> > yes we can do this, otherwise NM will need to send the specific MCC/MNC
> > of your operator to the modem, which has its own problems.  This is
> > definitely going to be fixed in the near future, but there's no facility
> > for doing so now other than entering the MCC/MNC of your operator into
> > teh Network entry in the connection editor.
>
> what do you mean by this. It makes no sense. Which card can be
> controlled to roam or not via its firmware. Normally this is all host
> stack stuff.

Yeah, seems that's mostly CDMA cards right now.  My bad.

> You get the current MCC/MNC from the network notifications and your home
> network is part of the IMSI. Only trick part with the IMSI is that you
> have to check first if the MNC is two or three digits long. That value
> is stored somewhere in the SIM card.

Does that mean talking directly to the SIM to find out the MNC length?
There's boatloads of networks with 3-digit MNC (americas and India
mostly) so it would completely suck if you couldn't tell just from the
MNC.

Dan

_______________________________________________
NetworkManager-list mailing list
NetworkManager-list@...
http://mail.gnome.org/mailman/listinfo/networkmanager-list

Re: Does NetworkManager support blocking non-home networks (UMTS/3g)

by Marcel Holtmann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Dan,

> > > > I can't seem to find it in the GUI or in the documentation.
> > > >
> > > > Can NetworkManager be configured to only connect to home networks? Say I
> > > > am on Vodafone and get free data usage, but then move to an area with
> > > > poor signal for Vodafone, can I prevent switching to T-Mobile which
> > > > costs me money?
> > > >
> > > > If yes, can this be determined automatically, or is this done with a
> > > > string match?
> > >
> > > For cards where we actually know the commands for controlling roaming,
> > > yes we can do this, otherwise NM will need to send the specific MCC/MNC
> > > of your operator to the modem, which has its own problems.  This is
> > > definitely going to be fixed in the near future, but there's no facility
> > > for doing so now other than entering the MCC/MNC of your operator into
> > > teh Network entry in the connection editor.
> >
> > what do you mean by this. It makes no sense. Which card can be
> > controlled to roam or not via its firmware. Normally this is all host
> > stack stuff.
>
> Yeah, seems that's mostly CDMA cards right now.  My bad.

so with CDMA cards you can actually tell them to allow roaming or not?
If so, do you get notifications when it does.

> > You get the current MCC/MNC from the network notifications and your home
> > network is part of the IMSI. Only trick part with the IMSI is that you
> > have to check first if the MNC is two or three digits long. That value
> > is stored somewhere in the SIM card.
>
> Does that mean talking directly to the SIM to find out the MNC length?
> There's boatloads of networks with 3-digit MNC (americas and India
> mostly) so it would completely suck if you couldn't tell just from the
> MNC.

Actually you really can't tell it by just looking at the IMSI. In oFono
we have to do some heavy lifting to get this information out of the SIM
card. And it is the only way to find the home network that actually
issued your SIM card (at least to me knowledge).

Regards

Marcel


_______________________________________________
NetworkManager-list mailing list
NetworkManager-list@...
http://mail.gnome.org/mailman/listinfo/networkmanager-list

Re: Does NetworkManager support blocking non-home networks (UMTS/3g)

by Dan Williams :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, 2009-11-17 at 23:35 +0100, Marcel Holtmann wrote:

> Hi Dan,
>
> > > > > I can't seem to find it in the GUI or in the documentation.
> > > > >
> > > > > Can NetworkManager be configured to only connect to home networks? Say I
> > > > > am on Vodafone and get free data usage, but then move to an area with
> > > > > poor signal for Vodafone, can I prevent switching to T-Mobile which
> > > > > costs me money?
> > > > >
> > > > > If yes, can this be determined automatically, or is this done with a
> > > > > string match?
> > > >
> > > > For cards where we actually know the commands for controlling roaming,
> > > > yes we can do this, otherwise NM will need to send the specific MCC/MNC
> > > > of your operator to the modem, which has its own problems.  This is
> > > > definitely going to be fixed in the near future, but there's no facility
> > > > for doing so now other than entering the MCC/MNC of your operator into
> > > > teh Network entry in the connection editor.
> > >
> > > what do you mean by this. It makes no sense. Which card can be
> > > controlled to roam or not via its firmware. Normally this is all host
> > > stack stuff.
> >
> > Yeah, seems that's mostly CDMA cards right now.  My bad.
>
> so with CDMA cards you can actually tell them to allow roaming or not?
> If so, do you get notifications when it does.

Yes, for cards which provide more than one port and for which we know
the AT commands.

> > > You get the current MCC/MNC from the network notifications and your home
> > > network is part of the IMSI. Only trick part with the IMSI is that you
> > > have to check first if the MNC is two or three digits long. That value
> > > is stored somewhere in the SIM card.
> >
> > Does that mean talking directly to the SIM to find out the MNC length?
> > There's boatloads of networks with 3-digit MNC (americas and India
> > mostly) so it would completely suck if you couldn't tell just from the
> > MNC.
>
> Actually you really can't tell it by just looking at the IMSI. In oFono
> we have to do some heavy lifting to get this information out of the SIM
> card. And it is the only way to find the home network that actually
> issued your SIM card (at least to me knowledge).

Interesting.  Yay for GSM.

Dan

_______________________________________________
NetworkManager-list mailing list
NetworkManager-list@...
http://mail.gnome.org/mailman/listinfo/networkmanager-list

Re: Does NetworkManager support blocking non-home networks (UMTS/3g)

by Dan Williams :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, 2009-11-17 at 23:35 +0100, Marcel Holtmann wrote:

> Hi Dan,
>
> > > > > I can't seem to find it in the GUI or in the documentation.
> > > > >
> > > > > Can NetworkManager be configured to only connect to home networks? Say I
> > > > > am on Vodafone and get free data usage, but then move to an area with
> > > > > poor signal for Vodafone, can I prevent switching to T-Mobile which
> > > > > costs me money?
> > > > >
> > > > > If yes, can this be determined automatically, or is this done with a
> > > > > string match?
> > > >
> > > > For cards where we actually know the commands for controlling roaming,
> > > > yes we can do this, otherwise NM will need to send the specific MCC/MNC
> > > > of your operator to the modem, which has its own problems.  This is
> > > > definitely going to be fixed in the near future, but there's no facility
> > > > for doing so now other than entering the MCC/MNC of your operator into
> > > > teh Network entry in the connection editor.
> > >
> > > what do you mean by this. It makes no sense. Which card can be
> > > controlled to roam or not via its firmware. Normally this is all host
> > > stack stuff.
> >
> > Yeah, seems that's mostly CDMA cards right now.  My bad.
>
> so with CDMA cards you can actually tell them to allow roaming or not?
> If so, do you get notifications when it does.
>
> > > You get the current MCC/MNC from the network notifications and your home
> > > network is part of the IMSI. Only trick part with the IMSI is that you
> > > have to check first if the MNC is two or three digits long. That value
> > > is stored somewhere in the SIM card.
> >
> > Does that mean talking directly to the SIM to find out the MNC length?
> > There's boatloads of networks with 3-digit MNC (americas and India
> > mostly) so it would completely suck if you couldn't tell just from the
> > MNC.
>
> Actually you really can't tell it by just looking at the IMSI. In oFono
> we have to do some heavy lifting to get this information out of the SIM
> card. And it is the only way to find the home network that actually
> issued your SIM card (at least to me knowledge).

So when you say stack-side, you mean that the modem controller has to
detach the PDP context (or otherwise terminate the data connection) when
it gets an unsolicited update that the modem has roamed to a cell that
doesn't have the home MCC/MNC?

If that's the case, that sucks.  Because often networks will have quite
a few MCC/MNCs that the device can roam to (including most US and Indian
carriers).  I assume all the "home" MCC/MNCs are stored somewhere on the
SIM then?  Couldn't that lead to the at least a Kb or so of roaming
traffic before the stack notices the update and terminates the
connection?

Dan

_______________________________________________
NetworkManager-list mailing list
NetworkManager-list@...
http://mail.gnome.org/mailman/listinfo/networkmanager-list

Re: Does NetworkManager support blocking non-home networks (UMTS/3g)

by Marcel Holtmann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Dan,

> > > > > > I can't seem to find it in the GUI or in the documentation.
> > > > > >
> > > > > > Can NetworkManager be configured to only connect to home networks? Say I
> > > > > > am on Vodafone and get free data usage, but then move to an area with
> > > > > > poor signal for Vodafone, can I prevent switching to T-Mobile which
> > > > > > costs me money?
> > > > > >
> > > > > > If yes, can this be determined automatically, or is this done with a
> > > > > > string match?
> > > > >
> > > > > For cards where we actually know the commands for controlling roaming,
> > > > > yes we can do this, otherwise NM will need to send the specific MCC/MNC
> > > > > of your operator to the modem, which has its own problems.  This is
> > > > > definitely going to be fixed in the near future, but there's no facility
> > > > > for doing so now other than entering the MCC/MNC of your operator into
> > > > > teh Network entry in the connection editor.
> > > >
> > > > what do you mean by this. It makes no sense. Which card can be
> > > > controlled to roam or not via its firmware. Normally this is all host
> > > > stack stuff.
> > >
> > > Yeah, seems that's mostly CDMA cards right now.  My bad.
> >
> > so with CDMA cards you can actually tell them to allow roaming or not?
> > If so, do you get notifications when it does.
> >
> > > > You get the current MCC/MNC from the network notifications and your home
> > > > network is part of the IMSI. Only trick part with the IMSI is that you
> > > > have to check first if the MNC is two or three digits long. That value
> > > > is stored somewhere in the SIM card.
> > >
> > > Does that mean talking directly to the SIM to find out the MNC length?
> > > There's boatloads of networks with 3-digit MNC (americas and India
> > > mostly) so it would completely suck if you couldn't tell just from the
> > > MNC.
> >
> > Actually you really can't tell it by just looking at the IMSI. In oFono
> > we have to do some heavy lifting to get this information out of the SIM
> > card. And it is the only way to find the home network that actually
> > issued your SIM card (at least to me knowledge).
>
> So when you say stack-side, you mean that the modem controller has to
> detach the PDP context (or otherwise terminate the data connection) when
> it gets an unsolicited update that the modem has roamed to a cell that
> doesn't have the home MCC/MNC?

for the data connections you have to use CGREG and it will tell you when
you are roaming. GSM does support seamless handover between home and
roaming networks.

However remember that your voice network can be still your home network
while your data network is already roaming and vice versa. Will not
happen that often, but potentially possible.

> If that's the case, that sucks.  Because often networks will have quite
> a few MCC/MNCs that the device can roam to (including most US and Indian
> carriers).  I assume all the "home" MCC/MNCs are stored somewhere on the
> SIM then?  Couldn't that lead to the at least a Kb or so of roaming
> traffic before the stack notices the update and terminates the
> connection?

I think you misunderstood me here. With CGREG you always get the current
network. However when you are roaming and you wanna know what is your
home network (for the device setup for example), then you have to get
the MCC/MNC of your home network from the IMSI. And to know if the MNC
is 2 or 3 digits you need to read bits and pieces from the SIM card.

There is no list of home MCC/MNC stored anyway. What you are talking
about is a preferred list of roaming partners. And that is really not
important since in the end the modem does this all by itself.

However you are right, potentially there could be some kb of roaming
data before you can cut the connection. I have never played with that
since normally I arrive by airplane and put the device into flight mode
during the time when crossing borders.

Regards

Marcel


_______________________________________________
NetworkManager-list mailing list
NetworkManager-list@...
http://mail.gnome.org/mailman/listinfo/networkmanager-list

Re: Does NetworkManager support blocking non-home networks (UMTS/3g)

by Mark Haack-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Dan

if you dont want to fiddle with SIM card file system the pragmatic solution
is to just use a shadow list for the MNC length. In this case you are
independant from
vendors firmware implementations of the generic and/or restricted sim
access.
In gsm-world USA and India are the most common 3 digits MNC countries.
Maybe its a good idea to use 2 digits as default and add USA and India as
exceptions.

<MCCLengthInfo>

 <MCCInfoSet>
   <MCC>310</MCC>
   <MNCLength>3</MNCLength>
 </MCCInfoSet>
...
  <MCCInfoSet>
   <MCC>302</MCC>
   <MNCLength>3</MNCLength>
  </MCCInfoSet>
...
 <MCCInfoSet>
   <MCC>262</MCC>
   <MNCLength>2</MNCLength>
  </MCCInfoSet>
 </MCCLengthInfo>


To control our network just use the PLMN AT Command from 3GPP "+cops".

(a) "+cops?" returns the current network
(b) "+cops=?" return the result of broadcast gsm networks wqith status
(c) "+cops=mode,PLMN" enables you to select a manual network etc.

The implementation of the command slightly differs among implementation of
major device vendors.
In conjuction with 3GPPs "+creg" you can easly build a abstract "gsm network
mode" proxy which reflects the network state of the device, which also
allows the adjustment of the actual roaming partner.

best regards
Mark

----- Original Message -----
From: "Marcel Holtmann" <marcel@...>
To: "Dan Williams" <dcbw@...>
Cc: <networkmanager-list@...>
Sent: Wednesday, November 18, 2009 9:12 AM
Subject: Re: Does NetworkManager support blocking non-home networks
(UMTS/3g)


> Hi Dan,
>
>> > > > > > I can't seem to find it in the GUI or in the documentation.
>> > > > > >
>> > > > > > Can NetworkManager be configured to only connect to home
>> > > > > > networks? Say I
>> > > > > > am on Vodafone and get free data usage, but then move to an
>> > > > > > area with
>> > > > > > poor signal for Vodafone, can I prevent switching to T-Mobile
>> > > > > > which
>> > > > > > costs me money?
>> > > > > >
>> > > > > > If yes, can this be determined automatically, or is this done
>> > > > > > with a
>> > > > > > string match?
>> > > > >
>> > > > > For cards where we actually know the commands for controlling
>> > > > > roaming,
>> > > > > yes we can do this, otherwise NM will need to send the specific
>> > > > > MCC/MNC
>> > > > > of your operator to the modem, which has its own problems.  This
>> > > > > is
>> > > > > definitely going to be fixed in the near future, but there's no
>> > > > > facility
>> > > > > for doing so now other than entering the MCC/MNC of your operator
>> > > > > into
>> > > > > teh Network entry in the connection editor.
>> > > >
>> > > > what do you mean by this. It makes no sense. Which card can be
>> > > > controlled to roam or not via its firmware. Normally this is all
>> > > > host
>> > > > stack stuff.
>> > >
>> > > Yeah, seems that's mostly CDMA cards right now.  My bad.
>> >
>> > so with CDMA cards you can actually tell them to allow roaming or not?
>> > If so, do you get notifications when it does.
>> >
>> > > > You get the current MCC/MNC from the network notifications and your
>> > > > home
>> > > > network is part of the IMSI. Only trick part with the IMSI is that
>> > > > you
>> > > > have to check first if the MNC is two or three digits long. That
>> > > > value
>> > > > is stored somewhere in the SIM card.
>> > >
>> > > Does that mean talking directly to the SIM to find out the MNC
>> > > length?
>> > > There's boatloads of networks with 3-digit MNC (americas and India
>> > > mostly) so it would completely suck if you couldn't tell just from
>> > > the
>> > > MNC.
>> >
>> > Actually you really can't tell it by just looking at the IMSI. In oFono
>> > we have to do some heavy lifting to get this information out of the SIM
>> > card. And it is the only way to find the home network that actually
>> > issued your SIM card (at least to me knowledge).
>>
>> So when you say stack-side, you mean that the modem controller has to
>> detach the PDP context (or otherwise terminate the data connection) when
>> it gets an unsolicited update that the modem has roamed to a cell that
>> doesn't have the home MCC/MNC?
>
> for the data connections you have to use CGREG and it will tell you when
> you are roaming. GSM does support seamless handover between home and
> roaming networks.
>
> However remember that your voice network can be still your home network
> while your data network is already roaming and vice versa. Will not
> happen that often, but potentially possible.
>
>> If that's the case, that sucks.  Because often networks will have quite
>> a few MCC/MNCs that the device can roam to (including most US and Indian
>> carriers).  I assume all the "home" MCC/MNCs are stored somewhere on the
>> SIM then?  Couldn't that lead to the at least a Kb or so of roaming
>> traffic before the stack notices the update and terminates the
>> connection?
>
> I think you misunderstood me here. With CGREG you always get the current
> network. However when you are roaming and you wanna know what is your
> home network (for the device setup for example), then you have to get
> the MCC/MNC of your home network from the IMSI. And to know if the MNC
> is 2 or 3 digits you need to read bits and pieces from the SIM card.
>
> There is no list of home MCC/MNC stored anyway. What you are talking
> about is a preferred list of roaming partners. And that is really not
> important since in the end the modem does this all by itself.
>
> However you are right, potentially there could be some kb of roaming
> data before you can cut the connection. I have never played with that
> since normally I arrive by airplane and put the device into flight mode
> during the time when crossing borders.
>
> Regards
>
> Marcel
>
>
> _______________________________________________
> NetworkManager-list mailing list
> NetworkManager-list@...
> http://mail.gnome.org/mailman/listinfo/networkmanager-list
>

_______________________________________________
NetworkManager-list mailing list
NetworkManager-list@...
http://mail.gnome.org/mailman/listinfo/networkmanager-list

Re: Does NetworkManager support blocking non-home networks (UMTS/3g)

by Dan Williams :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, 2009-11-18 at 10:30 +0100, Mark Haack wrote:

> Hi Dan
>
> if you dont want to fiddle with SIM card file system the pragmatic solution
> is to just use a shadow list for the MNC length. In this case you are
> independant from
> vendors firmware implementations of the generic and/or restricted sim
> access.
> In gsm-world USA and India are the most common 3 digits MNC countries.
> Maybe its a good idea to use 2 digits as default and add USA and India as
> exceptions.

We have such a list which I try to update pretty frequently:

http://git.gnome.org/cgit/mobile-broadband-provider-info/

any additional information greatly appreciated :)

> <MCCLengthInfo>
>
>  <MCCInfoSet>
>    <MCC>310</MCC>
>    <MNCLength>3</MNCLength>
>  </MCCInfoSet>
> ...
>   <MCCInfoSet>
>    <MCC>302</MCC>
>    <MNCLength>3</MNCLength>
>   </MCCInfoSet>
> ...
>  <MCCInfoSet>
>    <MCC>262</MCC>
>    <MNCLength>2</MNCLength>
>   </MCCInfoSet>
>  </MCCLengthInfo>
>
>
> To control our network just use the PLMN AT Command from 3GPP "+cops".
>
> (a) "+cops?" returns the current network
> (b) "+cops=?" return the result of broadcast gsm networks wqith status
> (c) "+cops=mode,PLMN" enables you to select a manual network etc.

That's currently what ModemManager and NM will do when you plug the
specific MCC/MNC into the "Network:" box in the connection editor.  They
will use COPS to lock the card to a specific MCC/MNC as you point out.

> The implementation of the command slightly differs among implementation of
> major device vendors.
> In conjuction with 3GPPs "+creg" you can easly build a abstract "gsm network
> mode" proxy which reflects the network state of the device, which also
> allows the adjustment of the actual roaming partner.

Yeah, NM/MM do most of that already.  But the problem here is that you
can't just tell the card to terminate the PDP context when it detects
roaming (when the unsolicited registration status reports 5) so we may
have a bit of a roaming data window.

DAn

> best regards
> Mark
>
> ----- Original Message -----
> From: "Marcel Holtmann" <marcel@...>
> To: "Dan Williams" <dcbw@...>
> Cc: <networkmanager-list@...>
> Sent: Wednesday, November 18, 2009 9:12 AM
> Subject: Re: Does NetworkManager support blocking non-home networks
> (UMTS/3g)
>
>
> > Hi Dan,
> >
> >> > > > > > I can't seem to find it in the GUI or in the documentation.
> >> > > > > >
> >> > > > > > Can NetworkManager be configured to only connect to home
> >> > > > > > networks? Say I
> >> > > > > > am on Vodafone and get free data usage, but then move to an
> >> > > > > > area with
> >> > > > > > poor signal for Vodafone, can I prevent switching to T-Mobile
> >> > > > > > which
> >> > > > > > costs me money?
> >> > > > > >
> >> > > > > > If yes, can this be determined automatically, or is this done
> >> > > > > > with a
> >> > > > > > string match?
> >> > > > >
> >> > > > > For cards where we actually know the commands for controlling
> >> > > > > roaming,
> >> > > > > yes we can do this, otherwise NM will need to send the specific
> >> > > > > MCC/MNC
> >> > > > > of your operator to the modem, which has its own problems.  This
> >> > > > > is
> >> > > > > definitely going to be fixed in the near future, but there's no
> >> > > > > facility
> >> > > > > for doing so now other than entering the MCC/MNC of your operator
> >> > > > > into
> >> > > > > teh Network entry in the connection editor.
> >> > > >
> >> > > > what do you mean by this. It makes no sense. Which card can be
> >> > > > controlled to roam or not via its firmware. Normally this is all
> >> > > > host
> >> > > > stack stuff.
> >> > >
> >> > > Yeah, seems that's mostly CDMA cards right now.  My bad.
> >> >
> >> > so with CDMA cards you can actually tell them to allow roaming or not?
> >> > If so, do you get notifications when it does.
> >> >
> >> > > > You get the current MCC/MNC from the network notifications and your
> >> > > > home
> >> > > > network is part of the IMSI. Only trick part with the IMSI is that
> >> > > > you
> >> > > > have to check first if the MNC is two or three digits long. That
> >> > > > value
> >> > > > is stored somewhere in the SIM card.
> >> > >
> >> > > Does that mean talking directly to the SIM to find out the MNC
> >> > > length?
> >> > > There's boatloads of networks with 3-digit MNC (americas and India
> >> > > mostly) so it would completely suck if you couldn't tell just from
> >> > > the
> >> > > MNC.
> >> >
> >> > Actually you really can't tell it by just looking at the IMSI. In oFono
> >> > we have to do some heavy lifting to get this information out of the SIM
> >> > card. And it is the only way to find the home network that actually
> >> > issued your SIM card (at least to me knowledge).
> >>
> >> So when you say stack-side, you mean that the modem controller has to
> >> detach the PDP context (or otherwise terminate the data connection) when
> >> it gets an unsolicited update that the modem has roamed to a cell that
> >> doesn't have the home MCC/MNC?
> >
> > for the data connections you have to use CGREG and it will tell you when
> > you are roaming. GSM does support seamless handover between home and
> > roaming networks.
> >
> > However remember that your voice network can be still your home network
> > while your data network is already roaming and vice versa. Will not
> > happen that often, but potentially possible.
> >
> >> If that's the case, that sucks.  Because often networks will have quite
> >> a few MCC/MNCs that the device can roam to (including most US and Indian
> >> carriers).  I assume all the "home" MCC/MNCs are stored somewhere on the
> >> SIM then?  Couldn't that lead to the at least a Kb or so of roaming
> >> traffic before the stack notices the update and terminates the
> >> connection?
> >
> > I think you misunderstood me here. With CGREG you always get the current
> > network. However when you are roaming and you wanna know what is your
> > home network (for the device setup for example), then you have to get
> > the MCC/MNC of your home network from the IMSI. And to know if the MNC
> > is 2 or 3 digits you need to read bits and pieces from the SIM card.
> >
> > There is no list of home MCC/MNC stored anyway. What you are talking
> > about is a preferred list of roaming partners. And that is really not
> > important since in the end the modem does this all by itself.
> >
> > However you are right, potentially there could be some kb of roaming
> > data before you can cut the connection. I have never played with that
> > since normally I arrive by airplane and put the device into flight mode
> > during the time when crossing borders.
> >
> > Regards
> >
> > Marcel
> >
> >
> > _______________________________________________
> > NetworkManager-list mailing list
> > NetworkManager-list@...
> > http://mail.gnome.org/mailman/listinfo/networkmanager-list
> >
>

_______________________________________________
NetworkManager-list mailing list
NetworkManager-list@...
http://mail.gnome.org/mailman/listinfo/networkmanager-list

Re: Does NetworkManager support blocking non-home networks (UMTS/3g)

by Mark Haack-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi

----- Original Message -----
From: "Dan Williams" <dcbw@...>
To: "Mark Haack" <Mark.Haack@...>
Cc: "Marcel Holtmann" <marcel@...>; <networkmanager-list@...>
Sent: Wednesday, November 18, 2009 7:39 PM
Subject: Re: Does NetworkManager support blocking non-home networks
(UMTS/3g)


> On Wed, 2009-11-18 at 10:30 +0100, Mark Haack wrote:
>> Hi Dan
>>
>> if you dont want to fiddle with SIM card file system the pragmatic
>> solution
>> is to just use a shadow list for the MNC length. In this case you are
>> independant from
>> vendors firmware implementations of the generic and/or restricted sim
>> access.
>> In gsm-world USA and India are the most common 3 digits MNC countries.
>> Maybe its a good idea to use 2 digits as default and add USA and India as
>> exceptions.
>
> We have such a list which I try to update pretty frequently:
>
> http://git.gnome.org/cgit/mobile-broadband-provider-info/
>
> any additional information greatly appreciated :)
>
Good to know, it really includes "everything". I would prefer a more
decomposed version, with i.e. separated countries, broadband networks and
access point settings, but it is good to have such a great base.

>> <MCCLengthInfo>
>>
>>  <MCCInfoSet>
>>    <MCC>310</MCC>
>>    <MNCLength>3</MNCLength>
>>  </MCCInfoSet>
>> ...
>>   <MCCInfoSet>
>>    <MCC>302</MCC>
>>    <MNCLength>3</MNCLength>
>>   </MCCInfoSet>
>> ...
>>  <MCCInfoSet>
>>    <MCC>262</MCC>
>>    <MNCLength>2</MNCLength>
>>   </MCCInfoSet>
>>  </MCCLengthInfo>
>>
>>
>> To control our network just use the PLMN AT Command from 3GPP "+cops".
>>
>> (a) "+cops?" returns the current network
>> (b) "+cops=?" return the result of broadcast gsm networks wqith status
>> (c) "+cops=mode,PLMN" enables you to select a manual network etc.
>
> That's currently what ModemManager and NM will do when you plug the
> specific MCC/MNC into the "Network:" box in the connection editor.  They
> will use COPS to lock the card to a specific MCC/MNC as you point out.
>
>> The implementation of the command slightly differs among implementation
>> of
>> major device vendors.
>> In conjuction with 3GPPs "+creg" you can easly build a abstract "gsm
>> network
>> mode" proxy which reflects the network state of the device, which also
>> allows the adjustment of the actual roaming partner.
>
> Yeah, NM/MM do most of that already.  But the problem here is that you
> can't just tell the card to terminate the PDP context when it detects
> roaming (when the unsolicited registration status reports 5) so we may
> have a bit of a roaming data window.

I guess it should be vice versa. First I would read the IMSI. Than just
lookup in the plmn db to determine the right HPLMN.
I dont now, but if there is a checkbox in the UI like "Disable Roaming
Charges" then it could be used to force the attach to HPLMN with
AT+COPS=1,2,"[PLMN]". After that you should not notice roaming charges at
all. Only after that a pdp context should be activated.
If someone builds this checkbox, it could only be a true solution, if there
is also a reminder "window" that says that automatic roaming attach is not
working due to this activated option.

Mark

>
> DAn
>
>> best regards
>> Mark
>>
>> ----- Original Message -----
>> From: "Marcel Holtmann" <marcel@...>
>> To: "Dan Williams" <dcbw@...>
>> Cc: <networkmanager-list@...>
>> Sent: Wednesday, November 18, 2009 9:12 AM
>> Subject: Re: Does NetworkManager support blocking non-home networks
>> (UMTS/3g)
>>
>>
>> > Hi Dan,
>> >
>> >> > > > > > I can't seem to find it in the GUI or in the documentation.
>> >> > > > > >
>> >> > > > > > Can NetworkManager be configured to only connect to home
>> >> > > > > > networks? Say I
>> >> > > > > > am on Vodafone and get free data usage, but then move to an
>> >> > > > > > area with
>> >> > > > > > poor signal for Vodafone, can I prevent switching to
>> >> > > > > > T-Mobile
>> >> > > > > > which
>> >> > > > > > costs me money?
>> >> > > > > >
>> >> > > > > > If yes, can this be determined automatically, or is this
>> >> > > > > > done
>> >> > > > > > with a
>> >> > > > > > string match?
>> >> > > > >
>> >> > > > > For cards where we actually know the commands for controlling
>> >> > > > > roaming,
>> >> > > > > yes we can do this, otherwise NM will need to send the
>> >> > > > > specific
>> >> > > > > MCC/MNC
>> >> > > > > of your operator to the modem, which has its own problems.
>> >> > > > > This
>> >> > > > > is
>> >> > > > > definitely going to be fixed in the near future, but there's
>> >> > > > > no
>> >> > > > > facility
>> >> > > > > for doing so now other than entering the MCC/MNC of your
>> >> > > > > operator
>> >> > > > > into
>> >> > > > > teh Network entry in the connection editor.
>> >> > > >
>> >> > > > what do you mean by this. It makes no sense. Which card can be
>> >> > > > controlled to roam or not via its firmware. Normally this is all
>> >> > > > host
>> >> > > > stack stuff.
>> >> > >
>> >> > > Yeah, seems that's mostly CDMA cards right now.  My bad.
>> >> >
>> >> > so with CDMA cards you can actually tell them to allow roaming or
>> >> > not?
>> >> > If so, do you get notifications when it does.
>> >> >
>> >> > > > You get the current MCC/MNC from the network notifications and
>> >> > > > your
>> >> > > > home
>> >> > > > network is part of the IMSI. Only trick part with the IMSI is
>> >> > > > that
>> >> > > > you
>> >> > > > have to check first if the MNC is two or three digits long. That
>> >> > > > value
>> >> > > > is stored somewhere in the SIM card.
>> >> > >
>> >> > > Does that mean talking directly to the SIM to find out the MNC
>> >> > > length?
>> >> > > There's boatloads of networks with 3-digit MNC (americas and India
>> >> > > mostly) so it would completely suck if you couldn't tell just from
>> >> > > the
>> >> > > MNC.
>> >> >
>> >> > Actually you really can't tell it by just looking at the IMSI. In
>> >> > oFono
>> >> > we have to do some heavy lifting to get this information out of the
>> >> > SIM
>> >> > card. And it is the only way to find the home network that actually
>> >> > issued your SIM card (at least to me knowledge).
>> >>
>> >> So when you say stack-side, you mean that the modem controller has to
>> >> detach the PDP context (or otherwise terminate the data connection)
>> >> when
>> >> it gets an unsolicited update that the modem has roamed to a cell that
>> >> doesn't have the home MCC/MNC?
>> >
>> > for the data connections you have to use CGREG and it will tell you
>> > when
>> > you are roaming. GSM does support seamless handover between home and
>> > roaming networks.
>> >
>> > However remember that your voice network can be still your home network
>> > while your data network is already roaming and vice versa. Will not
>> > happen that often, but potentially possible.
>> >
>> >> If that's the case, that sucks.  Because often networks will have
>> >> quite
>> >> a few MCC/MNCs that the device can roam to (including most US and
>> >> Indian
>> >> carriers).  I assume all the "home" MCC/MNCs are stored somewhere on
>> >> the
>> >> SIM then?  Couldn't that lead to the at least a Kb or so of roaming
>> >> traffic before the stack notices the update and terminates the
>> >> connection?
>> >
>> > I think you misunderstood me here. With CGREG you always get the
>> > current
>> > network. However when you are roaming and you wanna know what is your
>> > home network (for the device setup for example), then you have to get
>> > the MCC/MNC of your home network from the IMSI. And to know if the MNC
>> > is 2 or 3 digits you need to read bits and pieces from the SIM card.
>> >
>> > There is no list of home MCC/MNC stored anyway. What you are talking
>> > about is a preferred list of roaming partners. And that is really not
>> > important since in the end the modem does this all by itself.
>> >
>> > However you are right, potentially there could be some kb of roaming
>> > data before you can cut the connection. I have never played with that
>> > since normally I arrive by airplane and put the device into flight mode
>> > during the time when crossing borders.
>> >
>> > Regards
>> >
>> > Marcel
>> >
>> >
>> > _______________________________________________
>> > NetworkManager-list mailing list
>> > NetworkManager-list@...
>> > http://mail.gnome.org/mailman/listinfo/networkmanager-list
>> >
>>
>
>

_______________________________________________
NetworkManager-list mailing list
NetworkManager-list@...
http://mail.gnome.org/mailman/listinfo/networkmanager-list