Finally got the answer!
In c++ use libnm-glib to act on dbus proxy. From command line use..
gdbus call --system --dest org.freedesktop.ModemManager --object-path /org/freedesktop/ModemManager/Modems/0 --method org.freedesktop.ModemManager.Modem.Gsm.Network.GetSignalQuality
gives u the signal strength of gsm modem.
Quote:
If MM says it cannot get signal quality while connected, it's because there is only one AT port for all command and data. So when the AT port is connected, no AT commands can be sent to gather signal quality. You'll need to either get a better modem with more AT ports, or switch to a non-AT modem, like a QMI or MBIM powered one. -- Aleksander Morgado
|
One can listen to org.freedesktop.ModemManager.Modem.Gsm.Network.GetSignalQuality signal using
gdbus monitor --system --dest org.freedesktop.NetworkManager --object-path /org/freedesktop/NetworkManager/Modems/0
Quote:
Q. Does the proxy signals everytime there is a change in signal strength asynchonously or ModemManager polls modem periodically to get signal quality?
A. That depends on the modem being used; if the modem supports unsolicited quality change indications, we'll use them; otherwise MM will poll every 30s for signal quality values. The property values in the interface will be updated once we get the new values (more or less). -- Aleksander Morgado
|