Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Design

If the nodes support cellular uplink connectivity, OpenSync allows using the LTE connection as a failover mechanism in cases of WAN link outages (L2 or L3).

LTE Modem Control

Using the AT commands, information items such as connect, disconnect, query connected network name, query signal strength, query EID of SIM/eSIM, etc. can be extracted. 

LTE Manager

LTE Manager (LTEM) is responsible for switching traffic from WAN to LTE when detecting an outage. LTEM also monitors WAN and switches back when the WAN interface is back up. LTEM needs to be flexible enough to allow all or some devices to use LTE as configured. General use cases are:

  • All devices use the LTE interface when there is a WAN outage.

    • The scenarios vary from a link down state on the WAN interface to all/some L2/L3 traffic is dropped upstream in the network.

  • Some devices are allowed to use the LTE interface and some are excluded when the WAN link goes down.

    • Some devices may be considered 'essential' and they must always have connectivity.

    • Other devices are not considered 'essential' and the loss of connectivity does not have adverse affects. 

  • Some devices use the LTE interface always.

    • There could be circumstances where a device would need uninterrupted connectivity.

    • The other devices can withstand short interruptions in connectivity.

LTEM is also responsible for creating and maintaining the routing tables associated with the WAN and LTE interfaces. All (or some) packets will be marked to use either the WAN routing table or the LTE routing table during a WAN outage.

Implementation

LTEM adds the LTE interface to the Connection_Manager_Uplink table, and sets has_l2 and has_l3 to true if the LTE interface has successfully connected to the LTE network. LTEM monitors the LTE link for L2 and L3 state, and updates the Connection_Manager_Uplink table as needed.

A new 'reachability' timer has been added to the connection manager config. Connectivity Manager (CM) is responsible for detecting outages on the WAN/uplink interface(s) and for updating the is_used for the LTE interface when there is a WAN link reachability failure.

LTEM executes the switchover to LTE when the is_used field for LTE is set to true. Once the switchover is triggered, LTEM updates the IP rules to direct traffic to the LTE interface. In the background, connection manager periodically checks reachability over the WAN interface. If the WAN interface is back 'up', connection manager sets the is_used field for LTE to false. This triggers LTEM to update the IP rules to direct the traffic back to the WAN interface.

Init is the procedure that occurs when the device loses the wired uplink. These steps are triggered:

  1. OVSDB registration

  2. LTE interface bringup

  3. DHCP for LTE

  4. Route table creation for forwarding over LTE

Failover is the procedure that occurs when the device regains access via the wired uplink. These steps are triggered:

  1. OVSDB notification

  2. Client route updates

  3. NAT (V4 only)

  4. Switch back to WAN

Northbound API

OVSDB Schema: Lte_Config Table

$ ovsh s -j Lte_Config
[
    {
        "os_persist": false,
        "_version": [
            "uuid",
            "XXXX3586-5725-4dc8-adbb-b58fc90d3fec"
        ],
        "if_name": "wwan0",
        "ipv4_enable": true,
        "apn": "data.XXXXX.name",
        "report_interval": 60,
        "manager_enable": true,
        "lte_failover_enable": true,
        "active_simcard_slot": 1,
        "force_use_lte": false,
        "_uuid": [
            "uuid",
            "XXXXX169-9471-44c0-8799-fc53616865a6"
        ],
        "modem_enable": true,
        "ipv6_enable": [
            "set",
            []
        ]
    }
]

OVSDB Schema: Lte_State Table

$ ovsh s -j Lte_State
[
    {
        "if_name": "wwan0",
        "imei": "",
        "iccid": "",
        "sim_status": "Unknown",
        "apn": "data.XXXXX.name",
        "report_interval": 60,
        "mcc": 0,
        "mnc": 0,
        "active_simcard_slot": 0,
        "_uuid": [
            "uuid",
            "XXXXXc9d-0bc4-4dda-bedc-1a98fae5e873"
        ],
        "tac": 0,
        "ipv6_enable": false,
        "modem_present": false,
        "_version": [
            "uuid",
            "XXXXX08a-4437-4677-84bd-4046efe68cb8"
        ],
        "ipv4_enable": true,
        "lte_net_state": "unknown",
        "imsi": "",
        "manager_enable": true,
        "lte_failover_enable": true,
        "force_use_lte": false,
        "service_provider_name": "",
        "modem_enable": true
    }
]

MQTT

Protobuf definition:

syntax = "proto3";

package interfaces.lte_info;

// LTE common fields
message LteCommonHeader {
  uint32 request_id = 1;
  string if_name = 2; // wwan0
  string node_id = 3;
  string location_id = 4;
  string imei = 5;
  string imsi = 6;
  string iccid = 7;
  uint64 reported_at = 8; // Unix time in seconds
}

