How to Enable Monitor Mode on TP-LINK TL-WN722N V2/V3

In this tutorial we’ll enable monitor mode on a TP-LINK TL-WN722N V2/V3 wireless adapter, on a Kali Linux machine running on VMware or VirtualBox.

Some sources may be confusing, and lead you to believe that you can only enable monitor mode on TP-LINK TL-WN722N v1 because it has one of the required chipsets for monitor mode, Atheros AR9271, and that you can’t enable it on V2/V3. You can, however.

To start off, if you’re using a virtual machine, first you’ll have to connect your wireless adapter to your Kali Linux virtual machine.

Set up the Adapter

Next, we’ll run some commands to set up the adapter.

First update and upgrade your package index.

sudo apt update && sudo apt upgrade

Reboot your machine.

sudo reboot

Install Linux headers for your Kali Linux.

sudo apt install linux-headers-$(uname -r)

Run the following commands to install the bc package and remote the r8188eu.ko module.

sudo apt install bc
sudo rmmod r8188eu.ko

Clone the Realtek driver from the aircrack-ng Github repository.

git clone https://github.com/aircrack-ng/rtl8188eus

Run the following commands.

cd rtl8188eus
sudo -i
echo "blacklist r8188eu" > "/etc/modprobe.d/realtek.conf"
exit
reboot

After the reboot run the following commands (we have to cd back into the rtl8188eus directory that we cloned earlier):

cd rtl8188eus
make
sudo make install
sudo modprobe 8188eu

Enable Monitor Mode

To enable monitor mode, run the following commands:

sudo ifconfig wlan0 down
sudo airmon-ng check kill
sudo iwconfig wlan0 mode monitor
sudo ifconfig wlan0 up
sudo iwconfig

Here’s the output you should be seeing. You can see that the adapter is set to Mode: Monitor.

Troubleshooting When Enabling Monitor Mode

In some cases it doesn’t work right away. For example you may get the error Error for wireless request "Set Mode" (8B06) : SET failed on device wlan0 ; Operation not permitted.

The solution that has worked for me every time is the following (credit to this Github user’s comment).

Run the following commands in this order:

sudo ifconfig wlan0 up
sudo rmmod r8188eu.ko
sudo modprobe 8188eu
sudo iwconfig wlan0 mode auto
sudo ifconfig wlan0 down
sudo iwconfig wlan0 mode monitor
sudo ifconfig wlan0 up

Now when you check iwconfig you should see the adapter is in monitor mode.

Conclusion

In this tutorial we set up a TP-LINK TL-WN722N V2/V3 adapter to run in monitor mode. If you have any issues or questions then please don’t hesitate to leave a comment. Hope this helped. Thank you.

4.1 14 votes
Article Rating
Subscribe
Notify of
guest

32 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Guest
Guest
1 year ago

I have a problem with Tl-wn722n on kali VM. The make comment doesn’t work; an error shows up at the end: make: *** [makefile: 1368 modules] error 2. how should I solve it?

MAth
MAth
1 year ago

On the last Kali version, when i execute “Make” i have errors.

erfandark10
1 year ago
Reply to  MAth

try in ubuntu lts 20.4 its perfectly works

ViralExploit
ViralExploit
1 year ago
Reply to  MAth

Probably its caused because the “make” command runs a scripts that looks into the build folder on the linux kernel headers.

This error occurred to me on Kali 2022.3. The way that I managed to workaround was installing the linux headers from the Kali repositories on this link: https://http.kali.org/kali/pool/main/l/linux/

You can know which one you should install by using the “uname -a” command and looking which distro you have. The file which you need to install begins with a “linux-headers” prefix and a extension “.deb”.

After downloading it, you could run the command “dpkg -i .deb”. You could run into some dependencies problems, and for those you need to search on the internet to see which packages you need to install.

After you manage to run the above command without errors, you should be fine to run the “make” command again.

sleepr67
sleepr67
1 year ago

Thanks heaps for this!

