Skip to content

Commit

Permalink
k5.12 support
Browse files Browse the repository at this point in the history
  • Loading branch information
morrownr committed Mar 1, 2021
1 parent f2d4086 commit 341fbd0
Show file tree
Hide file tree
Showing 5 changed files with 272 additions and 53 deletions.
176 changes: 136 additions & 40 deletions Bridged Wireless Access Point → Bridged_Wireless_Access_Point.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,42 @@ ethernet network to extend the network to WiFi capable computers
and devices in areas where the WiFi signal is weak or otherwise
does not meet expectations.

Known issues:

- WPA3-SAE operation is not testing good at this time and is disabled.
- 80 MHz channel width causes problems in some setups and is disabled.

This document is for WiFi adapters based on the following chipset
```
rtl8814au
```
Note: Recommend use of a powered USB 3 hub when using adapters with
this chipset as it uses a lot of power.

2021-01-24
2021-02-20

Tested setup:
##### Tested Setup

- Raspberry Pi 4B (4gb)

- Raspberry Pi OS (2021-01-11) (32 bit)
- Raspberry Pi OS (2021-01-11) (32 bit) (kernel 5.10.11-v7l+)

- Onboard WiFi disabled
- Raspberry Pi Onboard WiFi disabled

- USB WiFi Adapter based on the rtl8814au chipset

- WiFi Adapter Driver: https://github.com/morrownr/8814au
- WiFi Adapter Driver - https://github.com/morrownr/8814au

- Ethernet connection providing internet
- Ethernet cables are CAT 6
- Internet is Fiber-optic at 1 GHz up and 1 GHz down

Note: Recommend use of a powered USB 3 hub when using
adapters with this chipset as it uses a lot of power.
- Internet is Fiber-optic at 1 Gbps up and 1 Gbps down

##### Steps

1. Disable Raspberry Pi onboard WiFi.

Note: Disregard if not installing to Raspberry Pi hardware.
Note: Disregard this step if not installing to Raspberry Pi hardware.
```
$ sudo nano /boot/config.txt
```
Expand All @@ -54,14 +58,21 @@ https://github.com/morrownr/8814au

-----

3. Change driver options (to allow full speed operation.)
3. Change driver options (to allow high speed operation.)

```
$ sudo nano /etc/modprobe.d/8814au.conf
```
```
rtw_vht_enable=2 (enable 80 Mhz channel width - 80211AC support)
rtw_switch_usb_mode=1 (enable USB 3 support)
```
Note: You may try to use the following setting once you have a
stable setup going but I consider it to be unstable on this
device at this time.
```
rtw_vht_enable=2 (enable 80 Mhz channel width)
```

-----

4. Update system.
Expand Down Expand Up @@ -163,60 +174,145 @@ $ sudo nano /etc/hostapd/hostapd.conf
```
File contents
```
# hostapd.conf
# /etc/hostapd/hostapd.conf
# https://w1.fi/hostapd/
# rtl8814au based USB WiFi Adapter
# 5g, 80211ac, channel width 80, 867 Mb/s
# 2g, 5g, a/b/g/n/ac
# 2021-02-20
# change the interface name to match your system, if necessary
# Needs to match your system
interface=wlan0
bridge=br0
driver=nl80211
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
#ctrl_interface_group=0
# Change as desired
ssid=pi
wpa_passphrase=raspberry
# Change as required
country_code=US
ieee80211d=1
ieee80211h=1
# 2g
#hw_mode=g
#channel=7
# Enable DFS channels
#ieee80211d=1
#ieee80211h=1
# 5g
# 2g (b/g/n)
#hw_mode=g
#channel=6
#
# 5g (a/n/ac)
hw_mode=a
channel=36
#channel=149
# channel=149
beacon_int=100
dtim_period=1
max_num_sta=32
macaddr_acl=0
auth_algs=3
ignore_broadcast_ssid=0
wmm_enabled=1
rts_threshold=2347
fragm_threshold=2346
send_probe_response=1
# Security
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
# Change as desired
wpa_passphrase=raspberry
# WPA-2 AES
wpa_key_mgmt=WPA-PSK WPA-PSK-SHA256
# WPA-3 SAE
#wpa_key_mgmt=SAE
wpa_group_rekey=1800
rsn_pairwise=CCMP

# IEEE 802.11n related configuration
# ieee80211w=2 is required for WPA-3 SAE
#ieee80211w=2
# If parameter is not set, 19 is the default value.
#sae_groups=19 20 21 25 26
#sae_require_mfp=1
# If parameter is not 9 set, 5 is the default value.
#sae_anti_clogging_threshold=10
# IEEE 802.11n
# 2g and 5g
ieee80211n=1
#
# Note: Capabilities can vary even between adapters with the same chipset.
#
# 20 MHz channel width (recommended for use with 2g channels)
ht_capab=[SHORT-GI-20][MAX-AMSDU-7935]
#
# 40 MHz channel width for use with 5g if desired
#ht_capab=[HT40+][HT40-][SHORT-GI-20][SHORT-GI-40][MAX-AMSDU-7935][DSSS_CCK-40]
# 8814au
ht_capab=[HT40+][SHORT-GI-20][SHORT-GI-40][MAX-AMSDU-7935]

