I have a Ubiquiti Nanostation M5 xw installed with OpenWrt v19.07.3.
In the default configuration there are 2 ethernet ports (LAN, vlan1, eth0.1 and WAN, vlan2, eth0.2).
The IP address of the LAN is default 192.168.1.1.
I try to configure A(ccess) P(oint or 'hotspot') + STA(tion or 'client').
The client will get an IP adress from the subnet 192.168.3 as dhcp client.
The Nanostion M5 has a single 5 GHz radio, I checked if it should be possible to act simultaneously as AP(Master) and STA(Client) with 'iw phy':
From the following lines I think it should work:
valid interface combinations:
* #{ managed } <= 2048, #{ AP, mesh point } <= 8, #{ P2P-client, P2P-GO } <= 1, #{ IBSS } <= 1,
total <= 2048, #channels <= 1, STA/AP BI must match, radar detect widths: { 20 MHz (no HT), 20 MHz, 40 MHz }
I did the following configuration changes with LuCI:
Step 1: In Network > Interfaces, I removed the default WAN and WAN6 interface
Step 2: In Network > Switch, I removed Vlan2 and added the second ethernet port (previous WAN) to Vlan1. Both ethernet ports are now in Vlan1 (LAN).
Step 3: In Network > Wireless I added a wireless interface by scanning and joining the current network.
Mode is Client and the attached network is wwan.
I applied the changes and rebooted the router to test the results so far.
My laptop is connected to the ethernet port of the router and has internet access via the client interface to the current network, so far so good.
The Problem
When I add a wireless interface as AP, attached to the lan network, the results are that both client and master are disabled.
These are my etc/config/ network and wireless files:
etc/config/network
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fdb9:fa67:52d7::/48'
config interface 'lan'
option type 'bridge'
option ifname 'eth0.1'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
option ip6assign '60'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option vid '1'
option ports '0t 5 1'
config interface 'wwan'
option proto 'dhcp'
etc/config/wireless
config wifi-device 'radio0'
option type 'mac80211'
option hwmode '11a'
option path 'platform/ahb/18100000.wmac'
option htmode 'HT20'
option channel '100'
config wifi-iface 'wifinet0'
option ssid 'Bacon'
option device 'radio0'
option mode 'sta'
option key 'xxxxxx'
option network 'wwan'
option encryption 'psk2'
config wifi-iface 'wifinet1'
option ssid 'OpenWrt'
option device 'radio0'
option mode 'ap'
option network 'lan'
option key 'xxxxxx'
option encryption 'psk2'