I'm chasing an issue with current snapshot. (I've seen previous threads from several years ago but they don't seem reflect the issue I'm seeing)
I have two tplink routers, primary c7-v5 and a d7-v1. They are connected via a wifi trunk with a vxlan interface as a tunnel for the vlan traffic.
Primary c7-v5 is the device exhibiting the issue.
C7-v5 primary wifi both 2g and 5g appear to fail with current snapshot r25464-79ee4cb039 but works with a previous snapshot r24710-b22539b5fe. The d7-v1 is working ok with the current snapshot r25464-79ee4cb039.
Primary c7-v5 has 1 master on 5g and three masters on 2g, d7-v1 has 1 master on 5g and 2 masters on 2g and a client.
The wireless config on both devices is identical except for the extra master on the c7-v5 and the client on the d7-v1.
I'll investigate further tomorrow by changing one of the masters on the c7-v5 into a client to see if it will allow the wifi interfaces to come up as I suspect it's something to do with the client being present on the d7-v1 that's allowing it to work.
As the exact same config on the c7-v5 works on the earlier snapshot and not on the current snapshot it's leading me to believe that a change somewhere in the code is the culprit but I'm not sure how to extract the changes between versions.
I create my binaries using imagebuilder.
Sorry, but all I could understand about your issue is that something appears to fail...
Fair call. It was late when i wrote the OP.
Basically the wireless interfaces on the c7-v5 fail to stay up with current snapshot. Same config on earlier snapshot worked fine.
Only error messages I can find in the logs on the c7-v5 device are as per the thread title
Tue Mar 12 10:12:15 2024 daemon.notice hostapd: Configuration file: data: driver=nl80211 logger_syslog=127 logger_syslog_level=2 logger_stdout=127 logger_stdout_level=2 country_code=AU ieee80211d=1 hw_mode=g supported_rates=60 90 120 180 240 360 480 540 basic_rates=60 120 240 beacon_int=100 chanlist=11 noscan=1 #num_global_macaddr=1 ieee80211n=1 ht_coex=0 ht_capab=[HT40-][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1][DSSS_CCK-40] channel=11 interface=2gwlan1 bssid=b0:be:76:e9:d4:47 ctrl_interface=/var/run/hostapd ap_isolate=1 bss_load_update_period=60 chan_util_avg_period=600 disassoc_low_ack=1 skip_inactivity_poll=0 preamble=1 wmm_enabled=1 ignore_broadcast_ssid=0 uapsd_advertisement_enabled=1 utf8_ssid=1 multi_ap=0 wpa_passphrase=xxxx wpa_psk_file=/var/run/hostapd-2gwlan1.psk auth_algs=1 wpa=2 wpa_pairwise=CCMP ssid=sages bridge=br-lan wds_bridge= snoop_iface=br-lan wpa_disable_eapol_key_retries=0 wpa_key_mgmt=WPA-PSK okc=0 disable_pmksa_caching=1 dynamic_vlan=0 vlan_naming=1 vlan_no_bridge=1 vlan_file=/var/run/hostapd-
Tue Mar 12 10:12:15 2024 daemon.err hostapd: Multiple BSSes specified in BSS-config
Tue Mar 12 10:12:15 2024 daemon.notice hostapd: hostapd.add_iface failed for phy phy1 ifname=2gwlan1
There is a 2nd tplink router in use, d7-v1 which does not exhibit any issues with the current snapshot.
The configuration for wireless for both devices is identical except the d7-v1 has one less AP configured as it is a client to the c7-v5.
All things being equal, it worked in a previous snapshot and now one device has wifi failing to start with a current snapshot. Something has changed between snapshots.
wireless config from c7-v5, the wireless config for the d7-v1 only differs on the 'slink' ssid being a client instead of an 'ap'.
config wifi-device 'radio0'
option type 'mac80211'
option path 'pci0000:00/0000:00:00.0'
option channel '157'
option band '5g'
option htmode 'VHT80'
option country 'AU'
option cell_density '0'
config wifi-device 'radio1'
option type 'mac80211'
option path 'platform/ahb/18100000.wmac'
option channel '11'
option band '2g'
option htmode 'HT40'
option cell_density '0'
option country 'AU'
option noscan '1'
config wifi-iface 'wifinet1'
option device 'radio1'
option ssid 'slink'
option key 'xxx'
option mode 'ap'
option ifname '2glnk'
option encryption 'psk2+ccmp'
option network 'trunk'
config wifi-iface 'default_radio0'
option device 'radio0'
option mode 'ap'
option encryption 'psk2+ccmp'
option key 'xxx'
option network 'lan'
option ifname '5gwlan1'
option ssid 'sages'
config wifi-iface 'wifinet0'
option device 'radio1'
option mode 'ap'
option key 'xxx'
option network 'lan'
option ifname '2gwlan1'
option ssid 'sages'
option encryption 'psk2+ccmp'
config wifi-iface 'wifinet3'
option device 'radio1'
option mode 'ap'
option ssid 'siot'
option encryption 'psk2+ccmp'
option key 'xxx'
option network 'iot'
option ifname '2giot'
I currently suspect that there is some issue with multiple ssid without a client config (ie wpa-supplicant) that is causing the wireless to fail.
I'm constrained on when I can work on this but will post back when I do.
Basically I was looking to see if anyone was aware of any changes to the wireless config (wpad/hostapd/wpa_supplicant) recently that may give me a pointer to investigate further.
fwiw I've been doing a comparison between the two snapshots looking for package updates and observed that the 'working snapshot on the c7-v5 didn't include a package called 'wifi-scripts' where the latest snapshot does.
The error message originates in wpad, I'm trying to work backwards to determine the source of the failure.
The log entry above appears to be truncated but I don't know if that is as a result of the log system truncating it or the process that creates it.
On the 'working' d7-v1 with current snapshot tried to disable one of the ap and observed the following:
prior to the disable:
root@sageap2:~# ls -l /var/run
drwxr-xr-x 2 root root 40 Mar 12 16:37 collectd
-rw-r--r-- 1 root root 1023 Mar 12 16:37 config.md5
drwxr-xr-x 2 dnsmasq dnsmasq 60 Mar 12 16:37 dnsmasq
-rw-r--r-- 1 root root 5 Mar 12 16:37 dropbear.1.pid
-rw-r--r-- 1 root root 0 Mar 13 07:40 fw4.lock
-rw-r--r-- 1 root root 6161 Mar 13 07:40 fw4.state
drwxr-xr-x 2 network network 120 Mar 12 16:38 hostapd
-rw-r--r-- 1 root root 0 Mar 12 16:37 hostapd-2giot.psk
-rw-r--r-- 1 root root 0 Mar 12 16:37 hostapd-2giot.vlan
-rw-r--r-- 1 root root 0 Mar 12 16:37 hostapd-2gwlan1.psk
-rw-r--r-- 1 root root 0 Mar 12 16:37 hostapd-2gwlan1.vlan
-rw-r--r-- 1 root root 0 Mar 12 16:37 hostapd-5gwlan1.psk
-rw-r--r-- 1 root root 0 Mar 12 16:37 hostapd-5gwlan1.vlan
-rw-r--r-- 1 root root 1249 Mar 12 16:37 hostapd-phy0.conf
-rw-r--r-- 1 root root 1753 Mar 12 16:37 hostapd-phy1.conf
-rw-r--r-- 1 root root 0 Mar 12 16:37 hostapd.lock
-rw-r--r-- 1 root root 92 Mar 12 16:37 led.state
drwx------ 2 root root 40 Mar 12 16:37 rpcd
drwxr-xr-x 2 ubus ubus 60 Jan 1 1970 ubus
-rw-r--r-- 1 root root 5 Mar 12 16:37 udhcpc-eth0.2.pid
-rw-r--r-- 1 root root 3 Mar 12 16:37 wdev-phy0.json
-rw-r--r-- 1 root root 3 Mar 12 16:38 wdev-phy1.json
drwxr-xr-x 2 network network 80 Mar 12 16:38 wpa_supplicant
-rw-r--r-- 1 root root 113 Mar 12 16:37 wpa_supplicant-2glnk.conf
root@sageap2:~# ls -l /var/run/hostapd
srwxrwx--- 1 network network 0 Mar 12 16:38 2giot
srwxrwx--- 1 network network 0 Mar 12 16:38 2gwlan1
srwxrwx--- 1 network network 0 Mar 12 16:37 5gwlan1
srwxrwx--- 1 network network 0 Mar 12 16:37 global
root@sageap2:~# cat /var/run/hostapd-phy1.conf
driver=nl80211
logger_syslog=127
logger_syslog_level=2
logger_stdout=127
logger_stdout_level=2
country_code=AU
ieee80211d=1
hw_mode=g
supported_rates=60 90 120 180 240 360 480 540
basic_rates=60 120 240
beacon_int=100
channel=11
chanlist=11
noscan=1
#num_global_macaddr=1
ieee80211n=1
ht_coex=0
ht_capab=[HT40-][LDPC][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1][DSSS_CCK-40]
interface=2gwlan1
ctrl_interface=/var/run/hostapd
ap_isolate=1
bss_load_update_period=60
chan_util_avg_period=600
disassoc_low_ack=1
skip_inactivity_poll=0
preamble=1
wmm_enabled=1
ignore_broadcast_ssid=0
uapsd_advertisement_enabled=1
utf8_ssid=1
multi_ap=0
wpa_passphrase=zzyyxx
wpa_psk_file=/var/run/hostapd-2gwlan1.psk
auth_algs=1
wpa=2
wpa_pairwise=CCMP
ssid=sages
bridge=br-lan
wds_bridge=
snoop_iface=br-lan
wpa_disable_eapol_key_retries=0
wpa_key_mgmt=WPA-PSK
okc=0
disable_pmksa_caching=1
dynamic_vlan=0
vlan_naming=1
vlan_no_bridge=1
vlan_file=/var/run/hostapd-2gwlan1.vlan
qos_map_set=0,0,2,16,1,1,255,255,18,22,24,38,40,40,44,46,48,56
bssid=ea:de:27:4d:a9:e0
#default_macaddr
bss=2giot
ctrl_interface=/var/run/hostapd
ap_isolate=1
bss_load_update_period=60
chan_util_avg_period=600
disassoc_low_ack=1
skip_inactivity_poll=0
preamble=1
wmm_enabled=1
ignore_broadcast_ssid=0
uapsd_advertisement_enabled=1
utf8_ssid=1
multi_ap=0
wpa_passphrase=xxyyzz
wpa_psk_file=/var/run/hostapd-2giot.psk
auth_algs=1
wpa=2
wpa_pairwise=CCMP
ssid=siot
bridge=br-iot
wds_bridge=
snoop_iface=br-iot
wpa_disable_eapol_key_retries=0
wpa_key_mgmt=WPA-PSK
okc=0
disable_pmksa_caching=1
dynamic_vlan=0
vlan_naming=1
vlan_no_bridge=1
vlan_file=/var/run/hostapd-2giot.vlan
qos_map_set=0,0,2,16,1,1,255,255,18,22,24,38,40,40,44,46,48,56
bssid=ee:de:27:4d:a9:e0
#default_macaddr
after I disabled the 2giot ap I get the following error:
Wed Mar 13 13:56:13 2024 daemon.notice netifd: radio1 (13887): sh: out of range
Wed Mar 13 13:56:13 2024 daemon.notice wpa_supplicant[1466]: Set new config for phy phy1
Wed Mar 13 13:56:13 2024 daemon.notice hostapd: Set new config for phy phy1: /var/run/hostapd-phy1.conf
Wed Mar 13 13:56:13 2024 daemon.notice hostapd: Remove bss '2giot' on phy 'phy1'
Wed Mar 13 13:56:13 2024 daemon.notice hostapd: 2giot: AP-DISABLED
Wed Mar 13 13:56:13 2024 daemon.notice hostapd: 2giot: CTRL-EVENT-TERMINATING
Wed Mar 13 13:56:13 2024 daemon.err hostapd: rmdir[ctrl_interface=/var/run/hostapd]: Permission denied
Wed Mar 13 13:56:13 2024 daemon.notice hostapd: nl80211: Failed to remove interface 2giot from bridge br-iot: No such device
Wed Mar 13 13:56:14 2024 daemon.info dnsmasq[1]: read /etc/hosts - 12 names
Wed Mar 13 13:56:14 2024 daemon.info dnsmasq[1]: read /tmp/hosts/dhcp.cfg01411c - 0 names
Wed Mar 13 13:56:14 2024 daemon.notice hostapd: Reloaded settings for phy phy1
Wed Mar 13 13:56:14 2024 daemon.notice wpa_supplicant[1466]: Set new config for phy phy1
Wed Mar 13 13:56:14 2024 daemon.notice netifd: Wireless device 'radio1' is now up
and
root@sageap2:~# ls -l /var/run
drwxr-xr-x 2 root root 40 Mar 12 16:37 collectd
-rw-r--r-- 1 root root 1023 Mar 12 16:37 config.md5
drwxr-xr-x 2 dnsmasq dnsmasq 60 Mar 12 16:37 dnsmasq
-rw-r--r-- 1 root root 5 Mar 12 16:37 dropbear.1.pid
-rw-r--r-- 1 root root 0 Mar 13 07:40 fw4.lock
-rw-r--r-- 1 root root 6161 Mar 13 07:40 fw4.state
drwxr-xr-x 2 network network 100 Mar 13 13:56 hostapd
-rw-r--r-- 1 root root 0 Mar 12 16:37 hostapd-2giot.psk
-rw-r--r-- 1 root root 0 Mar 12 16:37 hostapd-2giot.vlan
-rw-r--r-- 1 root root 0 Mar 13 13:56 hostapd-2gwlan1.psk
-rw-r--r-- 1 root root 0 Mar 13 13:56 hostapd-2gwlan1.vlan
-rw-r--r-- 1 root root 0 Mar 12 16:37 hostapd-5gwlan1.psk
-rw-r--r-- 1 root root 0 Mar 12 16:37 hostapd-5gwlan1.vlan
-rw-r--r-- 1 root root 1249 Mar 12 16:37 hostapd-phy0.conf
-rw-r--r-- 1 root root 1071 Mar 13 13:56 hostapd-phy1.conf
-rw-r--r-- 1 root root 1753 Mar 12 16:37 hostapd-phy1.conf.prev
-rw-r--r-- 1 root root 0 Mar 12 16:37 hostapd.lock
-rw-r--r-- 1 root root 92 Mar 12 16:37 led.state
drwx------ 5 root root 100 Mar 13 13:56 rpcd
drwxr-xr-x 2 ubus ubus 60 Jan 1 1970 ubus
-rw-r--r-- 1 root root 5 Mar 12 16:37 udhcpc-eth0.2.pid
-rw-r--r-- 1 root root 3 Mar 12 16:37 wdev-phy0.json
-rw-r--r-- 1 root root 3 Mar 13 13:56 wdev-phy1.json
drwxr-xr-x 2 network network 60 Mar 13 13:56 wpa_supplicant
-rw-r--r-- 1 root root 113 Mar 13 13:56 wpa_supplicant-2glnk.conf
root@sageap2:~# ls -l /var/run/hostapd
srwxrwx--- 1 network network 0 Mar 12 16:38 2gwlan1
srwxrwx--- 1 network network 0 Mar 12 16:37 5gwlan1
srwxrwx--- 1 network network 0 Mar 12 16:37 global
and
root@sageap2:~# cat /var/run/hostapd-phy1.conf
driver=nl80211
logger_syslog=127
logger_syslog_level=2
logger_stdout=127
logger_stdout_level=2
country_code=AU
ieee80211d=1
hw_mode=g
supported_rates=60 90 120 180 240 360 480 540
basic_rates=60 120 240
beacon_int=100
channel=11
chanlist=11
noscan=1
#num_global_macaddr=1
ieee80211n=1
ht_coex=0
ht_capab=[HT40-][LDPC][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1][DSSS_CCK-40]
interface=2gwlan1
ctrl_interface=/var/run/hostapd
ap_isolate=1
bss_load_update_period=60
chan_util_avg_period=600
disassoc_low_ack=1
skip_inactivity_poll=0
preamble=1
wmm_enabled=1
ignore_broadcast_ssid=0
uapsd_advertisement_enabled=1
utf8_ssid=1
multi_ap=0
wpa_passphrase=kymnic0le
wpa_psk_file=/var/run/hostapd-2gwlan1.psk
auth_algs=1
wpa=2
wpa_pairwise=CCMP
ssid=sages
bridge=br-lan
wds_bridge=
snoop_iface=br-lan
wpa_disable_eapol_key_retries=0
wpa_key_mgmt=WPA-PSK
okc=0
disable_pmksa_caching=1
dynamic_vlan=0
vlan_naming=1
vlan_no_bridge=1
vlan_file=/var/run/hostapd-2gwlan1.vlan
qos_map_set=0,0,2,16,1,1,255,255,18,22,24,38,40,40,44,46,48,56
bssid=ea:de:27:4d:a9:e0
#default_macaddr
And a check by a wifi scanner shows that the actual s2iot ap did disable as selected.
? Is there a permission issue with removing /var/run/hostapd or is it just because there are stilll other files in the folder and the error message is just noise?
? should the /var/run/hostapd-phy1.conf.prev file be deleted as well or is it also just a leftover?
If I disable two of the ap on the c7-v5 leaving one ap enabled, current snapshot and reboot the 2g wifi is working as expected. If I re-enable the 3rd ap it fails. If I then disable 1 of the now enabled ap's, leaving 2 enabled, it stays failed. if I disable another ap, leaving only 1 it still stays failed. It I reboot with 2 ap's enabled it fails.
So
2g only works after reboot if a single ap is configured.
2g will stay working after reboot with a single ap enabled and a 2nd then enabled.
2g fails with 3 enabled.
ap will only work with a single ap enabled at boot.
Is the behaviour reproducible when running /etc/init.d/wpad restart
rather than rebooting?
After loading snapshot from ~21/4/24 router failed as before with same error messages.
Running wpad restart again, both 2g and 5g radio failed to restart with error message
daemon.err hostapd: Multiple BSSes specified in BSS-config
[msg edited] initial test was with one 5g and only two 2g ap enabled, which restarted. with one 5g and three 2g wifi failed as per previously.
So short answer, yes behaviour reproducible when running wpad restart
Thanks for reporting back.
What you describe might be related to a bug that I was hunting for the last few weeks.
I'm getting these messages:
Sun Apr 28 20:37:13 2024 daemon.notice netifd: radio5 (9853): Command failed: ubus call hostapd config_set { "phy": "phy1", "config":"/var/run/hostapd-phy1.conf", "prev_config": "/var/run/hostapd-phy1.conf.prev"} (Request timed out)
Also, there need to be at least four SSIDs (I've also added a mesh interface - I think it makes it break more reliably).
Some of what I've tried/observed is documented in an issue for Openwrt:
Sadly, I won't be working on this for foreseeable future because this bug is driving me mad and I need to be doing something else for a while.
I have this same issue on Netgear R6220, latest snapshot.
Wed May 1 09:45:48 2024 daemon.err hostapd: Multiple BSSes specified in BSS-config
Wed May 1 09:45:48 2024 daemon.notice hostapd: hostapd.add_iface failed for phy phy0 ifname=phy0-ap0
How many ap do you have configured?
for my reproduction, i was using 4 aps + 1 mesh.
my issues went away when i applied nbd's https://github.com/openwrt/openwrt/commit/b6f1e2e5b08eccf23b28c80690d14a3ac6cd08e2.
hopefully, it works for you as well
I think we have a winner. Updated and working. No error messages in the log files and all 3 2g ap and a 5g ap are active.
Well, it boots up ok, just that it crashes after 10-15minutes then every 5 minutes or so. On both the c7v5 and the d7v1.
When it crashes it reboots so the system logs are lost. I've no idea if the crashes are related to the startup fix.
Hmm. Sorry to hear.
That is probably worth figuring out.
You could try setting up a logread -f via ssh and hope that something shows up there before the reset happens.
Otherwise, do you have UART set up?