User Tools

Site Tools



en:bpi-r3:wlan

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:bpi-r3:wlan [2022/10/07 17:42] – [WLAN] franken:bpi-r3:wlan [2023/06/08 17:06] (current) – external edit 127.0.0.1
Line 4: Line 4:
 [[..:bpi-r2:wlan]] [[..:bpi-r2:wlan]]
  
-  apt install iw wireless-regdb crda+  apt install hostapd iw wireless-regdb crda dnsmasq rfkill
   iw reg set DE   iw reg set DE
  
-2g4-config (wlan0): +WiFi connectors are U.FL
-<code> +
-#ctrl_interface=/var/run/hostapd +
-#ctrl_interface_group=0 # These 2 are just parameters so that the hostap daemon +
-runs.+
  
-interface=wlan0 +without rfkill hostapd does not start and prints this error:
-#interface=ap0 +
-driver=nl80211+
  
-ssid=r3_AP0+  Feb 12 09:56:39 bpi-r3 hostapd[2764]: wlan1: IEEE 802.11 Configured channel (40) not found from the channel list of current mode (2) IEEE 802.11a 
 +  Feb 12 09:56:39 bpi-r3 hostapd[2764]: wlan1: IEEE 802.11 Hardware does not support configured channel
  
-hw_mode=g +and iw shows "(no IR)" after all channels
-#channel=2 +
-#channel=4 +
-channel=1 +
-#macaddr_acl=0 +
-auth_algs=1 +
-#ignore_broadcast_ssid=0 +
-wpa=2 +
-wmm_enabled=1 +
-wpa_passphrase=12345678 +
-wpa_key_mgmt=WPA-PSK +
-wpa_pairwise=TKIP +
-rsn_pairwise=CCMP +
-</code>+
  
-5g-config (wlan1): +ubuntu does not have the crda tool and so cfg80211 needs the regulatory.db
-<code> +
-ctrl_interface=/var/run/hostapd_2 +
-#ctrl_interface_group=0 # These 2 are just parameters so that the hostap daemon +
-runs.+
  
-interface=wlan1 +it can be installed with wireless-regdb or copy  regulatory.db and regulatory.db.p7s from https://mirrors.edge.kernel.org/pub/software/network/wireless-regdb/
-#interface=ap0 +
-driver=nl80211+
  
-ssid=r3_AP1+to load the file cfg80211 needs to be compiled as module and it needs the CONFIG_CFG80211_WEXT option (else you get the error "nl80211 not found" error when using iw). 
 +===== BPI-R3 internal wifi =====
  
-#2.4G +  modprobe mt7915e
-hw_mode=g +
-channel=1 +
- +
-#5G-Support +
-country_code=DE +
-ieee80211n=1 +
-ieee80211d=1 +
-hw_mode=a +
-#34-50 step 2 +
-#channel=40 +
-#channel=44 +
- +
-channel=36 +
-ieee80211h=1 +
-require_vht=1 +
-ht_capab=[GF][HT40+][SHORT-GI-20][SHORT-GI-40][RX-STBC1][DSSS_CCK-40] +
-vht_oper_chwidth=1 +
-vht_capab=[SHORT-GI-80][RX-STBC-1][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN] +
- +
-#42 would be the centered frequency center channel number for 36 primary +
-#channel only if this were a 80 MHz channel, so the combination here is +
-#invalid. You would either need to change this to use vht_oper_chwidth=1 +
-#or set vht_oper_centr_freq_seg0_idx=0 if you want to use a 40 MHz +
-#channel. +
- +
-vht_oper_centr_freq_seg0_idx=42 +
- +
- +
-#channel=60 +
-ieee80211ac=1 +
-wmm_enabled=1 +
- +
-#security +
-wpa=2 +
-wpa_passphrase=12345678 +
-wpa_key_mgmt=WPA-PSK +
-wpa_pairwise=TKIP CCMP +
-#ignore_broadcast_ssid=0 +
-auth_algs=1 +
-#rsn_pairwise=CCMP +
- +
-#macaddr_acl=0 +
-#accept_mac_file=/etc/hostapd/acl_accept +
-#deny_mac_file=/etc/hostapd/acl_deny +
- +
-#macaddr_acl=1 +
-#accept_mac_file=/etc/hostapd/hostapd.allow +
-</code> +
- +
-running hostapd: +
- +
-  hostapd -d hostapd_wlan0.conf &> /tmp/hostapd_wlan0.log & +
-  hostapd -d hostapd_wlan1.conf &> /tmp/hostapd_wlan1.log & +
-===== BPI-R3 internal wifi =====+
  
 <code> <code>
