packages
packages copied to clipboard
modemmanager: add missing ubus status backend via mmcli
Maintainer: me @mips171 @aleksander0m Compile tested: not needed only script changes Run tested: x86_64, APU3, OpenWrt latest, tests done)
Description: The 'modemmanager' uses the 'dbus'. Status information can be retrieved with the 'mmcli' command, this can also be output in json format.
This commit adds a new 'ubus' backend with which this information can be easily accessed via ubus.
root@G3-10940 ~ # ubus call modemmanager info
{
"modem": [
{
"imsi": "262029915879434",
"operator": "Vodafone.de",
"technology": "lte",
"device": "Modem1",
"iccid": "89492099166029838939",
"imei": "861107037891430",
"signal": "47"
}
]
}
root@G3-10940 ~ # ubus call modemmanager status
{
"modem": [
{
"cdma": {
"evdo-registration-state": "--",
"cdma1x-registration-state": "--",
"activation-state": "--",
"esn": "--",
"meid": "--",
"nid": "--",
"sid": "--"
},
"generic": {
"current-bands": [
"egsm",
"dcs",
"utran-1",
"utran-5",
"utran-8",
"eutran-1",
"eutran-3",
"eutran-5",
"eutran-7",
"eutran-8",
"eutran-20",
"eutran-38",
"eutran-40",
"eutran-41"
],
"signal-quality": {
"recent": "yes",
"value": "0"
},
"primary-port": "cdc-wdm0",
"equipment-identifier": "861107037891430",
"manufacturer": "QUALCOMM INCORPORATED",
"drivers": [
"qmi_wwan",
"option1"
],
"revision": "EC25EFAR02A08M4G",
"physdev": "/sys/devices/pci0000:00/0000:00:13.0/usb2/2-1/2-1.3",
"device": "Modem1",
"supported-modes": [
"allowed: 2g; preferred: none",
"allowed: 3g; preferred: none",
"allowed: 4g; preferred: none",
"allowed: 2g, 3g; preferred: 3g",
"allowed: 2g, 3g; preferred: 2g",
"allowed: 2g, 4g; preferred: 4g",
"allowed: 2g, 4g; preferred: 2g",
"allowed: 3g, 4g; preferred: 4g",
"allowed: 3g, 4g; preferred: 3g",
"allowed: 2g, 3g, 4g; preferred: 4g",
"allowed: 2g, 3g, 4g; preferred: 3g",
"allowed: 2g, 3g, 4g; preferred: 2g"
],
"plugin": "quectel",
"model": "QUECTEL Mobile Broadband Module",
"primary-sim-slot": "--",
"unlock-required": "--",
"state-failed-reason": "sim-missing",
"device-identifier": "a1e87e7fec94ad3d4cb750b434dc9ffc8a3699b3",
"current-capabilities": [
"gsm-umts, lte"
],
"carrier-configuration": "default",
"power-state": "on",
"bearers": {
},
"unlock-retries": {
},
"ports": [
"cdc-wdm0 (qmi)",
"ttyUSB0 (ignored)",
"ttyUSB1 (gps)",
"ttyUSB2 (at)",
"ttyUSB3 (at)",
"wwan0 (net)"
],
"own-numbers": {
},
"sim": {
},
"access-technologies": {
},
"supported-ip-families": [
"ipv4",
"ipv6",
"ipv4v6"
],
"sim-slots": {
},
"carrier-configuration-revision": "--",
"supported-capabilities": [
"gsm-umts, lte"
],
"supported-bands": [
"egsm",
"dcs",
"utran-1",
"utran-5",
"utran-8",
"eutran-1",
"eutran-3",
"eutran-5",
"eutran-7",
"eutran-8",
"eutran-20",
"eutran-38",
"eutran-40",
"eutran-41"
],
"state": "failed",
"hardware-revision": "10000",
"current-modes": "allowed: 2g, 3g, 4g; preferred: 4g"
},
"3gpp": {
"operator-name": "--",
"registration-state": "--",
"eps": {
"initial-bearer": {
"dbus-path": "--",
"settings": {
"password": "--",
"user": "--",
"apn": "--",
"ip-type": "--"
}
},
"ue-mode-operation": "--"
},
"operator-code": "--",
"enabled-locks": {
},
"pco": "--",
"5gnr": {
"registration-settings": {
"drx-cycle": "--",
"mico-mode": "--"
}
},
"imei": "861107037891430",
"packet-service-state": "--"
},
"dbus-path": "/org/freedesktop/ModemManager1/Modem/0",
"device": "Modem1",
"location": {
},
"signal": {
}
}
]
}
@mips171 @aleksander0m Any suggestions or changes? Otherwise I would merge it.
I would probably just go and merge this