Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#1133 - Can't set channels 12 and 13 on Raspberry Pi 3 in AP config #6054

Open
openwrt-bot opened this issue Oct 31, 2017 · 7 comments
Open
Labels

Comments

@openwrt-bot
Copy link

valdi74:

It is not possible to set up channel 12/13 on Raspberry Pi 3 in Wifi AP configuration. I get error "brcmfmac: brcmf_cfg80211_start_ap: Set Channel failed: chspec=4109, -20".
Tested on 17.01.1 and latest snapshot (r5217-098afa1).
PS Raspbian works properly on 13 channel as AP.

Logs:
root@LEDE:~# uci show wireless
wireless.radio0=wifi-device
wireless.radio0.type='mac80211'
wireless.radio0.hwmode='11g'
wireless.radio0.path='platform/soc/3f300000.mmc/mmc_host/mmc1/mmc1:0001/mmc1:0001:1'
wireless.radio0.htmode='HT20'
wireless.radio0.disabled='0'
wireless.radio0.country='PL'
wireless.radio0.channel='11'
wireless.default_radio0=wifi-iface
wireless.default_radio0.device='radio0'
wireless.default_radio0.network='lan'
wireless.default_radio0.mode='ap'
wireless.default_radio0.ssid='Dantooine'
wireless.default_radio0.encryption='psk2'
wireless.default_radio0.key='secret'

root@LEDE:~# wifi
[ 828.291269] device wlan0 left promiscuous mode
[ 828.301579] br-lan: port 2(wlan0) entered disabled state
[ 830.594037] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 830.608333] br-lan: port 2(wlan0) entered blocking state
[ 830.619697] br-lan: port 2(wlan0) entered disabled state
[ 830.631336] device wlan0 entered promiscuous mode
[ 830.911507] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 830.924197] br-lan: port 2(wlan0) entered blocking state
[ 830.935606] br-lan: port 2(wlan0) entered forwarding state

root@LEDE:# uci set wireless.radio0.channel=13
root@LEDE:
# uci commit wireless
root@LEDE:~# wifi
[ 913.551274] device wlan0 left promiscuous mode
[ 913.561751] br-lan: port 2(wlan0) entered disabled state
[ 915.854693] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 915.869110] br-lan: port 2(wlan0) entered blocking state
[ 915.880481] br-lan: port 2(wlan0) entered disabled state
[ 915.892046] device wlan0 entered promiscuous mode
[ 916.080443] brcmfmac: brcmf_cfg80211_start_ap: Set Channel failed: chspec=4109, -20
[ 916.131249] device wlan0 left promiscuous mode
[ 916.142014] br-lan: port 2(wlan0) entered disabled state
[ 927.997654] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 928.012458] br-lan: port 2(wlan0) entered blocking state
[ 928.024440] br-lan: port 2(wlan0) entered disabled state
[ 928.036703] device wlan0 entered promiscuous mode
[ 928.222287] brcmfmac: brcmf_cfg80211_start_ap: Set Channel failed: chspec=4109, -20
[ 928.301237] device wlan0 left promiscuous mode
[ 928.312608] br-lan: port 2(wlan0) entered disabled state

root@LEDE:# uci set wireless.radio0.channel=11
root@LEDE:
# uci commit wireless
root@LEDE:~# wifi
[ 990.032785] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 990.048153] br-lan: port 2(wlan0) entered blocking state
[ 990.060246] br-lan: port 2(wlan0) entered disabled state
[ 990.072619] device wlan0 entered promiscuous mode
[ 990.351670] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 990.365070] br-lan: port 2(wlan0) entered blocking state
[ 990.377132] br-lan: port 2(wlan0) entered forwarding state
[ 1000.491313] device wlan0 left promiscuous mode
[ 1000.502769] br-lan: port 2(wlan0) entered disabled state
[ 1002.676007] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 1002.691453] br-lan: port 2(wlan0) entered blocking state
[ 1002.703651] br-lan: port 2(wlan0) entered disabled state
[ 1002.716135] device wlan0 entered promiscuous mode
[ 1003.093512] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 1003.107183] br-lan: port 2(wlan0) entered blocking state
[ 1003.119522] br-lan: port 2(wlan0) entered forwarding state

