The TL-WN823N WLAN USB stick bases on the Realtek chip set RTL8192CU and provides a transmission rate up to 300Mbps.
The TL-WN823N is recognized by the kernel with the USB ID 0bda:8178:
Bus 001 Device 006: ID 0bda:8178 Realtek Semiconductor Corp. RTL8192CU 802.11n WLAN Adapter
However, the stick is not fully supported by the kernel module rtl8192cu that is used by Ubuntu 12.10, e.g. the connection drops regularly. To prevent this behaviour one has to add the following module options in the file /etc/modprobe.d/rtl8192cu.conf to disable the hardware encryption and use software based encryption instead:
options rtl8192cu swenc=1
Realtek Module 8192cu
It is recommended to replace the standard driver by the original Realtek drivers 8192cu. If the Realtek driver is used instead of the module which is part of the standard kernel, the automatic loading of the kernel module has to be inhibited. To achieve this, the rtl8192cu driver provided by the standard kernel has to be blacklisted in the file /etc/modprobe.d/blacklist.conf by adding the following line:
The module from the Realtek homepage is called 8192cu and has to be compiled by hand. Under Ubuntu compilation will need the build-essentials to be installed:
sudo apt-get install build-essential
Compilation will be achieved by the install script that is part of the downloaded file:
sudo sh install.sh
The compiled driver can be loaded by the command
sudo modprobe 8192cu
Due to a bug in the power management of the 8192cu driver the connection can drop if the device is set to power save mode. This can be seen in the log files:
rtl8192c_set_FwPwrMode_cmd(): Mode = 1, SmartPS = 2
rtw_set_ps_mode(): Busy Traffic , Leave 802.11 power save..
rtl8192c_set_FwPwrMode_cmd(): Mode = 0, SmartPS = 0
rtw_set_ps_mode(): Enter 802.11 power save mode...
To prevent the power save mode one has to add the following module options in the file /etc/modprobe.d/8192cu.conf:
options 8192cu rtw_power_mgnt=0 rtw_enusbss=0