I am trying to setup a NanoPi R5C as a travel router. I just installed the latest snapshot and am having trouble getting my WiFi STA and AP to behave nicely on 2.4 GHz. If I only want the R5C to be an AP, that works fine. If I only want it to be a STA, that works fine. If I want it to be a STA and an AP and the STA is available, that works fine. If I want it to be a STA and an AP and the STA is unavailable, the AP crashes.
I found this old bug (https://dev.archive.openwrt.org/ticket/12000.html) that seems to describe my problem and led me to the travelmate package (https://github.com/openwrt/packages/blob/master/net/travelmate/files/README.md), but that did not fix the problem for me.
The router has a 3rd party Realtek m.2 WiFi card that seems to be supported by OpenWRT and supports AP and STA modes
# lspci -nnks 0000:01:00.0
0000:01:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8822CE 802.11ac PCIe Wireless Network Adapter [10ec:c822]
Subsystem: AzureWave Device [1a3b:3751]
Kernel driver in use: rtw_8822ce
# iw list
Wiphy phy0
...
Supported interface modes:
* IBSS
* managed
* AP
* AP/VLAN
* monitor
* mesh point
...
valid interface combinations:
* #{ managed } <= 1, #{ AP } <= 1,
total <= 2, #channels <= 1
...
My network configuration has a bunch of crap, but I do not think it is causing any issues
# cat network
config interface 'loopback'
option device 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fd9b:cbb3:5a0a::/48'
config device
option name 'eth0'
option macaddr '1e:a9:38:13:57:1f'
config device
option name 'eth1'
option macaddr '1e:a9:38:13:57:1e'
config device
option type 'bridge'
option name 'switch0'
list ports 'eth0'
list ports 'eth1'
option bridge_empty '1'
config interface 'WWAN'
option device 'phy0-sta0'
option proto 'dhcp'
config interface 'WAN'
option device 'switch0.8'
option proto 'dhcp'
config interface 'Home'
option proto 'static'
option device 'switch0.16'
option ipaddr '192.168.16.1'
option netmask '255.255.255.0'
config interface 'IoT'
option proto 'static'
option device 'switch0.17'
option ipaddr '192.168.17.1'
option netmask '255.255.255.0'
config interface 'Guest'
option proto 'static'
option device 'switch0.18'
option ipaddr '192.168.18.1'
option netmask '255.255.255.0'
config interface 'Lab'
option proto 'static'
option device 'switch0.19'
option ipaddr '192.168.19.1'
option netmask '255.255.255.0'
option disabled '1'
config interface 'Management'
option proto 'static'
option device 'switch0.24'
option ipaddr '192.168.24.1'
option netmask '255.255.255.0'
config bridge-vlan
option device 'switch0'
option vlan '8'
list ports 'eth0:t'
list ports 'eth1:u*'
config bridge-vlan
option device 'switch0'
option vlan '16'
list ports 'eth0:u*'
config bridge-vlan
option device 'switch0'
option vlan '17'
list ports 'eth0:t'
config bridge-vlan
option device 'switch0'
option vlan '18'
list ports 'eth0:t'
config bridge-vlan
option device 'switch0'
option vlan '19'
list ports 'eth0:t'
config bridge-vlan
option device 'switch0'
option vlan '24'
list ports 'eth0:t'
# cat firewall
config defaults
option input 'DROP'
option output 'DROP'
option forward 'DROP'
option synflood_protect '1'
config zone
option name 'WAN'
option masq '1'
option mtu_fix '1'
option input 'DROP'
option output 'ACCEPT'
option forward 'DROP'
list network 'WAN'
list network 'WWAN'
config zone
option name 'Home'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'DROP'
list network 'Home'
config zone
option name 'IoT'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'DROP'
list network 'IoT'
config zone
option name 'Guest'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'DROP'
list network 'Guest'
config zone
option name 'Lab'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'DROP'
list network 'Lab'
config zone
option name 'Management'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'DROP'
list network 'Management'
config forwarding
option src 'Home'
option dest 'WAN'
config forwarding
option src 'IoT'
option dest 'WAN'
config forwarding
option src 'Guest'
option dest 'WAN'
config forwarding
option src 'Lab'
option dest 'WAN'
config forwarding
option src 'Management'
option dest 'WAN'
config rule
option name 'Allow-DHCP-Renew'
option src 'WAN'
option proto 'udp'
option dest_port '68'
option target 'ACCEPT'
option family 'ipv4'
# cat dhcp
config dnsmasq
option domainneeded '1'
option boguspriv '1'
option filterwin2k '0'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
option nonegcache '0'
option cachesize '1000'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
option nonwildcard '1'
option localservice '1'
option ednspacket_max '1232'
option filter_aaaa '0'
option filter_a '0'
config dhcp 'WAN'
option interface 'WAN'
option ignore '1'
config dhcp 'Home'
option interface 'Home'
option start '128'
option limit '127'
option leasetime '12h'
config dhcp 'IoT'
option interface 'IoT'
option start '128'
option limit '127'
option leasetime '12h'
config dhcp 'Guest'
option interface 'Guest'
option start '128'
option limit '127'
option leasetime '12h'
config dhcp 'Lab'
option interface 'Lab'
option start '128'
option limit '127'
option leasetime '12h'
config dhcp 'Management'
option interface 'Management'
option start '128'
option limit '127'
option leasetime '12h'
# cat wireless
config wifi-device 'radio0'
option type 'mac80211'
option path '3c0000000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0'
option band '2g'
option htmode 'HT20'
option cell_density '0'
option channel 'auto'
config wifi-iface 'wifinet0'
option device 'radio0'
option mode 'ap'
option ssid 'TheKingOfTown'
option encryption 'psk2'
option key '********'
option network 'Home'
option disabled '0'
config wifi-iface 'trm_uplink2'
option device 'radio0'
option mode 'sta'
option network 'WWAN'
option ssid 'Trogdor'
option encryption 'psk2+ccmp'
option key '********'
option disabled '1'
# cat travelmate
config travelmate 'global'
option trm_enabled '1'
option trm_captive '1'
option trm_proactive '1'
option trm_netcheck '0'
option trm_autoadd '0'
option trm_mail '0'
option trm_debug '1'
option trm_iface 'WWAN'
option trm_vpn '0'
option trm_randomize '0'
option trm_radio 'radio0'
config uplink
option enabled '1'
option device 'radio0'
option ssid 'Trogdor'
option con_start_expiry '0'
option con_end_expiry '0'
option con_start '2024.09.23-15:00:52'