root@LEDE:~# iw list
Wiphy phy0
max # scan SSIDs: 10
max scan IEs length: 2048 bytes
max # sched scan SSIDs: 16
max # match sets: 16
max # scan plans: 1
max scan plan interval: 508
max scan plan iterations: 0
Retry short limit: 7
Retry long limit: 4
Coverage class: 0 (up to 0m)
Device supports T-DLS.
Available Antennas: TX 0 RX 0
Supported interface modes:
* IBSS
* managed
* AP
* P2P-client
* P2P-GO
* P2P-device
Band 1:
Capabilities: 0x1020
HT20
Static SM Power Save
RX HT20 SGI
No RX STBC
Max AMSDU length: 3839 bytes
DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 16 usec (0x07)
HT TX/RX MCS rate indexes supported: 0-7
Frequencies:
* 2412 MHz [1] (20.0 dBm)
* 2417 MHz [2] (20.0 dBm)
* 2422 MHz [3] (20.0 dBm)
* 2427 MHz [4] (20.0 dBm)
* 2432 MHz [5] (20.0 dBm)
* 2437 MHz [6] (20.0 dBm)
* 2442 MHz [7] (20.0 dBm)
* 2447 MHz [8] (20.0 dBm)
* 2452 MHz [9] (20.0 dBm)
* 2457 MHz [10] (20.0 dBm)
* 2462 MHz [11] (20.0 dBm)
* 2467 MHz [12] (20.0 dBm)
* 2472 MHz [13] (20.0 dBm)****
* 2484 MHz [14] (disabled)
valid interface combinations:
* #{ managed } <= 1, #{ P2P-device } <= 1, #{ P2P-client, P2P-GO } <= 1,
total <= 3, #channels <= 1
* #{ managed } <= 1, #{ AP } <= 1, #{ P2P-client } <= 1, #{ P2P-device } <= 1,
total <= 4, #channels <= 1

@openwrt-bot
Copy link
Author

127.0.0.1:

I also have this problem (it is affected on internal Broadcom wireless card on Raspberry Pi 3 B and 3 B+). The country code setting in OpenWRT does not change the actual country code transmitted in Wireless signal as well as the limitation in each country. The only possible way to change the country code is to boot the latest Raspbian on the Raspberry Pi, use raspi-config to set the correct country code, and go back to OpenWRT.

@openwrt-bot
Copy link
Author

127.0.0.1:

Please note that some countries forbid the use of Channel 12 and 13, and the country code issue is also prevalent in 5Ghz band on Raspberry Pi 3 B+.

Without setting the correct country code in Raspbian on Raspberry Pi 3 B+, the 5Ghz band won't even start in OpenWRT.

@openwrt-bot
Copy link
Author

127.0.0.1:

The BSSID info in my screenshots is omitted for privacy reason. Pay attention to the country code.

@openwrt-bot
Copy link
Author

127.0.0.1:

