Add option to set LTE modem as wan
Add option to set LTE connection as WAN.
For start, I'd propose separate menu entry (WWAN, Wireless Wan or something similar) with its own API call(s). Therefore we wouldn't need to alter the "regular" wired WAN backend yet.
Original design (obsolete)
This wireframe is just initial draft, so feel free to redesign it.
Proposed design
This my crude attempt at wireframe with figma and it surely could be made better, but I hope the idea is clear.
Proposed handling of data
Request: GET reforis/api/wan
json response
{
"mode": "wireless",
"mode_wired": {
"interface_count": 1,
"interface_up_count": 1,
"last_seen_duid": "<duid>",
"mac_settings": {
"custom_mac_enabled": false,
"mac_address": "aa:bb:cc:11:22:33"
},
"proto": "dhcp",
"qos": {
"download": 1024,
"enabled": false,
"upload": 1024
},
"up": true,
"vlan_settings": {
"enabled": false
},
"wan6_settings": {
"wan6_dhcpv6": {
"duid": ""
},
"wan6_type": "dhcpv6"
},
"wan_settings": {
"wan_dhcp": {},
"wan_type": "dhcp"
}
},
"mode_wireless": {
"devices": [
{
"apn": "apn.example.foo",
"authentication": {
"auth_type": "none"
},
"enabled": true,
"id": 0,
"pdptype": "ipv4v6",
"pincode": "",
"qmi_device": "/dev/cdc-wdm0",
"sim_status": "failure"
},
{
"apn": "",
"authentication": {
"auth_type": "none"
},
"enabled": false,
"id": 1,
"pdptype": "ipv4v6",
"pincode": "",
"qmi_device": "/dev/cdc-wdm1",
"sim_status": "failure"
}
]
}
}
- Show form based on the
mode
. - In case of mode
wireless
, show first the modem device that isenabled
, meaning this modem is designated as wan.
Please note that in current implementation, there should be only one interface designated as wan - wired, modem1 or modemX - not multiple interfaces together.
Blocked by: turris/foris-controller/foris-controller-wwan-module#1