Determine modem uptime
aleksandermj at chromium.org
Mon Oct 10 08:17:43 UTC 2022
> Is there a libmm-glib/ DBus/ command-line API to find out how long a modem has been powered on for? Or any other way I might find that information on a debian system?
> I ask because I'm working on the Ammonit Meteo-40 data logger which uses a hardware switch to power cycle the modem regularly. Sometimes it's not configured correctly, so the modem remains powered all the time, which can lead to reliability issues. I'd like to be able to identify that case remotely.
There is no uptime reported by MM itself for a given modem object..
But a way to detect whether that regular power cycle is working or not
could be to look at the DBus modem id, because that should be bumped
every time the modem is reseted. E.g. modem starts at id 0, gets
rebooted and is exposed at id 1, gets rebooted and is exposed at id 2,
and so on.
More information about the ModemManager-devel