Relevant system log:
Tue Aug 7 23:25:00 2018 daemon.notice hostapd: wlan0: interface state ENABLED->DISABLED
Tue Aug 7 23:25:00 2018 daemon.notice hostapd: wlan0: AP-DISABLED
Tue Aug 7 23:25:00 2018 daemon.notice hostapd: wlan0: CTRL-EVENT-TERMINATING
Tue Aug 7 23:25:00 2018 daemon.notice hostapd: nl80211: deinit ifname=wlan0 disabled_11b_rates=0
Tue Aug 7 23:25:00 2018 kern.info kernel: [45535.411879] device wlan0 left promiscuous mode
Tue Aug 7 23:25:00 2018 kern.info kernel: [45535.418214] br-lan: port 2(wlan0) entered disabled state
Tue Aug 7 23:25:01 2018 daemon.notice netifd: Network device 'wlan0' link is down
Tue Aug 7 23:25:01 2018 daemon.notice netifd: radio0 (11304): command failed: No error information (-524)
Tue Aug 7 23:25:01 2018 daemon.notice netifd: radio0 (11393): command failed: No error information (-524)
Tue Aug 7 23:25:01 2018 daemon.notice netifd: radio0 (11393): command failed: Not supported (-95)
Tue Aug 7 23:25:01 2018 daemon.notice netifd: radio0 (11393): command failed: I/O error (-5)
Tue Aug 7 23:25:01 2018 daemon.notice netifd: radio0 (11393): command failed: Too many open files in system (-23)
Tue Aug 7 23:25:01 2018 daemon.err hostapd: Configuration file: /var/run/hostapd-phy0.conf
Tue Aug 7 23:25:01 2018 daemon.err hostapd: Failed to create interface mon.wlan0: -95 (Not supported)
Tue Aug 7 23:25:02 2018 kern.info kernel: [45536.666555] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
Tue Aug 7 23:25:02 2018 kern.info kernel: [45536.677443] device wlan0 entered promiscuous mode
Tue Aug 7 23:25:02 2018 daemon.notice hostapd: wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Tue Aug 7 23:25:02 2018 daemon.warn hostapd: wlan0: Could not connect to kernel driver
Tue Aug 7 23:25:02 2018 daemon.err hostapd: Using interface wlan0 with hwaddr b8:27:eb:d1:8d:99 and ssid "Example"
Tue Aug 7 23:25:02 2018 kern.err kernel: [45536.863355] brcmfmac: brcmf_cfg80211_start_ap: Set Channel failed: chspec=4109, -20
Tue Aug 7 23:25:02 2018 daemon.err hostapd: Failed to set beacon parameters
Tue Aug 7 23:25:02 2018 daemon.warn hostapd: wlan0: Could not connect to kernel driver
Tue Aug 7 23:25:02 2018 daemon.err hostapd: Interface initialization failed
Tue Aug 7 23:25:02 2018 daemon.notice hostapd: wlan0: interface state COUNTRY_UPDATE->DISABLED
Tue Aug 7 23:25:02 2018 daemon.notice hostapd: wlan0: AP-DISABLED
Tue Aug 7 23:25:02 2018 daemon.err hostapd: wlan0: Unable to setup interface.
Tue Aug 7 23:25:02 2018 daemon.notice hostapd: wlan0: interface state DISABLED->DISABLED
Tue Aug 7 23:25:02 2018 daemon.notice hostapd: wlan0: AP-DISABLED
Tue Aug 7 23:25:02 2018 daemon.notice hostapd: wlan0: CTRL-EVENT-TERMINATING
Tue Aug 7 23:25:02 2018 daemon.err hostapd: hostapd_free_hapd_data: Interface wlan0 wasn't started
Tue Aug 7 23:25:02 2018 daemon.notice hostapd: nl80211: deinit ifname=wlan0 disabled_11b_rates=0
Tue Aug 7 23:25:02 2018 kern.info kernel: [45536.921843] device wlan0 left promiscuous mode
Tue Aug 7 23:25:02 2018 kern.info kernel: [45536.928358] br-lan: port 2(wlan0) entered disabled state
Tue Aug 7 23:25:02 2018 daemon.info odhcpd[337]: Using a RA lifetime of 0 seconds on br-lan
Tue Aug 7 23:25:02 2018 daemon.notice hostapd: ELOOP: remaining socket: sock=19 eloop_data=0x76ec9f00 user_data=0 handler=0x3e654
Tue Aug 7 23:25:02 2018 daemon.notice netifd: radio0 (11393): Device setup failed: HOSTAPD_START_FAILED
Relevant kernel log:
[45301.721180] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[45301.734096] device wlan0 entered promiscuous mode
[45302.037213] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[45302.046234] br-lan: port 2(wlan0) entered forwarding state
[45302.054050] br-lan: port 2(wlan0) entered forwarding state
[45304.049410] br-lan: port 2(wlan0) entered forwarding state
[45428.506314] device wlan0 left promiscuous mode
[45428.513048] br-lan: port 2(wlan0) entered disabled state
[45429.910348] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[45429.922757] device wlan0 entered promiscuous mode
[45430.217093] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[45430.225958] br-lan: port 2(wlan0) entered forwarding state
[45430.233569] br-lan: port 2(wlan0) entered forwarding state
[45432.230679] br-lan: port 2(wlan0) entered forwarding state
[45535.411879] device wlan0 left promiscuous mode
[45535.418214] br-lan: port 2(wlan0) entered disabled state
[45536.666555] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[45536.677443] device wlan0 entered promiscuous mode
[45536.863355] brcmfmac: brcmf_cfg80211_start_ap: Set Channel failed: chspec=4109, -20
[45536.921843] device wlan0 left promiscuous mode
[45536.928358] br-lan: port 2(wlan0) entered disabled state

@openwrt-bot
Copy link
Author

artynet:

any update on this ? I am experiencing the issue on the latest trunk running kernel v4.19.69 as well...

Thank you very much in advance !

Kind Regards

@openwrt-bot
Copy link
Author

Noltari:

Hi,

Can you try replacing your /lib/firmware/brcm files with the ones provided by Cypress?
https://community.cypress.com/docs/DOC-17441
Alt link: https://github.com/Noltari/cypress-firmware
For RPi you need to add/replace the following files:

  • brcmfmac43430-sdio.bin
  • brcmfmac43430-sdio.clm_blob
    brcmfmac43430-sdio.raspberrypi,3-model-b.txt should match the one in the latest OpenWrt images.

BTW, you should set your country code to a proper value (a country with those channels available).

I've contacted Cypress to see if I can redistribute their binaries but I didn't get an answer yet:
https://community.cypress.com/thread/48885

Best regards,
Álvaro.

@openwrt-bot
Copy link
Author

artynet:

unfortunately the problem still persists....my country has been set via UCI commit :

$ uci set wireless.radio0.country="IT"

and with the iw command :

$ iw reg set IT

As far as it concerns the firmware, I replaced the entire folder with the whole downloaded repository.

I think we should closely review the mac80211 openwrt custom patches both for the general subsystem and for the broadcomm driver.

Kind Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant