SomeWhereOverTheRainBow
Part of the Furniture
That is all fine and dandy, but we are only concerned with the one specific to the 5ghz bandwidth. do they follow numerical logic in this case?Use wl_ifnames to get the list of WLAN interfaces.
Code:admin@stargate:/tmp/home/root# nvram get wl_ifnames eth6 eth7
Code:
GT-AX11000-9600:/tmp/home/root# nvram get wl_ifnames
eth6 eth7 eth8
Code:
RT-AX88U-C7C0:/tmp/home/root# nvram get wl_ifnames
eth6 eth7
Edit: Revised logic (abit overkill) per @RMerlin
Code:
port5ghz-1="$(nvram get wl_ifnames | grep -oF "$(ifconfig | grep -F "$(nvram get wl1_hwaddr)" | awk '{if (NR==1) {print $1}}')")"
and
port5ghz-2="$(nvram get wl_ifnames | grep -oF "$(ifconfig | grep -F "$(nvram get wl2_hwaddr)" | awk '{if (NR==1) {print $1}}')")"
@Adamm , the revised logic should take care of worrying about catching the wrong interface between different models.
Last edited: