Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

No Format
message RadioStatus {
	// true if enabled AND successfully applied
	bool airplane_mode = 1;
	// for every LTE network
	repeated CellularStatus cellular_status = 1;
	// later we can add status for every WiFi network
}

message CellularStatus {
	// logicallabel of the physical device
	string deviceName = 1;
	CellularModem modem = 2;
	OperatingState operatingState = 3;
	string controlProtocol = 4; // "qmi" or "mbim"
	string imei = 5;
	repeated CellularProvider providerproviders = 6;
	CellularVisibleProvider visibleProviders = 7;
	// if the last configuration change failed, error message is reported here
	string configError = 10;
	// wwan servise periodically pings configured IP address. 
	// If the last probing failed, stderr of the probing method is published here.
	string probeError = 11;
}

message CellularModem {
	string model = 1;
	string revision = 2;
}  

enum CellularOperatingState {
	OPERATING_STATE_UNSPECIFIED = 0;
	OPERATING_STATE_ONLINE = 1;
	OPERATING_STATE_RADIO_OFF = 2;  (AKA airplane mode)
	OPERATING_STATE_OFFLINE = 3;
	...
}

message CellularProvider {
	string plmn = 1;
	string description = 2;
	bool registeredcurrentServing = 3;
	bool roaming = 4;
}

message CellularVisibleProvider {
	string plmn = 1;
	string description = 2;
	string status = 3;
}

The Local profile server application may either reply with status 204 (No content), acknowledging the received state data update but not requiring any configuration changes, or return 200 (OK) and append response body with the intended radio state encoded using this proto message:

...

No Format
{
	// MD5 checksum of config.json (without trailing white-space) applied at the time of publishing this info
	"config-checksum": "d7548db5594b064f2c9ec0599e84523e",
	"modems": [
		{
			"device-name": "lte-modem1",    # can be empty for modems not configured from the controller
			"physical-addrs: {
				# all addresses will be filled by wwan service
				“interface”: “wwan0”,
				“usb”: “1:2.3”, # <bus>:[port]
				"pci": "0000:11:00.0",
			},
			"control-protocol": "qmi" | "mbim",
			"operating-mode": "offline" | "online" | "radio-off" | "unrecognized",
			"imei": “310170845466094”,
			"modem": {
				"model": "QUECTEL Mobile Broadband Module",
				"revision": "EC21ECGAR06A04M1G",
			},
			"config-error": "",
			"probe-error": "Failed to ping 8.8.8.8 (2 packets transmitted, 0 received, 100% packet loss, time 1029ms)",
			"providerproviders": [
				{
					"plmn": "310-410",
					"description": "AT&T",
					"registeredcurrent-serving": true,
					"roaming": false
				},
			"visible-providers": [
				{
					"plmn": "310-410120",
					"description": "AT&TO2",
					"status": "home, preferred, visible, registered" 
				},
				{
					"plmn": "310-120",
					"description": "AT&T"current-serving": false,
					"statusroaming": "visible"false
				}
			]
		}
	]
}

Lastly, wwan service will also periodically publish /run/wwan/metrics.json with cellular metrics:

No Format
{
	"modems": [
		{
			"device-name": "lte-modem1",    # can be empty for modems not configured from the controller
			"physical-addrs: {
				# all addresses will be filled by wwan service
				“interface”: “wwan0”,
				“usb”: “1:2.3”, # <bus>:[port]
				"pci": "0000:11:00.0"
			},
			"packet-stats": {
				"rx": {
					"bytes": 456456,
					"packets": 1234,
					"drops": 0
				},
				"tx": {
					"bytes": 23485,
					"packets": 758,
					"drops": 12
				}
			},
			"signal-info": {
				"rssi": -42,
				"rsrq": -11,
				"rsrp": -98,
				"snr": 56
			}
		}
	]
}

...