Request - data counter clearance on schedule

Hey, I know it took us years to get this at all, months (few OS releases) to work reliably.
But I would really appreciate if we could have an automatic clearance on schedule (I guess mostly used is fixed day of month or also all 4 weeks).
This should be individually configurable.

I personally will be fine with a self-made cron job and a self-written custom script that clears the data counters, like I’ve done with sim-switcher.
But therefore I need to know where the current values for the data counters are stored!
@jolla could you please assist and tell us where this info is stored?
(on N900 this was under gconf /system/osso/connectivity/network_type/GPRS/…)

9 Likes

There was a similar function under Samsung Bada, where the data counter would be reseted on a specific date. A really nice and helpfull function, specially if you need to know how much mobile data you used. I would strongly support such a function, and this should not be that hard to implement :slight_smile:

But I want to have the old values around to inspect at least once…

1 Like

Yes, sure. As said:

This should be individually configurable.

Perfect for that kind of request would be even history (whereas I assume this would need more effort).

Okay,
I went ahead and found the location of information.
The qml code of settings applet
/usr/share/jolla-settings/pages/datacounters/mainpage.qml
was not really helpful, more misleading…

Here is info storage location, e.g.:
/home/.system/var/lib/connman/cellular_*_context1/stats.home
but unfortunately someone decided to use a binary/hex coded transformation would fit better?
So there is no chance to script something together on our own. And we need to wait for @Jolla to either implement or help us here.

1 Like

I often change SIM cards, and there I saw that the displayed counter value changes on SIM card change. Can it be that the data counter is stored on the SIM card?

An automatic counter reset should be triggered by new month or at the xth of every month - this depends of the date of month, when the mobile provider bills the data usage - and not every 4 weeks.

An easy accessible history should be stored in the phone, linked with the SIM card number and/or name. E.g. in a text file located in /home/nemo/counter (as a suggestion). It woukd be fine if it would be apparent, with what SIM number, SIM name and period of time data volume was consumed.

I often change SIM cards if I travel around in several countries, and not only on month change. The SIM 1, that is easier to change, is my travel card and the SIM 2, that is less easy to change, is my home country SIM card.

No.
Please take a look at the location I gave above and you will notice that for every used SIM card you will find one directory with the IMSI of the card (instead *).

I an personally fine with a specific date. But there are prepaid providers that do exactly that. Cancelling or renewing after exactly 4 weeks, not on a date. Therefore I added that,

This is what I wanted to script but no chance without knowing how to decode the binary representation of the statistic.

1 Like

This is very interesting, I didn’t know that. Would explain some strange behavior of my Hungarian SIM card. Thank you for information!

connman is open source, so all of the necessary information is out there. It’s c structs mmapped to a file, so scripting might be a bit difficult. Writing a small tool in c to print the information should be quite trivial.

3 Likes

Just for reference in the past there were attempts to solve this issue:

1 Like

I only just saw this thread after @martonmiklos bumped it, so sorry for coming to this late. Rather than manipulating the data directly, one possibility (if I’ve understood the problem correctly) would be to use the NetworkDataCounter class of the MDM framework, specifically the NetworkDataCounter::resetCounter() method. More info here:

3 Likes