// Network Registration Status
enum LteNetRegStatus {
  LTE_NET_REG_STAT_UNSPECIFIED = 0;
  LTE_NET_REG_STAT_NOTREG = 1; // Not registered. ME is not currently searching a new operator to register to
  LTE_NET_REG_STAT_REG = 2; // Registered, home network
  LTE_NET_REG_STAT_SEARCH = 3; // Not registered, but ME is currently searching a new operator to register to
  LTE_NET_REG_STAT_DENIED = 4; // Registration denied
  LTE_NET_REG_STAT_UNKNOWN = 5; // Unknown
  LTE_NET_REG_STAT_ROAMING = 6; // Registered, roaming
}

message LteNetInfo {
  LteNetRegStatus net_status = 1;
  int32 rssi = 2;
  int32 ber = 3;
}

// LTE data usage
message LteDataUsage {
  uint64 rx_bytes = 1;
  uint64 tx_bytes = 2;
  uint64 failover_start = 3; // Unix time in seconds
  uint64 failover_end = 4; // Unix time in seconds
  uint32 failover_count = 5;
}

// Serving Cell State
enum LteServingCellState {
  LTE_SERVING_CELL_UNSPECIFIED = 0;
  LTE_SERVING_CELL_SEARCH = 1; // UE is searching but could not (yet) find a suitable 3G/4G cell.
  LTE_SERVING_CELL_LIMSERV = 2; // UE is camping on a cell but has not registered on the network.
  LTE_SERVING_CELL_NOCONN = 3; // UE is camping on a cell and has registered on the network, and it is in idle mode.
  LTE_SERVING_CELL_CONNECT = 4; // UE is camping on a cell and has registered on the network, and a call is in progress.
}

// cell mode
enum LteCellMode {
  LTE_CELL_MODE_UNSPECIFIED = 0;
  LTE_CELL_MODE_LTE = 1;
  LTE_CELL_MODE_WCDMA = 2;
}

// is_tdd
enum LteFddTddMode {
  LTE_MODE_UNSPECIFIED = 0;
  LTE_MODE_FDD = 1;
  LTE_MODE_TDD = 2;
}

// Uplink/Downlink Bandwidth in MHz
enum LteBandwidth {
  LTE_BANDWIDTH_UNSPECIFIED = 0;
  LTE_BANDWIDTH_1P4_MHZ = 1;
  LTE_BANDWIDTH_3_MHZ = 2;
  LTE_BANDWIDTH_5_MHZ = 3;
  LTE_BANDWIDTH_10_MHZ = 4;
  LTE_BANDWIDTH_15_MHZ = 5;
  LTE_BANDWIDTH_20_MHZ = 6;
}

message LteNetServingCellInfo {
  LteServingCellState state = 1;
  LteCellMode mode = 2;
  LteFddTddMode fdd_tdd_mode = 3;
  uint32 cellid = 4; // Hexadecimal format. Cell ID. The parameter determines the 16-bit (GSM) or 28-bit (UMTS) cell ID. Range: 0-0xFFFFFFF.
  uint32 pcid = 5; // Physical cell ID
  uint32 uarfcn = 6; // Number format. The parameter determines the UTRA-ARFCN of the cell that was scanned
  uint32 earfcn = 7; // Number format. The parameter determines the E-UTRA-ARFCN of the cell that was scanned
  uint32 freq_band = 8; // E-UTRA frequency band (see 3GPP 36.101)
  LteBandwidth ul_bandwidth = 9;
  LteBandwidth dl_bandwidth = 10;
  uint32 tac = 11; // Tracking Area Code (see 3GPP 23.003 Section 19.4.2.3)
  int32 rsrp = 12; // Reference Signal Received Power (see 3GPP 36.214 Section 5.1.1)
  int32 rsrq = 13; // Reference Signal Received Quality (see 3GPP 36.214 Section 5.1.2)
  int32 rssi = 14; // The parameter shows the Received Signal Strength Indication
  uint32 sinr = 15; // Logarithmic value of SINR, Values are in 1/5th of a dB. Range: 0-250 which translates to -20dB - +30dB
  uint32 srxlev = 16; // Select receive level value for base station in dB (see 3GPP25.304).
}

// NeighborCell freq mode
enum LteNeighborFreqMode {
  LTE_FREQ_MODE_UNSPECIFIED = 0;
  LTE_FREQ_MODE_INTRA = 1;
  LTE_FREQ_MODE_INTER = 2;
  LTE_FREQ_MODE_WCDMA = 3;
  LTE_FREQ_MODE_WCDMA_LTE = 4;
}

// Set
enum LteNeighborCellSet {
  LTE_NEIGHBOR_CELL_SET_UNSPECIFIED = 0;
  LTE_NEIGHBOR_CELL_SET_ACTIVE_SET = 1;
  LTE_NEIGHBOR_CELL_SET_SYNC_NEIGHBOR = 2;
  LTE_NEIGHBOR_CELL_SET_ASYNC_NEIGHBOR = 3;
}

// [+QENG: "neighbourcell intra","LTE",<earfcn>,<pcid>,<rsrq>,<rsrp>,<rssi>,<sinr>,<srxlev>,<cell_resel_priority>,<s_non_intra_search>,<thresh_serving_low>,<s_intra_search>
// [+QENG: "neighbourcell inter","LTE",<earfcn>,<pcid>,<rsrq>,<rsrp>,<rssi>,<sinr>,<srxlev>,<cell_resel_priority>,<threshX_low>,<threshX_high>
// [+QENG:"neighbourcell","WCDMA",<uarfcn>,<cell_resel_priority>,<thresh_Xhigh>,<thresh_Xlow>,<psc>,<rscp><ecno>,<srxlev>
// [+QENG: "neighbourcell","LTE",<earfcn>,<cellid>,<rsrp>,<rsrq>,<s_rxlev>
message LteNetNeighborCellInfo {
  LteCellMode mode = 1;
  LteNeighborFreqMode freq_mode = 2;
  uint32 earfcn = 3;
  uint32 uarfcn = 4;
  uint32 pcid = 5;
  int32 rsrq = 6;
  int32 rsrp = 7;
  int32 rssi = 8;
  uint32 sinr = 9;
  uint32 srxlev = 10;
  uint32 cell_resel_priority = 11; // Cell reselection priority. Range: 0-7
  uint32 s_non_intra_search = 12; // Threshold to control non-intra frequency searches.
  uint32 thresh_serving_low = 13; //Specifies the suitable receive level threshold (in dB) used by the UE on the serving cell when reselecting towards a lower priority RAT/frequency.
  uint32 s_intra_search = 14; // Cell selection parameter for the intra frequency cell.
  uint32 thresh_x_low = 15; // The suitable receive level value of an evaluated lower priority cell must be greater than this value.
  uint32 thresh_x_high = 16; // The suitable receive level value of an evaluated higher priority cell must be greater than this value.
  uint32 psc = 17; //The parameter determines the primary scrambling code of the cell that was scanned
  int32 rscp = 18; // The parameter determines the Received Signal Code Power level of the cell that was scanned
  int32 ecno = 19; // Carrier to noise ratio in dB = measured Ec/Io value in dB.
  LteNeighborCellSet cell_set = 20; // 3G neighbour cell set
  int32 rank = 21; // Rank of this cell as neighbour for inter-RAT cell reselection
  uint32 cellid = 22; // Hexadecimal format. Cell ID. The parameter determines the 16-bit (GSM) or 28-bit (UMTS) cell ID. Range: 0-0xFFFFFFF.
  int32 inter_freq_srxlev = 23; // Suitable receive level for inter frequency cell
}

// LTE info
message LteInfoReport {

  LteCommonHeader header = 1;

  // LTE info
  LteNetInfo lte_net_info = 2;

  // Data usage
  LteDataUsage lte_data_usage = 3;

  // Serving cell info
  LteNetServingCellInfo lte_srv_cell = 4;

  // Neighbor cell info
  repeated LteNetNeighborCellInfo lte_neigh_cell_info = 5;
}
  • AWLAN_Node mqtt_topics entry

$ ovsh U AWLAN_Node mqtt_topics:ins:'["map",[["LteStats","dev-LteStats/dog1/59f39f5acbb22513f0ae5e17/4C718002B3"]]]'
Upsert: update
1
Mutated: 1
$ ovsh s AWLAN_Node mqtt_topics
----------------------------------------------------------------------------------------------------
mqtt_topics | ["map",[["Crash.Reports","Crash/Reports/dog1/4C718002B3/59f39f5acbb22513f0ae5e17"],  |
            : ["DHCP.Signatures","DHCP/Signatures/dog1/4C718002B3/59f39f5acbb22513f0ae5e17"],      :
            : ["DNS.Queries","DNS/Queries/dog1/4C718002B3/59f39f5acbb22513f0ae5e17"],              :
            : ["HTTP.Requests","HTTP/Requests/dog1/4C718002B3/59f39f5acbb22513f0ae5e17"],          :
            : ["LteStats","dev-LteStats/dog1/59f39f5acbb22513f0ae5e17/4C718002B3"],["ObjectStore", :
            : "ObjectStore/dog1/4C718002B3/59f39f5acbb22513f0ae5e17"],["UPnP.Devices",             :
            : "UPnP/Devices/dog1/4C718002B3/59f39f5acbb22513f0ae5e17"],["WifiBlaster.Results",     :
            : "WifiBlaster/dog1/4C718002B3/59f39f5acbb22513f0ae5e17"],["aggregatedStats",          :
            : "aggregatedStats/dog1/4C718002B3/59f39f5acbb22513f0ae5e17"]]]                        :
----------------------------------------------------------------------------------------------------

The feature was stabilized using the Quectel module.

OSN LTE Southbound API - OSN LTE

Creating and adding a new eth-like interface type for LTE. The following southbound functions are called:

  • osn_lte_linux: interaction with interfaces/linux stack

  • osn_lte_modem: interaction with modem

Please refer to the OpenSync Southbound API document for details.

  • No labels