ModemManager: mmcli get signal strength

HyperDevil picture HyperDevil · Mar 27, 2017 · Viewed 11k times · Source

I am unable to retrieve the signal strength on a Sierre Wireless MC7304.
Also sending an AT command via mmcli does not seem to work.

:~ $ sudo mmcli -m /org/freedesktop/ModemManager1/Modem/0 --signal-get
 error: modem has no extended signal capabilities

:~ $ sudo mmcli -m /org/freedesktop/ModemManager1/Modem/0 --command=AT+CSQ
error: command failed: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Unauthorized: Cannot send AT command to modem: operation only allowed in debug mode'


/org/freedesktop/ModemManager1/Modem/0 (device id 
'dd26a5483d051c6e25a7ca10f4d36a94791c7ebf')
-------------------------
Hardware |   manufacturer: 'Sierra Wireless, Incorporated'
       |          model: 'MC7304'
       |       revision: 'SWI9X15C_05.05.16.02 r21040 carmd-fwbuild1 
2014/03/17 23:49:48'
       |      supported: 'gsm-umts, lte'
       |        current: 'gsm-umts, lte'
       |   equipment id: 'unknown'
 -------------------------
  System   |         device: 
'/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5'
       |        drivers: 'qmi_wwan, qcserial'
       |         plugin: 'Gobi'
       |   primary port: 'ttyUSB2'
       |          ports: 'ttyUSB0 (qcdm), ttyUSB2 (at), wwan0 (net), 
wwan1 (net)'
-------------------------
 Numbers  |           own : 'unknown'
 -------------------------
 Status   |           lock: 'none'
       | unlock retries: 'unknown'
       |          state: 'connected'
       |    power state: 'on'
       |    access tech: 'lte'
       | signal quality: '0' (recent)
 -------------------------
 Modes    |      supported: 'allowed: 2g, 3g, 4g; preferred: none'
       |        current: 'allowed: 2g, 3g, 4g; preferred: none'
 -------------------------
 Bands    |      supported: 'unknown'
       |        current: 'unknown'
 -------------------------
 IP       |      supported: 'ipv4, ipv6, ipv4v6'
 -------------------------
 3GPP     |           imei: 'unknown'
       |  enabled locks: 'none'
       |    operator id: 'hidden'
       |  operator name: 'hidden'
       |   subscription: 'unknown'
       |   registration: 'home'
 -------------------------
 SIM      |           path: '/org/freedesktop/ModemManager1/SIM/0'

 -------------------------
  Bearers  |          paths: '/org/freedesktop/ModemManager1/Bearer/0'

When using the modem inside for example an Mikrotik 922 card i seem to get the signal strength just fine.
I am using mmcli version: 1.4.0-1 and Kernel 4.450 on a raspberry pi.

Answer

Aleksander picture Aleksander · May 31, 2017

Several issues here:

The modem wasn't properly detected as a QMI modem by ModemManager (see that there is no cdc-wdm port listed in the Ports section output of mmcli). Being this a custom system, you need to make sure that the kernel USB cdc-wdm driver is built and installed, otherwise you won't be able to use the QMI mode as there won't be any /dev/cdc-wdm port to probe

You were not able to run AT commands via mmcli --command because that operation is only allowed when the ModemManager daemon runs in --debug mode. This is a command that developers use to run quick checks on the modem during development, not supported for general users.

You are seeing a signal quality equal to 0 in the mmcli output because ModemManager had only one AT port to use (ttyUSB2) and if that was connected (with PPP) there was no way to refresh the quality. If you used the modem in QMI mode you wouldn't be using PPP at all over the TTY.

Replying to the other answer in this question: ModemManager of course supports signal quality retrieval in QMI modems! Actually, the special Signal interface (which provides more detailed signal quality values, like access technology specific items) was originally developed only for QMI modems themselves.