Has anyone ever managed to get the password VLAN mapping to work on a Xiaomi Redmi AX3600?
It works fine on a Xiaomi Redmi AC2100. I simply used the variant via UCI with the “wifi-vlan” and “wifi-station” and it works straight away.
When I did the similar configuration on an AX3600, no client could connect and I found the following entries in logread:
Tue Mar 4 13:20:14 2025 daemon.err hostapd: Failed to create interface vlan3: -95 (Not supported)
Tue Mar 4 13:20:14 2025 daemon.err hostapd: VLAN: Could not add VLAN vlan3: No such device
Tue Mar 4 13:20:14 2025 daemon.err hostapd: VLAN initialization failed.
Tue Mar 4 13:20:15 2025 daemon.err hostapd: Interface initialization failed
So I thought to myself, obviously it doesn't seem to be able to create interfaces itself. So I tried the manual method via hostapd.vlan and hostapd.wpa_psk. But this also failed with similar entries in logread.
I have brought my configuration files with me. Maybe someone will see the mistake I made.
Specifically, I would like to achieve the following: If the client logs on with "myLANPassword", its packets should be forwarded as untagged (i.e. implicitly VLAN 1). The client should therefore end up in the "lan" network.
However, if a client logs on with "myguestpassword", it should end up in the "guest" network and its packets should therefore be tagged with VLAN ID 3. The access point is a dumb AP. This means no DNS, DHCP, firewall etc.
/etc/config/network
config interface 'loopback'
option device 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config device
option name 'br-lan'
option type 'bridge'
option vlan_filtering '1'
list ports 'lan1'
list ports 'lan2'
list ports 'lan3'
list ports 'wan'
config bridge-vlan
option device 'br-lan'
option vlan '1'
list ports 'lan1:u*'
list ports 'lan2:u*'
list ports 'lan3:u*'
list ports 'wan:u*'
config bridge-vlan
option device 'br-lan'
option vlan '3'
list ports 'lan1:t'
list ports 'lan2:t'
list ports 'lan3:t'
list ports 'wan:t'
config interface 'lan'
option broadcast '192.168.0.255'
option device 'br-lan.1'
option gateway '192.168.0.2'
option ip6assign '60'
option ip6ifaceid '::B'
option ipaddr '192.168.0.11'
option metric '5'
option netmask '255.255.255.0'
option proto 'static'
list dns '192.168.0.2'
list dns_search 'lan'
config interface 'lan6'
option delegate '0'
option proto 'dhcpv6'
option ifname '@lan'
option reqprefix 'no'
option reqaddress 'try'
option metric '5'
config interface 'guest'
list dns '192.168.3.2'
option delegate '0'
option device 'br-lan.3'
option force_link '0'
option gateway '192.168.3.2'
option ip6assign '64'
option ipaddr '192.168.3.11'
option netmask '255.255.255.0'
option proto 'static'
option metric '20'
/etc/config/wireless
# Another problem: additional Wifi interfaces, which come from the standard configuration. These are not used by me.
config wifi-device 'radio0'
option type 'mac80211'
option path 'soc@0/20000000.pci/pci0000:00/0000:00:00.0/0000:01:00.0'
option band '5g'
option channel '36'
option htmode 'VHT80'
option disabled '1'
# Another problem: additional Wifi interfaces, which come from the standard configuration. These are not used by me.
config wifi-device 'radio1'
option type 'mac80211'
option path 'platform/soc@0/c000000.wifi'
option band '5g'
option channel '36'
option htmode 'HE80'
option disabled '1'
# IoT device: i don`t use it
config wifi-device 'dev_24_iot'
option type 'mac80211'
option path 'platform/soc@0/c000000.wifi+1'
option band '2g'
option channel '1'
option htmode 'HE20'
option disabled '1'
# Another problem: additional Wifi interfaces, which come from the standard configuration. These are not used by me.
config wifi-device 'radio3'
option type 'mac80211'
option path 'soc@0/20000000.pci/pci0000:00/0000:00:00.0/0000:01:00.0'
option channel '36'
option band '5g'
option htmode 'VHT80'
option disabled '1'
# my wifi 5 Ghz device
config wifi-device 'dev_wifi_5Ghz'
option type 'mac80211'
option path 'platform/soc@0/c000000.wifi'
option channel '60'
option band '5g'
option htmode 'HE80'
option cell_density '2'
option country 'DE'
# my wifi 2.4 Ghz device
config wifi-device 'dev_wifi_2_4Ghz'
option type 'mac80211'
option path 'platform/soc@0/c000000.wifi+1'
option channel '1'
option band '2g'
option htmode 'HE20'
option cell_density '2'
option country 'DE'
config wifi-iface 'If_Wifi_5'
option bss_transition '1'
option device 'dev_wifi_5Ghz'
option encryption 'psk2+ccmp'
option key 'myLANPassword'
option mode 'ap'
option network 'lan'
option ssid 'MyLAN'
option wpa_psk_file '/etc/hostapd.wpa_psk'
option vlan_file '/etc/hostapd.vlan'
option dynamic_vlan '1'
option vlan_tagged_interface 'lan3' # my physical uplink port (br-lan also don`t work here)
option vlan_bridge 'br-vlan' # don`t know what to insert here, from my unterstanding it`s an prefix for created interfaces
config wifi-iface 'If_Wifi_24'
option bss_transition '1'
option device 'dev_wifi_2_4Ghz'
option encryption 'psk2+ccmp'
option key 'myLANPassword'
option mode 'ap'
option network 'lan'
option ssid 'MyLAN'
option wpa_psk_file '/etc/hostapd.wpa_psk'
option vlan_file '/etc/hostapd.vlan'
option dynamic_vlan '1'
option vlan_tagged_interface 'lan3' # my physical uplink port (br-lan also don`t work here)
option vlan_bridge 'br-vlan' # don`t know what to insert here, from my unterstanding it`s an prefix for created interfaces
/etc/hostapd.vlan
3 vlan3 br-lan.3
/etc/hostapd.wpa_psk
vlanid=3 00:00:00:00:00:00 myguestpassword
Both - the AX3600 and the AC2100 runs on v24.10.0 and use wpad-mbedtls.
Edit: I have now discovered that there is a patch for ath11k which has not yet been included in OpenWRT (see >>here<<).
This means you have to build your own image.
I did that and integrated the patch.
Now it works wonderfully even with the simple version with "wifi-vlan" and "wifi-station".
So that others can understand this and since I am still untrained in this, I will briefly explain the command sequence with which I created the image:
# before: set up an OpenWRT build environment
git clone https://git.openwrt.org/openwrt/openwrt.git
cd openwrt
git branch -a
git tag
# use the current release
git checkout v24.10.0
# add the patch to the specific folder
cd package/kernel/mac80211/patches/ath11k
curl -O https://raw.githubusercontent.com/gtxaspec/openwrt-mx4300/b0fb8508f099a1339e87f8ccc1b5fdd59b0347fb/package/kernel/mac80211/patches/ath11k/906-ath11k-add-support-for-dynamic-vlan.patch
cd -
./scripts/feeds update -a
./scripts/feeds install -a
# download the standard configuration for that target
curl -o .config https://downloads.openwrt.org/releases/24.10.0/targets/qualcommax/ipq807x/config.buildinfo
# configure as you wish. Select packages in particular - here in particular switch to wpad-mbedtls (instead of basic)
make menuconfig
# build
make -j4
If someone gives me a hint where I could upload the file best, then I could also share the built image.