Table of Contents |
---|
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
OpenSync 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 always use the LTE interface.
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 are marked to use either the WAN routing table or the LTE routing table during a WAN outage.WAN outage.
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, and similar can be extracted.
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 Connectivity Manager (CM2) config. CM2 is responsible for detecting outages on the WAN/uplink interface(s) and for updating the is_used
value for the LTE interface when there is in case of 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, CM2 periodically checks for reachability over the WAN interface. If the WAN interface is back ' up', CM2 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.
...
OVSDB registration
LTE interface bringup
DHCP for LTE
Route table creation for forwarding over LTE
Reenabling the Wired Uplink
...
– Failover
Failover is the procedure that occurs when the device regains access via the wired uplink. These steps are triggered:
OVSDB notification
Client route updates
NAT (V4 only)
Switch Switching back to WAN
Northbound API
...
Code Block |
---|
$ ovsh s Lte_Config
------------------------------------
_uuid | d6ae~8b1f |
_version | 0299~ca76 |
active_simcard_slot | 0 |
apn | data641003 |
enable_persist | false |
esim_activation_code | ["set",[]] |
esim_download_start | false |
esim_profile_activate | false |
force_use_lte | false |
if_name | wwan0 |
ipv4_enable | true |
ipv6_enable | true |
lte_bands_enable | ["set",[]] |
lte_failover_enable | true |
manager_enable | true |
modem_enable | true |
os_persist | false |
pdp_context_id | ["set",[]] |
report_interval | 60 |
------------------------------------
|
OVSDB Schema: Lte_State Table
Code Block |
---|
$ ovsh s Lte_State ----------------------------------------------------- _uuid | ac94~71f3 | _version | 8fb0~8982 | active_simcard_slot | 0 | apn | data641003 | enable_persist | false | esim_activation_code | ["set",[]] | esim_active_profile | ["set",[]] | esim_download_complete | false | esim_download_in_progress | false | esim_download_start | false | esim_profile_activate | false | force_use_lte | false | iccid | 89011703278753831737xxxxxxx3278753831737 | if_name | wwan0 | imei | 861364040285999xxxxxx040285999 | imsi | 310170875383173xxxxxx875383173 | ipv4_enable | true | ipv6_enable | true | lte_bands_enable | | lte_failover_enable | true | lte_net_mode | lte | lte_net_state | registered_home_network | manager_enable | true | mcc | 310 | mnc | 410 | modem_enable | true | modem_firmware_version | ["set",[]] | modem_present | true | pdp_context_id | ["set",[]] | report_interval | 60 | service_provider_name | "AT&T" | sim_status | Inserted | tac | 8 | ----------------------------------------------------- |
...
Code Block |
---|
$ ovsh U AWLAN_Node mqtt_topics:ins:'["map",[["LteStats","dev-LteStats/dog1opensync/59f39f5acbb22513f0ae5e17XXXX9f5acbb22513f0ae5e17/4C718002B3XXXX8002B3"]]]' Upsert: update 1 Mutated: 1 $ ovsh s AWLAN_Node mqtt_topics ---------------------------------------------------------------------------------------------------- mqtt_topics | ["map",[["Crash.Reports","Crash/Reports/dog1opensync/4C718002B3XXXX8002B3/59f39f5acbb22513f0ae5e17XXXX9f5acbb22513f0ae5e17"], | : ["DHCP.Signatures","DHCP/Signatures/dog1opensync/4C718002B3XXXX8002B3/59f39f5acbb22513f0ae5e17XXXX9f5acbb22513f0ae5e17"], : : ["DNS.Queries","DNS/Queries/dog1/4C718002B3XXXX8002B3/59f39f5acbb22513f0ae5e17XXXX9f5acbb22513f0ae5e17"], : : ["HTTP.Requests","HTTP/Requests/dog1opensync/4C718002B3XXXX8002B3/59f39f5acbb22513f0ae5e17XXXX9f5acbb22513f0ae5e17"], : : ["LteStats","dev-LteStats/dog1opensync/59f39f5acbb22513f0ae5e17/4C718002B3"],["ObjectStore", : : "ObjectStore/dog1opensync/4C718002B3XXXX8002B3/59f39f5acbb22513f0ae5e17XXXX9f5acbb22513f0ae5e17"],["UPnP.Devices", : : "UPnP/Devices/dog1opensync/4C718002B3XXXX8002B3/59f39f5acbb22513f0ae5e17XXXX9f5acbb22513f0ae5e17"],["WifiBlaster.Results", : : "WifiBlaster/dog1opensync/4C718002B3XXXX8002B3/59f39f5acbb22513f0ae5e17XXXX9f5acbb22513f0ae5e17"],["aggregatedStats", : : "aggregatedStats/dog1opensync/4C718002B3XXXX8002B3/59f39f5acbb22513f0ae5e17XXXX9f5acbb22513f0ae5e17"]]] : ---------------------------------------------------------------------------------------------------- |
Info |
---|
The feature was stabilized using the Quectel module. |
...