dominikk
Posts: 5
Joined: Mon Oct 09, 2017 6:58 pm

TL-WN722N v2 - monitor mode + mfruba kernel problem

Mon Oct 09, 2017 7:03 pm

Hi,

I bought TL-WN722N v2. I want to use it in monitore mode.
I heard there is a many problems, but also found a solution.

https://github.com/mfruba/kernel

When I try to compile it, after make I've got a problem like that.

Code: Select all

pi@raspberrypi:~/Downloads/kernel-master/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417 $ make
"******************************************"
"NO SKRC,we will use default KSRC"
"******************************************"
make ARCH=armv7l CROSS_COMPILE= -C /lib/modules/4.9.35-v7+/build M=/home/pi/Downloads/kernel-master/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417  modules
make[1]: *** /lib/modules/4.9.35-v7+/build: No such file or directory.  Stop.
Makefile:1368: recipe for target 'modules' failed
make: *** [modules] Error 2
What should I do?

My kernel:

Code: Select all

uname -a
Linux raspberrypi 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux
pi@rasp

MrEngman
Posts: 3578
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: TL-WN722N v2 - monitor mode + mfruba kernel problem

Tue Oct 10, 2017 6:51 am

dominikk wrote:
Mon Oct 09, 2017 7:03 pm
Hi,

I bought TL-WN722N v2. I want to use it in monitore mode.
I heard there is a many problems, but also found a solution.

https://github.com/mfruba/kernel

When I try to compile it, after make I've got a problem like that.

Code: Select all

pi@raspberrypi:~/Downloads/kernel-master/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417 $ make
"******************************************"
"NO SKRC,we will use default KSRC"
"******************************************"
make ARCH=armv7l CROSS_COMPILE= -C /lib/modules/4.9.35-v7+/build M=/home/pi/Downloads/kernel-master/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417  modules
make[1]: *** /lib/modules/4.9.35-v7+/build: No such file or directory.  Stop.
Makefile:1368: recipe for target 'modules' failed
make: *** [modules] Error 2
What should I do?

My kernel:

Code: Select all

uname -a
Linux raspberrypi 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux
pi@rasp
build is a symlink to the Linux kernel source.

Make it using

Code: Select all

sudo ln -s /home/pi/src/linux /lib/modules/$(uname -r)/build
Change directory /home/pi/src/linux to the directory where your Linux source/headers is.
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

dominikk
Posts: 5
Joined: Mon Oct 09, 2017 6:58 pm

Re: TL-WN722N v2 - monitor mode + mfruba kernel problem

Tue Oct 10, 2017 2:52 pm

MrEngman wrote:
Tue Oct 10, 2017 6:51 am
dominikk wrote:
Mon Oct 09, 2017 7:03 pm
Hi,

I bought TL-WN722N v2. I want to use it in monitore mode.
I heard there is a many problems, but also found a solution.

https://github.com/mfruba/kernel

When I try to compile it, after make I've got a problem like that.

Code: Select all

pi@raspberrypi:~/Downloads/kernel-master/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417 $ make
"******************************************"
"NO SKRC,we will use default KSRC"
"******************************************"
make ARCH=armv7l CROSS_COMPILE= -C /lib/modules/4.9.35-v7+/build M=/home/pi/Downloads/kernel-master/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417  modules
make[1]: *** /lib/modules/4.9.35-v7+/build: No such file or directory.  Stop.
Makefile:1368: recipe for target 'modules' failed
make: *** [modules] Error 2
What should I do?

My kernel:

Code: Select all

uname -a
Linux raspberrypi 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux
pi@rasp
build is a symlink to the Linux kernel source.

Make it using

Code: Select all

sudo ln -s /home/pi/src/linux /lib/modules/$(uname -r)/build
Change directory /home/pi/src/linux to the directory where your Linux source/headers is.

Code: Select all

pi@raspberrypi:/usr/local $ sudo ln -s /usr/include/linux/ /lib/modules/4.9.35-v7+/build
i@raspberrypi:~/Downloads/kernel-master/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417 $ make
"******************************************"
"NO SKRC,we will use default KSRC"
"******************************************"
make ARCH=armv7l CROSS_COMPILE= -C /lib/modules/4.9.35-v7+/build M=/home/pi/Downloads/kernel-master/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417  modules
make[1]: Entering directory '/usr/include/linux'
make[1]: *** No rule to make target 'modules'.  Stop.
make[1]: Leaving directory '/usr/include/linux'
Makefile:1368: recipe for target 'modules' failed
make: *** [modules] Error 2

Any idea where should I link this build?

MrEngman
Posts: 3578
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: TL-WN722N v2 - monitor mode + mfruba kernel problem

