How do i prevent/stop SFOS from using data from particular SIM?

OS 5.0.0.67, Redmi community port.
Internet is set to use SIM 1.

Roaming is disabled on SIM 2.
Network Mode - not set for SIM 2.

I have data+calls SIM 1 and second roaming SIM without any data bundle(2G ?). SFOS keep on sending 149bytes of GPRS data over second SIM every few hours, which cost me dearly.

How do i prevent/stop SFOS from sending GPRS data over this SIM ?.

On android, we have the option to set mobile data, calls and SMS for specific SIM slots.

Thanks,

1 Like

I’m pretty sure this is possible by going through
Settings => Mobile Network and
Settings => SIM Cards

I currently have only 1 SIM in a 2 SIM phone, but afaics you can

  • tell it which SIM to use for mobile data
  • disallow/disable all sorts of things for the other SIM, up to the point of disabling automatic network selection and choosing an invalid network maybe?
1 Like

Still not resolved, still getting those GPRS data messages.

I have tried SIM 2 on android phone with mobile data disabled, did not get charged for GPRS on SIM 2 till now.

  • SIM 1 = Mobile Network, Network Mode 4G, Roaming Always allow.
  • SIM 2 = Network Mode 2G, Roaming Do not allow, Data access point invalid Access point name provided, Authentication unsupported auth selected.

Any other settings to be done thru CLI ?.

had similar problem even with one sim, prepaid card just for receiving sms and i still got reports that i using mobile data even data was disabled. only 100% solution was to call provider and completely disable data…

Hm. Incidentally I was looking at connman settings recently and noticed this in /etc/connman/main.conf:

...
Ipv4StatusUrl = http://ipv4.jolla.com/return_204
Ipv6StatusUrl = http://ipv6.jolla.com/return_204
...

This behavior can be disabled by adding

...
OnlineCheckMode=none
...

Then systemctl restart connman

If the affected SIM card always shows up as the same interface, maybe also try adding it to NetworkInterfaceBlacklist. But maybe that will disable telephony also?

https://man.archlinux.org/man/connman.conf.5

1 Like

Interesting hypothesis - but it seems unlikely that connman itself would get to use the interface when disabled.

A similar hypothesis would be the IPv6 assignment - where the network assigns you a prefix and you need to handshake the actual address. But even this i find a bit unlikely for an interface that is turned off. Though - on what level is it actually turned of? I.e. what does ifconfig say? (Hidden behind devel-su for some reason - censor ip addresses as desired).

Maybe it is not an OS issue but phone that is “calling home” :). I would create iptables rules to see what is transfered and where:

ptables -N LOG_AND_DROP
iptables -A OUTPUT -o rmnet_data1 -j LOG_AND_DROP
iptables -A LOG_AND_DROP -m limit --limit 1/s -j LOG --log-prefix "Dropped: "
iptables -A LOG_AND_DROP -j DROP

and the same for ipv6 if used. Should it is SFOS issue iptables will help.

OnlineCheckMode=false Is incorrect, The correct option should be

OnlineCheckMode=none

#Ipv4StatusUrl = http://ipv4.jolla.com/return_204
#Ipv6StatusUrl = http://ipv6.jolla.com/return_204

Anyway, adding the above or commenting out “Ipv4 & Ipv6” disables mobile internet, and automatically enable WLAN.

I have not rebooted the phone yet.

Thanks, fixed.

Are you sure? It says in the docs that it will only look like there’s no internet, but it actually works.
Also, I cannot imagine it would automatically enable WLAN then. Sorry, I’m skeptical there.


BTW, commenting out is not the same as disabling. The software might fall back to some default value.
But it’s quite clear that OnlineCheckMode=none supersedes that anyhow, in this case.

Could active VoLTE have anything to do with it?

After rebooting the phone, internet is back. But still the phone sends GPRS messages randomly.

commenting out is not the same as disabling. The software might fall back to some default value.

You may be right about commenting out.

There is no VoLTE for SIM 2, And for SIM 1, i don’t know the settings, on android SIM 1 VoLTE is automatically activated.

You said that in your first post, too. How do you know what actually happens there? Logs?

On SFOS, I get Service message with details for SIM 2, as there is no data plan.

When I was using this SIM on a feature phone with GPRS disabled and on android with data disabled, had no issues.

Since this behaviour is only when the SIM is on SFOS, we can conclude SFOS or some app installed is responsible.

I don’t know where and what to look for in logs.