Hi everyone, I'm working on a router with BCM47904 + BCM4366C0 x 2. I've written DTS and built LEDE r3899-dc4eae7a8c, everything except wireless is working now.
The firmware for BCM4366C0 embedded in dhd.ko from stock FW does not work at all (produces timeout on everything, including device initialization), so I used the firmware from Linksys EA9500 instead.
But here comes the problem: no radio could be brought up by netifd. When I do wifi up
, it throws logs as this:
Mon Apr 3 06:43:00 2017 daemon.notice netifd: radio0 (2298): command failed: No error information (-524)
Mon Apr 3 06:43:00 2017 daemon.notice netifd: radio1 (2299): command failed: No error information (-524)
Mon Apr 3 06:43:00 2017 daemon.notice netifd: radio0 (2322): command failed: No error information (-524)
Mon Apr 3 06:43:00 2017 daemon.notice netifd: radio1 (2323): command failed: No error information (-524)
Mon Apr 3 06:43:00 2017 daemon.notice netifd: radio1 (2323): command failed: Not supported (-95)
Mon Apr 3 06:43:00 2017 daemon.notice netifd: radio1 (2323): command failed: I/O error (-5)
Mon Apr 3 06:43:00 2017 daemon.notice netifd: radio1 (2323): command failed: Too many open files in system (-23)
Mon Apr 3 06:43:01 2017 daemon.notice netifd: radio0 (2322): command failed: Not supported (-95)
Mon Apr 3 06:43:01 2017 daemon.notice netifd: radio0 (2322): command failed: I/O error (-5)
Mon Apr 3 06:43:01 2017 daemon.notice netifd: radio0 (2322): command failed: Too many open files in system (-23)
Mon Apr 3 06:43:01 2017 daemon.notice netifd: radio1 (2323): command failed: Too many open files in system (-23)
Mon Apr 3 06:43:01 2017 daemon.notice netifd: radio1 (2323): Device setup failed: INTERFACE_CREATION_FAILED
Mon Apr 3 06:43:01 2017 daemon.notice netifd: radio1 (2323): WARNING: Variable 'interfaces' does not exist or is not an array/object
Mon Apr 3 06:43:02 2017 daemon.notice netifd: radio0 (2322): command failed: Too many open files in system (-23)
Mon Apr 3 06:43:02 2017 daemon.notice netifd: radio0 (2322): Device setup failed: INTERFACE_CREATION_FAILED
Mon Apr 3 06:43:02 2017 daemon.notice netifd: radio0 (2322): WARNING: Variable 'interfaces' does not exist or is not an array/object
If I remove this line from /lib/netifd/wireless/mac80211.sh
,
--- mac80211.sh 2017-04-03 18:13:04.995895072 +0800
+++ mac80211.sh 2017-04-03 18:14:44.499560705 +0800
@@ -473,7 +473,7 @@
mac80211_hostapd_setup_bss "$phy" "$ifname" "$macaddr" "$type" || return
[ -n "$hostapd_ctrl" ] || {
- mac80211_iw_interface_add "$phy" "$ifname" __ap || return
+ #mac80211_iw_interface_add "$phy" "$ifname" __ap || return
hostapd_ctrl="${hostapd_ctrl:-/var/run/hostapd/$ifname}"
}
;;
the radio works, SSIDs get broadcast, but clients can not connect:
Mon Apr 3 06:48:19 2017 daemon.notice netifd: radio0 (2776): command failed: No error information (-524)
Mon Apr 3 06:48:20 2017 daemon.notice netifd: radio1 (2777): command failed: No error information (-524)
Mon Apr 3 06:48:20 2017 daemon.notice netifd: radio0 (2797): command failed: No error information (-524)
Mon Apr 3 06:48:20 2017 daemon.notice netifd: radio1 (2801): command failed: No error information (-524)
Mon Apr 3 06:48:20 2017 daemon.notice netifd: radio0 (2797): command failed: Not supported (-95)
Mon Apr 3 06:48:20 2017 daemon.notice netifd: radio0 (2797): command failed: I/O error (-5)
Mon Apr 3 06:48:20 2017 daemon.err hostapd: Configuration file: /var/run/hostapd-phy0.conf
Mon Apr 3 06:48:20 2017 daemon.err hostapd: Failed to create interface mon.wlan0: -95 (Not supported)
Mon Apr 3 06:48:20 2017 kern.info kernel: [ 636.198690] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
Mon Apr 3 06:48:20 2017 kern.info kernel: [ 636.206368] br-lan: port 2(wlan0) entered blocking state
Mon Apr 3 06:48:20 2017 kern.info kernel: [ 636.211698] br-lan: port 2(wlan0) entered disabled state
Mon Apr 3 06:48:20 2017 kern.info kernel: [ 636.217308] device wlan0 entered promiscuous mode
Mon Apr 3 06:48:20 2017 daemon.notice hostapd: wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Mon Apr 3 06:48:20 2017 daemon.warn hostapd: wlan0: Could not connect to kernel driver
Mon Apr 3 06:48:20 2017 daemon.err hostapd: Using interface wlan0 with hwaddr d8:c8:e9:fe:c6:6d and ssid "LEDE-HT"
Mon Apr 3 06:48:20 2017 kern.info kernel: [ 636.430100] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Mon Apr 3 06:48:20 2017 kern.info kernel: [ 636.436623] br-lan: port 2(wlan0) entered blocking state
Mon Apr 3 06:48:20 2017 kern.info kernel: [ 636.441971] br-lan: port 2(wlan0) entered forwarding state
Mon Apr 3 06:48:20 2017 daemon.notice hostapd: wlan0: interface state COUNTRY_UPDATE->ENABLED
Mon Apr 3 06:48:20 2017 daemon.notice hostapd: wlan0: AP-ENABLED
Mon Apr 3 06:48:20 2017 daemon.notice netifd: Network device 'wlan0' link is up
Mon Apr 3 06:48:21 2017 daemon.notice netifd: radio1 (2801): command failed: Not supported (-95)
Mon Apr 3 06:48:21 2017 daemon.notice netifd: radio1 (2801): command failed: I/O error (-5)
Mon Apr 3 06:48:21 2017 daemon.err hostapd: Configuration file: /var/run/hostapd-phy1.conf
Mon Apr 3 06:48:21 2017 daemon.err hostapd: Failed to create interface mon.wlan1: -95 (Not supported)
Mon Apr 3 06:48:21 2017 kern.info kernel: [ 637.259353] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
Mon Apr 3 06:48:21 2017 kern.info kernel: [ 637.266882] br-lan: port 3(wlan1) entered blocking state
Mon Apr 3 06:48:21 2017 kern.info kernel: [ 637.272251] br-lan: port 3(wlan1) entered disabled state
Mon Apr 3 06:48:21 2017 kern.info kernel: [ 637.277837] device wlan1 entered promiscuous mode
Mon Apr 3 06:48:21 2017 daemon.notice hostapd: wlan1: interface state UNINITIALIZED->COUNTRY_UPDATE
Mon Apr 3 06:48:21 2017 daemon.notice hostapd: wlan1: interface state COUNTRY_UPDATE->HT_SCAN
Mon Apr 3 06:48:21 2017 daemon.warn hostapd: wlan1: Could not connect to kernel driver
Mon Apr 3 06:48:21 2017 daemon.err hostapd: Using interface wlan1 with hwaddr d8:c8:e9:fe:c6:6e and ssid "LEDE-HT-5G"
Mon Apr 3 06:48:21 2017 kern.info kernel: [ 637.787532] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
Mon Apr 3 06:48:21 2017 kern.info kernel: [ 637.794027] br-lan: port 3(wlan1) entered blocking state
Mon Apr 3 06:48:21 2017 kern.info kernel: [ 637.799362] br-lan: port 3(wlan1) entered forwarding state
Mon Apr 3 06:48:21 2017 daemon.notice hostapd: wlan1: interface state HT_SCAN->ENABLED
Mon Apr 3 06:48:21 2017 daemon.notice hostapd: wlan1: AP-ENABLED
Mon Apr 3 06:48:21 2017 daemon.notice netifd: Network device 'wlan1' link is up
Mon Apr 3 06:48:35 2017 daemon.info hostapd: wlan1: STA c0:ee:fb:02:c3:fb IEEE 802.11: associated
Mon Apr 3 06:48:35 2017 daemon.notice hostapd: wlan1: AP-STA-CONNECTED c0:ee:fb:02:c3:fb
Mon Apr 3 06:48:35 2017 daemon.info hostapd: wlan1: STA c0:ee:fb:02:c3:fb IEEE 802.11: disassociated
Mon Apr 3 06:48:35 2017 daemon.notice hostapd: wlan1: AP-STA-DISCONNECTED c0:ee:fb:02:c3:fb
Mon Apr 3 06:48:35 2017 daemon.info hostapd: wlan1: STA c0:ee:fb:02:c3:fb IEEE 802.11: disassociated
Mon Apr 3 06:48:36 2017 daemon.info hostapd: wlan1: STA c0:ee:fb:02:c3:fb IEEE 802.11: disassociated
Wireshark shows the router sends DEAUTH after the client's first packet with reason 7.
However, if I copy the hostapd conf from /var/run/hostapd-* to somewhere else, and start hostapd manually, both radio will work:
root@LEDE:~# cp /var/run/hostapd-phy* /var
root@LEDE:~# wifi down
root@LEDE:~# hostapd -s -B /var/hostapd-phy0.conf
root@LEDE:~# hostapd -s -B /var/hostapd-phy1.conf
Mon Apr 3 06:52:30 2017 daemon.err hostapd: Configuration file: /var/run/hostapd-phy0.conf
Mon Apr 3 06:52:30 2017 daemon.err hostapd: Failed to create interface mon.wlan0: -95 (Not supported)
Mon Apr 3 06:52:30 2017 kern.info kernel: [ 886.017318] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
Mon Apr 3 06:52:30 2017 kern.info kernel: [ 886.024574] br-lan: port 2(wlan0) entered blocking state
Mon Apr 3 06:52:30 2017 kern.info kernel: [ 886.029901] br-lan: port 2(wlan0) entered disabled state
Mon Apr 3 06:52:30 2017 kern.info kernel: [ 886.035484] device wlan0 entered promiscuous mode
Mon Apr 3 06:52:30 2017 daemon.notice hostapd: wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Mon Apr 3 06:52:30 2017 daemon.warn hostapd: wlan0: Could not connect to kernel driver
Mon Apr 3 06:52:30 2017 daemon.err hostapd: Using interface wlan0 with hwaddr d8:c8:e9:fe:c6:6d and ssid "LEDE-HT"
Mon Apr 3 06:52:30 2017 kern.info kernel: [ 886.266236] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Mon Apr 3 06:52:30 2017 kern.info kernel: [ 886.272768] br-lan: port 2(wlan0) entered blocking state
Mon Apr 3 06:52:30 2017 kern.info kernel: [ 886.278097] br-lan: port 2(wlan0) entered forwarding state
Mon Apr 3 06:52:30 2017 daemon.notice hostapd: wlan0: interface state COUNTRY_UPDATE->ENABLED
Mon Apr 3 06:52:30 2017 daemon.notice hostapd: wlan0: AP-ENABLED
Mon Apr 3 06:52:32 2017 daemon.err hostapd: Configuration file: /var/run/hostapd-phy1.conf
Mon Apr 3 06:52:32 2017 daemon.err hostapd: Failed to create interface mon.wlan1: -95 (Not supported)
Mon Apr 3 06:52:32 2017 kern.info kernel: [ 888.508936] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
Mon Apr 3 06:52:32 2017 kern.info kernel: [ 888.516245] br-lan: port 3(wlan1) entered blocking state
Mon Apr 3 06:52:32 2017 kern.info kernel: [ 888.521578] br-lan: port 3(wlan1) entered disabled state
Mon Apr 3 06:52:32 2017 kern.info kernel: [ 888.527217] device wlan1 entered promiscuous mode
Mon Apr 3 06:52:32 2017 daemon.notice hostapd: wlan1: interface state UNINITIALIZED->COUNTRY_UPDATE
Mon Apr 3 06:52:32 2017 daemon.notice hostapd: wlan1: interface state COUNTRY_UPDATE->HT_SCAN
Mon Apr 3 06:52:32 2017 daemon.warn hostapd: wlan1: Could not connect to kernel driver
Mon Apr 3 06:52:32 2017 daemon.err hostapd: Using interface wlan1 with hwaddr d8:c8:e9:fe:c6:6e and ssid "LEDE-HT-5G"
Mon Apr 3 06:52:33 2017 kern.info kernel: [ 889.074521] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
Mon Apr 3 06:52:33 2017 kern.info kernel: [ 889.081012] br-lan: port 3(wlan1) entered blocking state
Mon Apr 3 06:52:33 2017 kern.info kernel: [ 889.086357] br-lan: port 3(wlan1) entered forwarding state
Mon Apr 3 06:52:33 2017 daemon.notice hostapd: wlan1: interface state HT_SCAN->ENABLED
Mon Apr 3 06:52:33 2017 daemon.notice hostapd: wlan1: AP-ENABLED
Mon Apr 3 06:52:39 2017 daemon.info hostapd: wlan1: STA c0:ee:fb:02:c3:fb IEEE 802.11: associated
Mon Apr 3 06:52:39 2017 daemon.notice hostapd: wlan1: AP-STA-CONNECTED c0:ee:fb:02:c3:fb
Mon Apr 3 06:52:42 2017 daemon.info dnsmasq-dhcp[1461]: DHCPDISCOVER(br-lan) c0:ee:fb:02:c3:fb
Mon Apr 3 06:52:42 2017 daemon.info dnsmasq-dhcp[1461]: DHCPOFFER(br-lan) 192.168.1.199 c0:ee:fb:02:c3:fb
Mon Apr 3 06:52:42 2017 daemon.info dnsmasq-dhcp[1461]: DHCPDISCOVER(br-lan) c0:ee:fb:02:c3:fb
Mon Apr 3 06:52:42 2017 daemon.info dnsmasq-dhcp[1461]: DHCPOFFER(br-lan) 192.168.1.199 c0:ee:fb:02:c3:fb
Mon Apr 3 06:52:42 2017 daemon.info dnsmasq-dhcp[1461]: DHCPREQUEST(br-lan) 192.168.1.199 c0:ee:fb:02:c3:fb
Mon Apr 3 06:52:42 2017 daemon.info dnsmasq-dhcp[1461]: DHCPACK(br-lan) 192.168.1.199 c0:ee:fb:02:c3:fb android-6eb6e22865f4f3d
Here is my /etc/config/wireless
:
config wifi-device 'radio0'
option type 'mac80211'
option channel '11'
option hwmode '11g'
option path '18000000.axi/bcma0:7/pci0000:00/0000:00:00.0/0000:01:00.0'
option htmode 'HT20'
option country '00'
config wifi-iface 'default_radio0'
option device 'radio0'
option network 'lan'
option mode 'ap'
option ssid 'LEDE-HT'
option encryption 'none'
config wifi-device 'radio1'
option type 'mac80211'
option hwmode '11a'
option path '18000000.axi/bcma0:8/pci0001:00/0001:00:00.0/0001:01:00.0'
option log_level '1'
option country 'US'
option channel '161'
option htmode 'VHT80'
config wifi-iface 'default_radio1'
option device 'radio1'
option network 'lan'
option mode 'ap'
option ssid 'LEDE-HT-5G'
option key '12345678'
option encryption 'none'
I couldn't find out what had gone wrong. Any help is greatly appreciated. Thanks!