Tue Oct 10, 2017 5:05 pm

That is not the kernel source.

To compile a module for Linux you need to get the Linux source or headers and prepare it for compiling the module before then compiling the module.

There is a script that can do it although I have never used it. Take a look here

Code: Select all

https://www.raspberrypi.org/forums/viewtopic.php?t=76261
The post is old but I'm fairly certain it is still being used as I've seen it mentioned in various posts quite recently.

As far as I'm aware this script installs the kernel source for the current kernel you are using and then configures it for compiling the module you want to compile.
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

dominikk
Posts: 5
Joined: Mon Oct 09, 2017 6:58 pm

Re: TL-WN722N v2 - monitor mode + mfruba kernel problem

Sat Oct 14, 2017 11:58 am

MrEngman wrote:
Tue Oct 10, 2017 5:05 pm
That is not the kernel source.

To compile a module for Linux you need to get the Linux source or headers and prepare it for compiling the module before then compiling the module.

There is a script that can do it although I have never used it. Take a look here

Code: Select all

https://www.raspberrypi.org/forums/viewtopic.php?t=76261
The post is old but I'm fairly certain it is still being used as I've seen it mentioned in various posts quite recently.

As far as I'm aware this script installs the kernel source for the current kernel you are using and then configures it for compiling the module you want to compile.
Thanks for helping.

I install sources manualy.... and now even change the distro for Kali and I have still this problem.

Code: Select all

ux_v4.3.0.8_13968.20150417# make
"******************************************"
"NO SKRC,we will use default KSRC"
"******************************************"
make ARCH=armv7l CROSS_COMPILE= -C /lib/modules/4.4.50-v7+/build M=/root/Downloads/kernel-master/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417  modules
make[1]: Entering directory '/usr/src/kernel'
Makefile:617: arch/armv7l/Makefile: No such file or directory
make[1]: *** No rule to make target 'arch/armv7l/Makefile'.  Stop.
make[1]: Leaving directory '/usr/src/kernel'
Makefile:1368: recipe for target 'modules' failed
make: *** [modules] Error 2
root@kali:~/Downloads/kernel-master/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417#
should I link /user/src/kernel/arch/arm with /armv7l ?

MrEngman
Posts: 3578
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: TL-WN722N v2 - monitor mode + mfruba kernel problem

Sat Oct 14, 2017 12:42 pm

dominikk wrote:
Sat Oct 14, 2017 11:58 am
Thanks for helping.

I install sources manualy.... and now even change the distro for Kali and I have still this problem.

Code: Select all

ux_v4.3.0.8_13968.20150417# make
"******************************************"
"NO SKRC,we will use default KSRC"
"******************************************"
make ARCH=armv7l CROSS_COMPILE= -C /lib/modules/4.4.50-v7+/build M=/root/Downloads/kernel-master/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417  modules
make[1]: Entering directory '/usr/src/kernel'
Makefile:617: arch/armv7l/Makefile: No such file or directory
make[1]: *** No rule to make target 'arch/armv7l/Makefile'.  Stop.
make[1]: Leaving directory '/usr/src/kernel'
Makefile:1368: recipe for target 'modules' failed
make: *** [modules] Error 2
root@kali:~/Downloads/kernel-master/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417#
should I link /user/src/kernel/arch/arm with /armv7l ?
Yes, that would need command

Code: Select all

sudo ln -s /user/src/kernel/arch/arm /user/src/kernel/arch/armv7l
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

dominikk
Posts: 5
Joined: Mon Oct 09, 2017 6:58 pm

Re: TL-WN722N v2 - monitor mode + mfruba kernel problem

Sat Oct 14, 2017 12:53 pm

Code: Select all

root@kali:~/Downloads/kernel-master/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417# ln -s /usr/src/kernel/arch/arm /usr/src/kernel/arch/armv7l
root@kali:~/Downloads/kernel-master/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417# make
"******************************************"
"NO SKRC,we will use default KSRC"
"******************************************"
make ARCH=armv7l CROSS_COMPILE= -C /lib/modules/4.4.50-v7+/build M=/root/Downloads/kernel-master/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417  modules
make[1]: Entering directory '/usr/src/kernel'
"******************************************"
"NO SKRC,we will use default KSRC"
"******************************************"
  CC [M]  /root/Downloads/kernel-master/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417/core/rtw_cmd.o