# IEEE 802.11ac related configuration
# IEEE 802.11ac
# 5g
ieee80211ac=1
#
# Note: Capabilities can vary even between adapters with the same chipset.
#
vht_capab=[MAX-MPDU-11454][SHORT-GI-80][TX-STBC-2BY1][SU-BEAMFORMEE][HTC-VHT]
# 8814au
vht_capab=[MAX-A-MPDU-LEN-EXP3][MAX-MPDU-11454][SHORT-GI-80][HTC-VHT]

vht_oper_chwidth=1
vht_oper_centr_freq_seg0_idx=42
# The next line is required for 80 MHz width channel operation
#vht_oper_chwidth=1
#
# Use the next line with channel 36
#vht_oper_centr_freq_seg0_idx=42
#
# Use the next with channel 149
#vht_oper_centr_freq_seg0_idx=155
#
# Event logger
#logger_syslog=-1
#logger_syslog_level=2
#logger_stdout=-1
#logger_stdout_level=2
# WMM
wmm_enabled=1
#uapsd_advertisement_enabled=1
#wmm_ac_bk_cwmin=4
#wmm_ac_bk_cwmax=10
#wmm_ac_bk_aifs=7
#wmm_ac_bk_txop_limit=0
#wmm_ac_bk_acm=0
#wmm_ac_be_aifs=3
#wmm_ac_be_cwmin=4
#wmm_ac_be_cwmax=10
#wmm_ac_be_txop_limit=0
#wmm_ac_be_acm=0
#wmm_ac_vi_aifs=2
#wmm_ac_vi_cwmin=3
#wmm_ac_vi_cwmax=4
#wmm_ac_vi_txop_limit=94
#wmm_ac_vi_acm=0
#wmm_ac_vo_aifs=2
#wmm_ac_vo_cwmin=2
#wmm_ac_vo_cwmax=3
#wmm_ac_vo_txop_limit=47
#wmm_ac_vo_acm=0
# TX queue parameters
#tx_queue_data3_aifs=7
#tx_queue_data3_cwmin=15
#tx_queue_data3_cwmax=1023
#tx_queue_data3_burst=0
#tx_queue_data2_aifs=3
#tx_queue_data2_cwmin=15
#tx_queue_data2_cwmax=63
#tx_queue_data2_burst=0
#tx_queue_data1_aifs=1
#tx_queue_data1_cwmin=7
#tx_queue_data1_cwmax=15
#tx_queue_data1_burst=3.0
#tx_queue_data0_aifs=1
#tx_queue_data0_cwmin=3
#tx_queue_data0_cwmax=7
#tx_queue_data0_burst=1.5
# end of hostapd.conf
```
-----
Expand Down
90 changes: 90 additions & 0 deletions Monitor_Mode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
## Monitor Mode using ```iw``` and ```ip```

2021-02-19

-----
### Enter Monitor Mode

Start by making sure the system recognizes the WiFi interface
```
$ iw dev
```
Note: The output shows the WiFi interface name and the current
mode among other things. The interface name may be something like
`wlx00c0cafre8ba` and is required for many of the below commands.


Take the interface down
```
$ sudo ip link set <your interface name here> down
```

Set monitor mode
```
$ sudo iw <your interface name here> set monitor control
```

Bring the interface up
```
$ sudo ip link set <your interface name here> up
```

Verify the mode has changed
```
$ iw dev
```
-----

### Revert to Managed Mode

Take the interface down
```
$ sudo ip link set <your interface name here> down
```

Set managed mode
```
$ sudo iw <your interface name here> set type managed
```

Bring the interface up
```
$ sudo ip link set <your interface name here> up
```

Verify the mode has changed
```
$ iw dev
```
-----

### Change the MAC Address before entering Monitor Mode

Take down things that might interfere
```
$ sudo airmon-ng check kill
```
Check the WiFi interface name
```
$ iw dev
```
Take the interface down
```
$ sudo ip link set dev <your interface name here> down
```
Change the MAC address
```
$ sudo ip link set dev <your interface name here> address <your new mac address>
```
Set monitor mode
```
$ sudo iw <your interface name here> set monitor control
```
Bring the interface up
```
$ sudo ip link set dev <your interface name here> up
```
Verify the MAC address and mode has changed
```
$ iw dev
```
Loading

0 comments on commit 341fbd0

Please sign in to comment.