WLAN Access Point with Realtek rtl8822bu Chipset on Linux

The system environment

tp-link AC1300 High Gain Wireless MU-MIMO USB Adapter Archer T4U Ver. 3.0 WLAN on openSuSE Leap 15.0 with kernel version 4.12.14. The Ver. 3 of the adapter is important as other versions have different chipset.

lsusb lists this device with ID 2357:0115

This kernel version does not include a driver for this wlan chip, so we have to build it ourselves.

Building driver module

The tp-link website offers the driver sources. At the time of this writing this is: Archer T4U_V3_181018_Linux_beta.zip.

Unpack the zip file to a place of your choice, enter the directory and issue a make clean && make && sudo make install

With every kernel update, the above process need to be done again.

Setup the WLAN network device

ip addr add dev wlan0

The address asignment may be automated by adding a RUN command to the udev rule which sets up the device.
In my case this is in /etc/udev/rules.d/70-persistent-net.rules, I changed it to look like this:

# USB device 0x2357:0x0115 (usb)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="50:3e:aa:b6:fc:77", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0", RUN+="/sbin/ip addr add dev '%k'"

Setup the hostapd daemon

The 88x2bu is a mac80211-based driver

Create a configuration file /etc/hostapd.conf, a minimal one looks like this:

# this is in Switzerland

# use 5GHz channel

# generate wpa psk by using
# wpa_passphrase [ ssid ] [ passphrase ]
# or use 

Start hostapd:

systemctl start hostapd

DHCP server

Setup a DHCP server to assign ip addresses and the like to connecting clients.
My /etc/dhcpd.conf looks like this:

option domain-name "my.domain";
option domain-name-servers ns1.provider, ns2.provider;

default-lease-time 600;
max-lease-time 7200;
ddns-update-style none; ddns-updates off;
log-facility local7;

subnet netmask {
  option domain-name-servers ns1.provider, ns2.provider;
  option domain-name "";
  option routers;
  option broadcast-address;
  default-lease-time 600;
  max-lease-time 7200;

In /etc/sysconfig/dhcpd set the interface the dhcpd listens to:


Start dhcpd:

systemctl start dhcpd


Setup SuSEfirewall for routing between eth0 and wlan0.

Bringing all up on USB Adapter plugging in

to be written..

see systemd-networkd(8) to get an idea how this could be done.

Links to some interesting articles on this topic

linux logo Powered by Apache
This site maintained by:
My public PGP key
last updated: 2019-03-12 Valid CSS! Valid XHTML 1.0 Strict