/bin/sh: 1: ./scripts/recordmcount: Exec format error
scripts/Makefile.build:258: recipe for target '/root/Downloads/kernel-master/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417/core/rtw_cmd.o' failed
make[2]: *** [/root/Downloads/kernel-master/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417/core/rtw_cmd.o] Error 2
Makefile:1402: recipe for target '_module_/root/Downloads/kernel-master/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417' failed
make[1]: *** [_module_/root/Downloads/kernel-master/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417] Error 2
make[1]: Leaving directory '/usr/src/kernel'
Makefile:1368: recipe for target 'modules' failed
root@kali:~/Downloads/kernel-master/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417#
I have no idea how to run WN722N v2 on monitor mode :(

MrEngman
Posts: 3578
Joined: Fri Feb 03, 2012 2:17 pm
Location: Southampton, UK

Re: TL-WN722N v2 - monitor mode + mfruba kernel problem

Sat Oct 14, 2017 1:26 pm

dominikk wrote:
Sat Oct 14, 2017 12:53 pm

Code: Select all

root@kali:~/Downloads/kernel-master/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417# ln -s /usr/src/kernel/arch/arm /usr/src/kernel/arch/armv7l
root@kali:~/Downloads/kernel-master/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417# make
"******************************************"
"NO SKRC,we will use default KSRC"
"******************************************"
make ARCH=armv7l CROSS_COMPILE= -C /lib/modules/4.4.50-v7+/build M=/root/Downloads/kernel-master/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417  modules
make[1]: Entering directory '/usr/src/kernel'
"******************************************"
"NO SKRC,we will use default KSRC"
"******************************************"
  CC [M]  /root/Downloads/kernel-master/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417/core/rtw_cmd.o
/bin/sh: 1: ./scripts/recordmcount: Exec format error
scripts/Makefile.build:258: recipe for target '/root/Downloads/kernel-master/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417/core/rtw_cmd.o' failed
make[2]: *** [/root/Downloads/kernel-master/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417/core/rtw_cmd.o] Error 2
Makefile:1402: recipe for target '_module_/root/Downloads/kernel-master/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417' failed
make[1]: *** [_module_/root/Downloads/kernel-master/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417] Error 2
make[1]: Leaving directory '/usr/src/kernel'
Makefile:1368: recipe for target 'modules' failed
root@kali:~/Downloads/kernel-master/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417#
I have no idea how to run WN722N v2 on monitor mode :(
I've never used monitor mode so can't help there. However, you need a working driver first. No idea what is giving the errors now you have the symlinks fixed.

You might find the following some help. I have a script which will automatically determine the driver you need for the Raspbian kernel version and wifi you are using and download and install it.

Download and install the script with commands

Code: Select all

sudo wget http://www.fars-robotics.net/install-wifi -O /usr/bin/install-wifi
sudo chmod +x /usr/bin/install-wifi
The command

Code: Select all

sudo install-wifi -h
will show details on using it.

To install the driver on your current kernel you should just need to run command

Code: Select all

sudo install-wifi
This will select the driver you need and automatically download and install it.

This script handles drivers for 8188eu, 8192eu, 8812au/8821au and mt7610 wifi modules.
Simplicity is a prerequisite for reliability. Edsger W. Dijkstra

Please post ALL technical questions on the forum. Please Do Not send private messages.

User avatar
Ronaldlees
Posts: 245
Joined: Sat Apr 16, 2016 4:28 pm
Location: North Carolina, US
Contact: Website

Re: TL-WN722N v2 - monitor mode + mfruba kernel problem

Thu Nov 23, 2017 3:18 pm

I think the OP meant the driver was the reason he can't run monitor mode. But once he gets an appropriate driver built, running monitor mode is easy, assuming it's legal in his country. AFAIK, it's always legal if used only with the user's own packets. IIRC correctly, something like this is needed:

Code: Select all

sudo apt-get install iw
iw list
    --> should display a list of supported modes:
           IBSS, managed, AP, AP/VLAN, monitor, mesh, etc
If "monitor" mode is in the list, then one or the other ways should work:
  • ip link set wlan0 down
    iw dev wlan0 set type monitor
    ip link set wlan0 up
    iwconfig wlan0 down
    iwconfig wlan0 mode monitor
    iwconfig wlan0 up
    ifconfig wlan0 192.168.1.40
Tcpdump can be used to capture WiFi/RF packets:

Code: Select all

tcpdump -I -i wlan0 -w rfpackets.log -XX -n
    ("-I" means "use the RFCOMM mode", -i specifies the monitor interface, -w is for the log file, -XX is for full packet, -n for no resolution)
Then, wireshark can be used to display the logged packets in a nice format. It takes two adapters. One adapter cannot do both a connection and monitor it at the same time. The OP should be sure to unplug the monitor adapter's antenna, and he should take any other precautions needed to be sure he gets only his own packets for inspection. Regulations vary.
I am The Umbrella Man

Return to “Recommended peripherals”

Who is online

Users browsing this forum: No registered users and 7 guests