[review] New key-value output in mmcli
Aleksander Morgado
aleksander at aleksander.es
Fri Nov 9 17:31:23 UTC 2018
Hey,
>
> > See this MR: https://gitlab.freedesktop.org/mobile-broadband/ModemMan
> > ager/merge_requests/51
> >
> > This enables a new "-K" (or longer, "--output-keyvalue") that allows
> > all operations that print some kind of modem info (e.g. modem list,
> > modem info, sim info, bearer info, sms info, 3gpp scan...) to be
> > dumped in a simple "key-value" pair format.
> >
> > Along with these changes, I've also made some additional changes:
> > deprecating ListBearers() method and removing the redundant
> > --simple-status and --location-get-XXX actions.
> >
> > Worth noting: the original human-friendly output is more or less
> > maintained but it is NOT equal to the old one. Applications (e.g. the
> > openwrt integration) that were parsing that original output should
> > switch to the new key-value pair output.
>
> Do you have a before/after example of the tabular output?
>
Attached
--
Aleksander
https://aleksander.es
-------------- next part --------------
$ mmcli -L
/org/freedesktop/ModemManager1/Modem/0 [Fibocom Wireless Inc.] L850-GL
$ mmcli -m 0
--------------------------
General | dbus path: /org/freedesktop/ModemManager1/Modem/0
| device id: 27029242494d4c7df37f1168df12e20ef796fb78
--------------------------
Hardware | manufacturer: Fibocom Wireless Inc.
| model: L850-GL
| revision: 18500_ATTAC00CONFIG_R02
| h/w revision: V1.0.4
| supported: gsm-umts, lte
| current: gsm-umts, lte
| equipment id: 863212030078742
--------------------------
System | device: /sys/devices/pci0000:00/0000:00:14.0/usb1/1-12/1-12.2
| drivers: cdc_acm, cdc_mbim
| plugin: Fibocom
| primary port: cdc-wdm3
| ports: ttyACM0 (at), wwan0 (net), ttyACM1 (unknown),
| cdc-wdm3 (mbim), ttyACM2 (unknown)
--------------------------
Status | unlock retries: sim-pin2 (3)
| state: registered
| power state: on
| access tech: lte
| signal quality: 22% (recent)
--------------------------
Modes | supported: allowed: 3g; preferred: none
| allowed: 4g; preferred: none
| allowed: 3g, 4g; preferred: none
| allowed: 3g, 4g; preferred: 3g
| allowed: 3g, 4g; preferred: 4g
| current: allowed: 3g, 4g; preferred: 4g
--------------------------
Bands | supported: utran-1, utran-4, utran-5, utran-8, utran-2, eutran-1,
| eutran-2, eutran-3, eutran-4, eutran-5, eutran-7, eutran-8,
| eutran-11, eutran-12, eutran-13, eutran-17, eutran-18, eutran-19,
| eutran-20, eutran-21, eutran-26, eutran-28, eutran-29, eutran-30,
| eutran-38, eutran-39, eutran-40, eutran-41, eutran-66
| current: utran-1, utran-4, utran-5, utran-8, utran-2, eutran-1,
| eutran-2, eutran-3, eutran-4, eutran-5, eutran-7, eutran-8,
| eutran-11, eutran-12, eutran-13, eutran-17, eutran-18, eutran-19,
| eutran-20, eutran-21, eutran-26, eutran-28, eutran-29, eutran-30,
| eutran-38, eutran-39, eutran-40, eutran-41, eutran-66
--------------------------
IP | supported: ipv4, ipv6, ipv4v6
--------------------------
3GPP | imei: 863212030078742
| enabled locks: fixed-dialing
| operator id: 21407
| operator name: Movistar
| registration: home
| eps ue mode: csps-2
--------------------------
SIM | dbus path: /org/freedesktop/ModemManager1/SIM/0
$ mmcli -m 0 -K
modem.dbus-path : /org/freedesktop/ModemManager1/Modem/0
modem.generic.device-identifier : 27029242494d4c7df37f1168df12e20ef796fb78
modem.generic.manufacturer : Fibocom Wireless Inc.
modem.generic.model : L850-GL
modem.generic.revision : 18500_ATTAC00CONFIG_R02
modem.generic.hardware-revision : V1.0.4
modem.generic.supported-capabilities.length : 1
modem.generic.supported-capabilities.value[1] : gsm-umts, lte
modem.generic.current-capabilities.length : 1
modem.generic.current-capabilities.value[1] : gsm-umts, lte
modem.generic.equipment-identifier : 863212030078742
modem.generic.device : /sys/devices/pci0000:00/0000:00:14.0/usb1/1-12/1-12.2
modem.generic.drivers.length : 2
modem.generic.drivers.value[1] : cdc_acm
modem.generic.drivers.value[2] : cdc_mbim
modem.generic.plugin : Fibocom
modem.generic.primary-port : cdc-wdm3
modem.generic.ports.length : 5
modem.generic.ports.value[1] : ttyACM0 (at)
modem.generic.ports.value[2] : wwan0 (net)
modem.generic.ports.value[3] : ttyACM1 (unknown)
modem.generic.ports.value[4] : cdc-wdm3 (mbim)
modem.generic.ports.value[5] : ttyACM2 (unknown)
modem.generic.own-numbers : --
modem.generic.unlock-required : --
modem.generic.unlock-retries.length : 1
modem.generic.unlock-retries.value[1] : sim-pin2 (3)
modem.generic.state : registered
modem.generic.state-failed-reason : --
modem.generic.power-state : on
modem.generic.access-technologies.length : 1
modem.generic.access-technologies.value[1] : lte
modem.generic.signal-quality.value : 22
modem.generic.signal-quality.recent : yes
modem.generic.supported-modes.length : 5
modem.generic.supported-modes.value[1] : allowed: 3g; preferred: none
modem.generic.supported-modes.value[2] : allowed: 4g; preferred: none
modem.generic.supported-modes.value[3] : allowed: 3g, 4g; preferred: none
modem.generic.supported-modes.value[4] : allowed: 3g, 4g; preferred: 3g
modem.generic.supported-modes.value[5] : allowed: 3g, 4g; preferred: 4g
modem.generic.current-modes : allowed: 3g, 4g; preferred: 4g
modem.generic.supported-bands.length : 29
modem.generic.supported-bands.value[1] : utran-1
modem.generic.supported-bands.value[2] : utran-4
modem.generic.supported-bands.value[3] : utran-5
modem.generic.supported-bands.value[4] : utran-8
modem.generic.supported-bands.value[5] : utran-2
modem.generic.supported-bands.value[6] : eutran-1
modem.generic.supported-bands.value[7] : eutran-2
modem.generic.supported-bands.value[8] : eutran-3
modem.generic.supported-bands.value[9] : eutran-4
modem.generic.supported-bands.value[10] : eutran-5
modem.generic.supported-bands.value[11] : eutran-7
modem.generic.supported-bands.value[12] : eutran-8
modem.generic.supported-bands.value[13] : eutran-11
modem.generic.supported-bands.value[14] : eutran-12
modem.generic.supported-bands.value[15] : eutran-13
modem.generic.supported-bands.value[16] : eutran-17
modem.generic.supported-bands.value[17] : eutran-18
modem.generic.supported-bands.value[18] : eutran-19
modem.generic.supported-bands.value[19] : eutran-20
modem.generic.supported-bands.value[20] : eutran-21
modem.generic.supported-bands.value[21] : eutran-26
modem.generic.supported-bands.value[22] : eutran-28
modem.generic.supported-bands.value[23] : eutran-29
modem.generic.supported-bands.value[24] : eutran-30
modem.generic.supported-bands.value[25] : eutran-38
modem.generic.supported-bands.value[26] : eutran-39
modem.generic.supported-bands.value[27] : eutran-40
modem.generic.supported-bands.value[28] : eutran-41
modem.generic.supported-bands.value[29] : eutran-66
modem.generic.current-bands.length : 29
modem.generic.current-bands.value[1] : utran-1
modem.generic.current-bands.value[2] : utran-4
modem.generic.current-bands.value[3] : utran-5
modem.generic.current-bands.value[4] : utran-8
modem.generic.current-bands.value[5] : utran-2
modem.generic.current-bands.value[6] : eutran-1
modem.generic.current-bands.value[7] : eutran-2
modem.generic.current-bands.value[8] : eutran-3
modem.generic.current-bands.value[9] : eutran-4
modem.generic.current-bands.value[10] : eutran-5
modem.generic.current-bands.value[11] : eutran-7
modem.generic.current-bands.value[12] : eutran-8
modem.generic.current-bands.value[13] : eutran-11
modem.generic.current-bands.value[14] : eutran-12
modem.generic.current-bands.value[15] : eutran-13
modem.generic.current-bands.value[16] : eutran-17
modem.generic.current-bands.value[17] : eutran-18
modem.generic.current-bands.value[18] : eutran-19
modem.generic.current-bands.value[19] : eutran-20
modem.generic.current-bands.value[20] : eutran-21
modem.generic.current-bands.value[21] : eutran-26
modem.generic.current-bands.value[22] : eutran-28
modem.generic.current-bands.value[23] : eutran-29
modem.generic.current-bands.value[24] : eutran-30
modem.generic.current-bands.value[25] : eutran-38
modem.generic.current-bands.value[26] : eutran-39
modem.generic.current-bands.value[27] : eutran-40
modem.generic.current-bands.value[28] : eutran-41
modem.generic.current-bands.value[29] : eutran-66
modem.generic.supported-ip-families.length : 3
modem.generic.supported-ip-families.value[1] : ipv4
modem.generic.supported-ip-families.value[2] : ipv6
modem.generic.supported-ip-families.value[3] : ipv4v6
modem.3gpp.imei : 863212030078742
modem.3gpp.enabled-locks.length : 1
modem.3gpp.enabled-locks.value[1] : fixed-dialing
modem.3gpp.operator-code : 21407
modem.3gpp.operator-name : Movistar
modem.3gpp.registration-state : home
modem.3gpp.eps-ue-mode-operation : csps-2
modem.3gpp.pco : --
modem.cdma.meid : --
modem.cdma.esn : --
modem.cdma.sid : --
modem.cdma.nid : --
modem.cdma.cdma1x-registration-state : --
modem.cdma.evdo-registration-state : --
modem.cdma.activation-state : --
modem.generic.sim : /org/freedesktop/ModemManager1/SIM/0
modem.generic.bearers : --
-------------- next part --------------
$ mmcli -L
Found 1 modems:
/org/freedesktop/ModemManager1/Modem/0 [Fibocom Wireless Inc.] L850-GL
$ mmcli -m 0
/org/freedesktop/ModemManager1/Modem/0 (device id '27029242494d4c7df37f1168df12e20ef796fb78')
-------------------------
Hardware | manufacturer: 'Fibocom Wireless Inc.'
| model: 'L850-GL'
| revision: '18500_ATTAC00CONFIG_R02'
| H/W revision: 'V1.0.4'
| supported: 'gsm-umts, lte'
| current: 'gsm-umts, lte'
| equipment id: '863212030078742'
-------------------------
System | device: '/sys/devices/pci0000:00/0000:00:14.0/usb1/1-12/1-12.2'
| drivers: 'cdc_acm, cdc_mbim'
| plugin: 'Fibocom'
| primary port: 'cdc-wdm3'
| ports: 'ttyACM0 (at), wwan0 (net), ttyACM1 (unknown), cdc-wdm3 (mbim), ttyACM2 (unknown)'
-------------------------
Numbers | own : 'unknown'
-------------------------
Status | lock: 'none'
| unlock retries: 'sim-pin2 (3)'
| state: 'registered'
| power state: 'on'
| access tech: 'lte'
| signal quality: '22' (recent)
-------------------------
Modes | supported: 'allowed: 3g; preferred: none
| allowed: 4g; preferred: none
| allowed: 3g, 4g; preferred: none
| allowed: 3g, 4g; preferred: 3g
| allowed: 3g, 4g; preferred: 4g'
| current: 'allowed: 3g, 4g; preferred: 4g'
-------------------------
Bands | supported: 'utran-1, utran-4, utran-5, utran-8, utran-2, eutran-1, eutran-2, eutran-3, eutran-4, eutran-5, eutran-7, eutran-8, eutran-11, eutran-12, eutran-13, eutran-17, eutran-18, eutran-19, eutran-20, eutran-21, eutran-26, eutran-28, eutran-29, eutran-30, eutran-38, eutran-39, eutran-40, eutran-41, eutran-66'
| current: 'utran-1, utran-4, utran-5, utran-8, utran-2, eutran-1, eutran-2, eutran-3, eutran-4, eutran-5, eutran-7, eutran-8, eutran-11, eutran-12, eutran-13, eutran-17, eutran-18, eutran-19, eutran-20, eutran-21, eutran-26, eutran-28, eutran-29, eutran-30, eutran-38, eutran-39, eutran-40, eutran-41, eutran-66'
-------------------------
IP | supported: 'ipv4, ipv6, ipv4v6'
-------------------------
3GPP | imei: '863212030078742'
| enabled locks: 'fixed-dialing'
| operator id: '21407'
| operator name: 'Movistar'
| subscription: 'unknown'
| registration: 'home'
| EPS UE mode: 'csps-2'
| PCO: 'n/a'
-------------------------
SIM | path: '/org/freedesktop/ModemManager1/SIM/0'
-------------------------
Bearers | paths: 'none'
More information about the ModemManager-devel
mailing list