Hi,
I am working on a slightly customized firmware for the TrackerOne and I would like to be able to measure precisely the data consumption over one hour or one day so I can extrapolate it to one month and estimate my data usage. I want to be able to repeat this experiment as I make changes to the code.
This is what I have tried:
-
The SIM dashboard takes at least 48hours to reflect data usage which makes debugging/optimization very impractical.
-
The
Celullar::getDataUsage()
API always returns 0
CellularData cellularData;
FuelGauge fuel;
Cellular.getDataUsage(cellularData);
Log.info("Data usage: TX Session: %i TX Total: %i RX Session: %i RX Total: %i - Battery: %.2f", cellularData.tx_session, cellularData.tx_total, cellularData.rx_session, cellularData.rx_total, 100 * fuel.getSoC());
Output:
0062902105 [app] INFO: Data usage: TX Session: 0 TX Total: 0 RX Session: 0 RX Total: 0 - Battery: 8237.89
(even though the tracker is connected and has been sending data for a while).
Is there any other way to debug/measure data usage in development?
thanks,
thomas