3

I have setup a gsm connection through network manager (USB dongle, raspberry pi). It connects and works fine by managing it with nmcli.

What I would like to see is the signal strength so that I can decide what the best spot is to put the modem/computer. How is it possible to see it on CLI? I have been unable to get this piece of data with nmcli or mmcli.

Update: Signal is provided as part of output on mmcli:

  Status   |           lock: 'none'
           | unlock retries: 'sim-pin (3), sim-pin2 (0), sim-puk (10), sim-puk2 (10)'
           |          state: 'connected'
           |    power state: 'on'
           |    access tech: 'umts'
           | signal quality: '51' (recent)
eftshift0
  • 555
  • 4
  • 13

1 Answers1

3

GSM modems can be controlled by a number of different protocols. Because of this, NetworkManager uses a second component called ModemManager to interface with them.

On my system, I can do this:

$ mmcli -L
    /org/freedesktop/ModemManager1/Modem/0 [Sierra Wireless, Incorporated] EM7455

From here, I see that the current modem number is 0.

To query the status of the modem, just specify the -m option to select the modem you wish to query:

$ mmcli -m 0
  --------------------------------
  General  |            dbus path: /org/freedesktop/ModemManager1/Modem/0
           |            device id: <redacted>
  --------------------------------
  Hardware |         manufacturer: Sierra Wireless, Incorporated
           |                model: EM7455
[...various information omitted ...]
  --------------------------------
  Status   |                 lock: sim-pin2
           |       unlock retries: sim-pin (3), sim-pin2 (3), sim-puk (10), sim-puk2 (10)
           |                state: registered
           |          power state: on
           |          access tech: umts
           |       signal quality: 59% (recent)
  --------------------------------
[...more information...]

Depending of the model of your GSM modem, you may also be able to set up extended signal information reporting:

$ mmcli -m 0 --signal-get
  ----------------------
  Signal | refresh rate: 0 seconds

$ mmcli -m 0 --signal-setup=10
Successfully setup extended signal information retrieval

$ mmcli -m 0 --signal-get
  ----------------------
  Signal | refresh rate: 10 seconds
  ----------------------
  UMTS   |         rssi: -77.00 dBm
         |         ecio: -3.50 dB
telcoM
  • 87,318
  • 3
  • 112
  • 232
  • I think I was not able to see that kind of information with mmcli. But I will test it using your examples in a couple of hours. Hold your breath.... and thanks – eftshift0 May 14 '20 at 12:40
  • The available information depends on the model of the modem you have, and the protocol(s) it supports. – telcoM May 14 '20 at 17:41
  • Interesting. mmcli does provide the information and I hadn't noticed... as part of "Status" (updated my question)... if I use --signal-get, the modems (I have a huawei and a ZTE) I was not able to see it. Marking it as the right response, anyway. Thanks! – eftshift0 May 15 '20 at 02:41
  • just to add to @telcoM's answer here, adding the using `mmcli --help-all` will give you lots of other useful options specifically `-K` attriibute, which returns the data back in key value format (much easier for processing and cherry picking specific values) – Ash Jan 26 '21 at 05:00