Line 870: Line 793:
                 * [ CONTROL_PORT_OVER_NL80211_TX_STATUS ]: tx status for nl80211 control port support                 * [ CONTROL_PORT_OVER_NL80211_TX_STATUS ]: tx status for nl80211 control port support
 </code> </code>
 +==== hostapd-config ====
 +2g4-config (wlan0):
 +<code>
 +#ctrl_interface=/var/run/hostapd
 +#ctrl_interface_group=0 # These 2 are just parameters so that the hostap daemon
 +runs.
 +
 +interface=wlan0
 +driver=nl80211
 +
 +ssid=r3_AP0
 +
 +hw_mode=g
 +#channel=2
 +#channel=4
 +channel=1
 +#macaddr_acl=0
 +auth_algs=1
 +#ignore_broadcast_ssid=0
 +wpa=2
 +wmm_enabled=1
 +wpa_passphrase=12345678
 +wpa_key_mgmt=WPA-PSK
 +wpa_pairwise=TKIP
 +rsn_pairwise=CCMP
 +</code>
 +
 +5g-config (wlan1):
 +<code>
 +ctrl_interface=/var/run/hostapd_2
 +#ctrl_interface_group=0 # These 2 are just parameters so that the hostap daemon
 +runs.
 +
 +interface=wlan1
 +driver=nl80211
 +
 +ssid=r3_AP1
 +
 +#2.4G
 +hw_mode=g
 +channel=1
 +
 +#5G-Support
 +country_code=DE
 +ieee80211n=1
 +ieee80211d=1
 +hw_mode=a
 +
 +#34-50 step 2
 +channel=36
 +#channel=149
 +
 +ieee80211h=1
 +require_vht=1
 +ht_capab=[GF][HT40+][SHORT-GI-20][SHORT-GI-40][RX-STBC1][DSSS_CCK-40]
 +vht_oper_chwidth=1
 +vht_capab=[SHORT-GI-80][RX-STBC-1][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN]
 +
 +#42 would be the centered frequency center channel number for 36 primary
 +#channel only if this were a 80 MHz channel, so the combination here is
 +#invalid. You would either need to change this to use vht_oper_chwidth=1
 +#or set vht_oper_centr_freq_seg0_idx=0 if you want to use a 40 MHz
 +#channel.
 +
 +#for ch36:
 +vht_oper_centr_freq_seg0_idx=42
 +#for ch149:
 +#vht_oper_centr_freq_seg0_idx=155
 +
 +#channel=60
 +ieee80211ac=1
 +wmm_enabled=1
 +
 +#security
 +wpa=2
 +wpa_passphrase=12345678
 +wpa_key_mgmt=WPA-PSK
 +wpa_pairwise=TKIP CCMP
 +#ignore_broadcast_ssid=0
 +auth_algs=1
 +#rsn_pairwise=CCMP
 +
 +#macaddr_acl=0
 +#accept_mac_file=/etc/hostapd/acl_accept
 +#deny_mac_file=/etc/hostapd/acl_deny
 +
 +#macaddr_acl=1
 +#accept_mac_file=/etc/hostapd/hostapd.allow
 +</code>
 +
 +running hostapd:
 +
 +  hostapd -d hostapd_wlan0.conf &> /tmp/hostapd_wlan0.log &
 +  hostapd -d hostapd_wlan1.conf &> /tmp/hostapd_wlan1.log &
 +
 +
 +Leds are not yet working properly (2g4 is mapped by mt76 driver and can be switched on manually but not off,5g led is still missing)
 +
 +=== Virtual SSID ===
 +
 +https://medium.com/@renaudcerrato/how-to-setup-a-virtual-ssid-with-hostapd-804c13c9a3c2
 +
en/bpi-r3/wlan.1665157356.txt.gz · Last modified: 2023/06/08 17:06 (external edit)