feat: FEAT-14 dual T3U — wlan2 uplink, wlan1 AP, onboard wlan0 fallback
This commit is contained in:
+11
-11
@@ -7,15 +7,15 @@
|
||||
# already exist (see PLAN.md Phase 6). The optional "phone-hotspot" profile is
|
||||
# created through the Settings page.
|
||||
#
|
||||
# Since 2026-08-12: the fast TP-Link T3U (wlan1) hosts the in-car AP
|
||||
# ("Hotspot-local"), while the onboard BCM43438 (wlan0) carries the internet
|
||||
# uplink (home-wifi / phone-hotspot).
|
||||
# Since 2026-08-14 (FEAT-14): dual T3U — wlan1 (T3U #1) hosts the in-car AP
|
||||
# ("Hotspot-local"), and a second T3U (wlan2) carries the internet uplink
|
||||
# (home-wifi / phone-hotspot); the onboard BCM43438 (wlan0) is the fallback.
|
||||
set -euo pipefail
|
||||
|
||||
REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
WLAN=wlan0 # onboard — internet uplink
|
||||
WLAN_FB=wlan1 # T3U — uplink fallback
|
||||
AP_IFACE=wlan1 # T3U — hosts the in-car AP
|
||||
WLAN=wlan2 # T3U #2 — internet uplink
|
||||
WLAN_FB=wlan0 # onboard BCM43438 — uplink fallback
|
||||
AP_IFACE=wlan1 # T3U #1 — hosts the in-car AP
|
||||
|
||||
sudo systemctl stop yaris-uplink-wait.service 2>/dev/null || true
|
||||
sudo systemctl stop yaris-netwatch.timer yaris-netwatch.service 2>/dev/null || true
|
||||
@@ -28,9 +28,9 @@ sudo install -m 644 "$REPO_DIR/deploy/yaris-hotspot-dns.conf" \
|
||||
sudo install -m 755 "$REPO_DIR/deploy/90-yaris-uplink" \
|
||||
/etc/NetworkManager/dispatcher.d/90-yaris-uplink
|
||||
|
||||
# Bind the internet uplink to the onboard radio (wlan0)
|
||||
# Bind the internet uplink to the second T3U (wlan2)
|
||||
sudo nmcli connection modify home-wifi connection.interface-name "$WLAN"
|
||||
# The in-car AP lives on the fast T3U (wlan1), forced to 5GHz
|
||||
# The in-car AP lives on T3U #1 (wlan1), forced to 5GHz
|
||||
sudo nmcli connection modify Hotspot-local \
|
||||
connection.interface-name "$AP_IFACE" \
|
||||
802-11-wireless.band a \
|
||||
@@ -44,8 +44,8 @@ if nmcli connection show phone-hotspot >/dev/null 2>&1; then
|
||||
802-11-wireless.mtu 1400
|
||||
fi
|
||||
|
||||
# Create wlan1 fallback profile (lower autoconnect-priority so wlan0 wins)
|
||||
# home-wifi-fb: same SSID as home-wifi but on wlan1 (T3U)
|
||||
# Create wlan0 fallback profile (lower autoconnect-priority so wlan2 wins)
|
||||
# home-wifi-fb: same SSID as home-wifi but on wlan0 (onboard)
|
||||
HOME_SSID=$(nmcli -g 802-11-wireless.ssid connection show home-wifi 2>/dev/null || true)
|
||||
HOME_PSK=$(sudo nmcli -g 802-11-wireless-security.psk connection show --show-secrets home-wifi 2>/dev/null || true)
|
||||
if [ -n "$HOME_SSID" ] && [ -n "$HOME_PSK" ]; then
|
||||
@@ -62,7 +62,7 @@ if [ -n "$HOME_SSID" ] && [ -n "$HOME_PSK" ]; then
|
||||
echo "Created home-wifi-fb fallback on $WLAN_FB"
|
||||
fi
|
||||
|
||||
# Re-enable wlan0 as a managed (but low-priority) fallback
|
||||
# Re-enable wlan0 (onboard) as a managed low-priority fallback
|
||||
sudo nmcli device set "$WLAN_FB" managed yes 2>/dev/null || true
|
||||
|
||||
sudo cp "$REPO_DIR/deploy/yaris-netwatch.service" /etc/systemd/system/yaris-netwatch.service
|
||||
|
||||
Reference in New Issue
Block a user