From 6cff6a1febd726cf0c33911506e786007684b41f Mon Sep 17 00:00:00 2001 From: Packet Please Date: Thu, 19 Sep 2024 20:57:40 +0200 Subject: [PATCH 1/3] model: add GL.iNet GL-XE300 mobile LTE router --- group_vars/model_glinet_gl_xe300.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 group_vars/model_glinet_gl_xe300.yml diff --git a/group_vars/model_glinet_gl_xe300.yml b/group_vars/model_glinet_gl_xe300.yml new file mode 100644 index 00000000..5983dba5 --- /dev/null +++ b/group_vars/model_glinet_gl_xe300.yml @@ -0,0 +1,22 @@ +--- +target: ath79/nand +brand_nice: GL.iNet +model_nice: GL-XE300 + +switch_ports: 5 +switch_int_port: 0 +switch_ignore_ports: [1, 2, 3] + +# wan port is separate device: eth1 +int_port: eth0 + +wireless_devices: + - name: 11g_standard + band: 2g + htmode_prefix: HT + path: platform/ahb/18100000.wmac + ifname_hint: wlan2 + +model__packages__to_merge: + - kmod-usb-serial-option + - picocom From ead4835b1af20c3c7216c3ff5dd4be95021877f6 Mon Sep 17 00:00:00 2001 From: Packet Please Date: Thu, 19 Sep 2024 21:12:43 +0200 Subject: [PATCH 2/3] network: allow QMI wwan configuration --- roles/cfg_openwrt/templates/common/config/network.j2 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/roles/cfg_openwrt/templates/common/config/network.j2 b/roles/cfg_openwrt/templates/common/config/network.j2 index 1d229303..44b3da82 100644 --- a/roles/cfg_openwrt/templates/common/config/network.j2 +++ b/roles/cfg_openwrt/templates/common/config/network.j2 @@ -85,6 +85,15 @@ config interface '{{ name }}' {% endif %} {% endif %} + {% if 'wwan' in network %} +config interface 'wwan' + {% set wwan = network['wwan'] %} + option proto '{{ wwan['proto'] }}' + option device '{{ wwan['device'] }}' + option apn '{{ wwan['apn'] }}' + option pdptype '{{ wwan['pdptype'] }}' + {% endif %} + {% if libnetwork.isPortNeeded(network) | from_json and libnetwork.isBridgeNeeded(network) | from_json %} config device option name '{{ libnetwork.getBridgeIfname(network) }}' From 04d247091cdf1fe1f182197026f4fd0b66598d12 Mon Sep 17 00:00:00 2001 From: Packet Please Date: Thu, 19 Sep 2024 21:12:54 +0200 Subject: [PATCH 3/3] pktplsmobil: init location --- locations/pktplsmobil.yml | 100 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 locations/pktplsmobil.yml diff --git a/locations/pktplsmobil.yml b/locations/pktplsmobil.yml new file mode 100644 index 00000000..1dd33daf --- /dev/null +++ b/locations/pktplsmobil.yml @@ -0,0 +1,100 @@ +--- + +location: pktplsmobil +location_nice: Mobilrouter von @pktpls +contact_nickname: Packet Please +contacts: + - pktpls+bbb@systemli.org + +hosts: + + - hostname: pktplsmobil-core + role: corerouter + model: "glinet_gl-xe300" + wireless_profile: pktplsmobil + +# 10.248.17.128/25 +# 10.248.17.128/26 prdhcp +# 10.248.17.192/27 dhcp +# 10.248.17.224/28 mesh +# 10.248.17.240/28 mgmt +ipv6_prefix: 2001:bf7:820:2400::/56 + +networks: + + # - vid: 40 + # role: dhcp + # name: dhcp + # inbound_filtering: true + # enforce_client_isolation: true + # prefix: 10.248.17.192/27 + # ipv6_subprefix: -40 + # assignments: + # pktplsmobil-core: 1 + + - vid: 1 + untagged: true + role: dhcp + name: prdhcp + inbound_filtering: true + enforce_client_isolation: false + prefix: 10.248.17.128/26 + ipv6_subprefix: -41 + assignments: + pktplsmobil-core: 1 + + - vid: 42 + role: mgmt + prefix: 10.248.17.240/28 + gateway: 1 + dns: 1 + ipv6_subprefix: -42 + assignments: + pktplsmobil-core: 1 + + - vid: 50 + untagged: true + ifname: wwan0 + role: uplink + uplink_mode: direct + wwan: + proto: qmi + device: /dev/cdc-wdm0 + apn: internet + pdptype: ipv4 + + - role: tunnel + ifname: ts_wg0 + mtu: 1280 + prefix: 10.248.17.224/32 + wireguard_port: 51820 + +location__wireless_profiles__to_merge: + - name: pktplsmobil + devices: + - radio: 11g_standard + legacy_rates: false + country: DE + ifaces: + - mode: ap + ssid: berlin.freifunk.net + encryption: none + network: dhcp + radio: [11g_standard] + ifname_hint: ff + owe_transition_ifname_hint: ffowe + - mode: ap + ssid: berlin.freifunk.net OWE + hidden: true + encryption: owe + network: dhcp + radio: [11g_standard] + ifname_hint: ffowe + owe_transition_ifname_hint: ff + ieee80211w: 2 + - mode: mesh + mesh_id: Mesh-Freifunk-Berlin + radio: [11g_standard] + mcast_rate: 12000 + mesh_fwding: 0 + ifname_hint: mesh