This works on kali-virtualbox, one of the comments didnt work though $ sudo rmmod r8188eu.ko but carried on with the next comment ($git clone https://github.com/aircrack-ng/rtl8188eus) and it’s all working using TL-WN722N V2.

karti
karti
1 year ago
Reply to  sleepr67

+1 on using this git to get mine running. Thanks

Ramtin
Ramtin
1 year ago

Thank you very much. Your guide is very detailed. It also works with TL-WN722N V4.

There is only one note that when I run Wireshark from Kali menu the wlan changes to Managed mode. Running wireshark from terminal “sudo wireshark” is the correct way to capture packets.
Cheers!

Your soldier
1 year ago

L E G E N D. Thank you for your help bro!!!!! It works.

lum1n0use
lum1n0use
1 year ago
does the packet injection also work on this method?
Rick
Rick
1 year ago

Anyone else running into this error? E: Package ‘bc’ has no installation candidate
Does this affects the process?

Wert
Wert
6 months ago
Reply to  Rick

Also problem

guest
guest
1 year ago

It shows the following error while I executed
$ sudo iwconfig wlan0 mode monitor
Error for wireless request “Set Mode” (8B06) :
   SET failed on device enp0s3 ; Operation not supported.

I think its because I’ve got error on $ sudo rmmod r8188eu.ko

please help me sort out the issue asap

Amoniman
Amoniman
1 year ago

Thank you from the bottom of my hearth

Tarun
Tarun
1 year ago

After following the commands, I am unable to connect to internet nor to my router. Host unreachable error is showing up. If i enable network manager and restart dhcpclient, It automatically puts my adapter to Managed mode.

rizwan
rizwan
1 year ago

thanks alot …….and luv u

ma10
ma10
1 year ago

Can You Do the new Version of this The TL-WN722N V4 because I can’t enable monitor mode with this step I’m having an error in the make part

ma10
ma10
1 year ago
Reply to  N00b Ed

thanks in advance haha

mar10
mar10
1 year ago

cc1: note: unrecognized command-line option ‘-Wno-sometimes-uninitialized’ may have been intended to silence earlier diagnostics
cc1: some warnings being treated as errors
make[2]: *** [/usr/src/linux-headers-6.1.0-kali5-common/scripts/Makefile.build:255: /home/viper/Desktop/rtl8188eus/os_dep/osdep_service.o] Error 1
make[1]: *** [/usr/src/linux-headers-6.1.0-kali5-common/Makefile:2030: /home/viper/Desktop/rtl8188eus] Error 2
make[1]: Leaving directory ‘/usr/src/linux-headers-6.1.0-kali5-amd64’
make: *** [Makefile:2065: modules] Error 2

it says me that error someone know how to solve this

zozo
zozo
1 year ago

Is working with v3.2 OR not

nawi
nawi
1 year ago

Hi
When i give the
make
command I get the following error:
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/6.1.0-kali7-amd64/build M=/home/ali/rtl8188eus modules
make[1]: Entering directory ‘/usr/src/linux-headers-6.1.0-kali7-amd64’
CC [M] /home/ali/rtl8188eus/core/rtw_cmd.o
CC [M] /home/ali/rtl8188eus/core/rtw_security.o
CC [M] /home/ali/rtl8188eus/core/rtw_debug.o
CC [M] /home/ali/rtl8188eus/core/rtw_io.o
CC [M] /home/ali/rtl8188eus/core/rtw_ioctl_query.o
CC [M] /home/ali/rtl8188eus/core/rtw_ioctl_set.o
CC [M] /home/ali/rtl8188eus/core/rtw_ieee80211.o
CC [M] /home/ali/rtl8188eus/core/rtw_mlme.o
CC [M] /home/ali/rtl8188eus/core/rtw_mlme_ext.o
CC [M] /home/ali/rtl8188eus/core/rtw_mi.o
CC [M] /home/ali/rtl8188eus/core/rtw_wlan_util.o
CC [M] /home/ali/rtl8188eus/core/rtw_vht.o
CC [M] /home/ali/rtl8188eus/core/rtw_pwrctrl.o
CC [M] /home/ali/rtl8188eus/core/rtw_rf.o
CC [M] /home/ali/rtl8188eus/core/rtw_recv.o
CC [M] /home/ali/rtl8188eus/core/rtw_sta_mgt.o
CC [M] /home/ali/rtl8188eus/core/rtw_ap.o
CC [M] /home/ali/rtl8188eus/core/mesh/rtw_mesh.o
CC [M] /home/ali/rtl8188eus/core/mesh/rtw_mesh_pathtbl.o
CC [M] /home/ali/rtl8188eus/core/mesh/rtw_mesh_hwmp.o
CC [M] /home/ali/rtl8188eus/core/rtw_xmit.o
CC [M] /home/ali/rtl8188eus/core/rtw_p2p.o
CC [M] /home/ali/rtl8188eus/core/rtw_rson.o
CC [M] /home/ali/rtl8188eus/core/rtw_tdls.o
CC [M] /home/ali/rtl8188eus/core/rtw_br_ext.o
CC [M] /home/ali/rtl8188eus/core/rtw_iol.o
CC [M] /home/ali/rtl8188eus/core/rtw_sreset.o
CC [M] /home/ali/rtl8188eus/core/rtw_btcoex_wifionly.o
CC [M] /home/ali/rtl8188eus/core/rtw_btcoex.o
CC [M] /home/ali/rtl8188eus/core/rtw_beamforming.o
CC [M] /home/ali/rtl8188eus/core/rtw_odm.o
CC [M] /home/ali/rtl8188eus/core/rtw_rm.o
CC [M] /home/ali/rtl8188eus/core/rtw_rm_fsm.o
CC [M] /home/ali/rtl8188eus/core/efuse/rtw_efuse.o
CC [M] /home/ali/rtl8188eus/os_dep/osdep_service.o
/home/ali/rtl8188eus/os_dep/osdep_service.c: In function ‘rtw_change_ifname’:
/home/ali/rtl8188eus/os_dep/osdep_service.c:2454:28: warning: passing argument 1 of ‘_rtw_memcpy’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
2454 | _rtw_memcpy(pnetdev->dev_addr, adapter_mac_addr(padapter), ETH_ALEN);
| ~~~~~~~^~~~~~~~~~
/home/ali/rtl8188eus/os_dep/osdep_service.c:899:24: note: expected ‘void *’ but argument is of type ‘const unsigned char *’
899 | void _rtw_memcpy(void *dst, const void *src, u32 sz)
| ~~~~~~^~~
/home/ali/rtl8188eus/os_dep/osdep_service.c: In function ‘rtw_random32’:
/home/ali/rtl8188eus/os_dep/osdep_service.c:2578:16: error: implicit declaration of function ‘prandom_u32’; did you mean ‘prandom_u32_max’? [-Werror=implicit-function-declaration]
2578 | return prandom_u32();
| ^~~~~~~~~~~
| prandom_u32_max
At top level:
cc1: note: unrecognized command-line option ‘-Wno-sometimes-uninitialized’ may have been intended to silence earlier diagnostics
cc1: some warnings being treated as errors
make[2]: *** [/usr/src/linux-headers-6.1.0-kali7-common/scripts/Makefile.build:255: /home/ali/rtl8188eus/os_dep/osdep_service.o] Error 1
make[1]: *** [/usr/src/linux-headers-6.1.0-kali7-common/Makefile:2037: /home/ali/rtl8188eus] Error 2
make[1]: Leaving directory ‘/usr/src/linux-headers-6.1.0-kali7-amd64’
make: *** [Makefile:2065: modules] Error 2

Brendan
1 year ago
Reply to  nawi

This happened when Kali updates this last time. I’ve used this adapter prior and when the new version came out the same method stopped working. I have not found a work around for it yet.

Perseverity
1 year ago
Reply to  nawi

Lo arreglaste?

Lil_Shark
Lil_Shark
1 year ago
Reply to  nawi

I have the same problem. Please help us solve this

Riky
Riky
1 year ago

Good afternoon, I have the same problem that nawi mentions, when I use the make command it starts up fine and then it gives me the same error as nawi, I read that someone said that it is due to the last update of kali,,, They have already found a solution to the problem ? Thank you so much

lasusadkj
lasusadkj
10 months ago

not scanning for networks
even after these methods
enter the monitor mode fine

Justin
Justin
6 months ago

my tl-wn722n v2 adapter goes into monitor mode after following this guide but packet injection doesn’t work i’m on kali linux kernel 6.5 any help would be appreciated

Wert
Wert
4 months ago
Reply to  Justin

My too, no packet injection

Isshak
Isshak
4 months ago

Hey . I have a tp link tl-wn823n .
I run every command but it kept saying E: unable to locate the package or the file name realtek-rtl9182eu-dkms.
And to be honest I’m not sure if I’m supposed to download the tp link driver v2/v3 on windows 11 or in kali linux virtual machine , virtualbox ? I’m studying so I’m new into all of this .