Dual WAN with LTE Backup
Design
Nodes with cellular capability, OpenSync allows using the LTE connection as a backup mechanism in cases of WAN link outages (L2 or L3).
LTE Manager
LTE Manager (LTEM) will initialize or configure the LTE modem, data call creation and monitoring the health of the LTE interface. It is also responsible for:
Monitoring WAN interface health to detect L2 and L3 WAN failures
Report WAN outages via MQTT
Force LTE use when configured
Gathering and reporting LTE modem statistics (cell network state, signal strength, etc)
With OpenSync 3.4, support for LTE Primary or LTE Only is not available, but is planned for future releases.
Implementation
LTEM needs to be enabled by kconfig option (MANAGER_LTEM
) as part of OpenSync building process since is disabled by default. It will register to OVSDB and brigng up the LTE interface based on OVSDB entry in Wifi_Inet_Config
. LTEM will add the LTE interface to the Connection_Manager_Uplink
table and set has_l2
and has_l3
to true, if the LTE interface has successfully connected to the LTE network. The LTEM will monitor the LTE link for L2 and L3 state and update the Connection_Manager_Uplink
table as needed.
Connection Manager (CM) will be responsible for detecting L3 outages on the WAN/uplink interface(s). The LTE manager will report the switchover to the cloud via MQTT the WAN interface loses L2 or L3. In the background, CM will periodically check reachability over the WAN interface. If the WAN interface (like ethernet backhaul) is back 'up', CM will update the Wifi_Route_Config
table. This will trigger LTEM to report this to the cloud via MQTT.
The feature was stabilized using the Quectel module.
Northbound API
OVSDB Schema: Lte_Config Table
root@opensync:~# ovsh s Lte_Config
------------------------------------
_uuid | d6ae~8b1f |
_version | 0299~ca76 |
active_simcard_slot | 0 |
apn | data641333 |
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
root@opensync:~# ovsh s Lte_State
-----------------------------------------------------
_uuid | ac94~71f3 |
_version | 8fb0~8982 |
active_simcard_slot | 0 |
apn | data641333 |
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 | 89011703278753831333 |
if_name | wwan0 |
imei | 861364040285993 |
imsi | 310170875383333 |
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 |
-----------------------------------------------------
MQTT
Protobuf definition: src/lib/protobuf/lte_info.proto
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.