Kali 2 @ H3 boards doesn't switch to monitor mode
I was unable to bring up onboard WiFi to monitor mode on OPI+ with Kali 2.0 loboris img :orangepi@OrangePi_kali:~$ uname -a
Linux OrangePi_kali 3.4.39 #2 SMP PREEMPT Mon Oct 12 12:03:03 CEST 2015 armv7l GNU/Linux
orangepi@OrangePi_kali:~$ lsmod
Module SizeUsed by
8189es 8876310
root@OrangePi_kali:~# airmon-ng check kill
root@OrangePi_kali:~# airmon-ng start wlan0
PHY Interface Driver Chipset
phy0 wlan0 ?????? unable to detect for sdio 0x024c:0x8179
cat: /sys/class/ieee80211/phy0/device/net/wlan0mon/type: No such file or directory
Newly created monitor mode interface wlan0mon is *NOT* in monitor mode.
Removing non-monitor wlan0mon interface...
I believe the 8189es driver is not compatible. Is there a way to rebuild it with the monitor mode support?
I was also trying to rebuild the driver for external USB Wifi key RTL-8187 from the scratch
http://www.aircrack-ng.org/doku.php?id=r8187
The persistent kernel-headers related issue doesn't allow to build it so far.
Could any suggestions / solutions be given for this unexpected problem?
Hi,
The download link for RTL8189ES-000-change-build-settings.patch seems to no longer be valid:
https://raw.githubusercontent.com/jernejsk/OpenELEC-OPi2/openelec-7.0/packages/linux-drivers/RTL8189ES/patches/RTL8189ES-000-change-build-settings.patch
Would someone with a copy of this patch care to make it available for download? Thank you.
It is repeatedly stated, that 8189es WiFi adapter doesn't switch to monitor mode.
Kali Linux is half useless without this feature. Could it be fixed as well as including theRTL-8187 module into the kernel build?
TheRTL-8187 module is disabled in Kali image, while enables and functional on Armbian and Debian images. y52 replied at 2016-3-9 00:06
It is repeatedly stated, that 8189es WiFi adapter doesn't switch to monitor mode.
Kali Linux is half ...
I am going to test Kali on Opi One with RTL8187 USB card.
Could be this the reason that the module is disabled?:
«If you have a new kernel that support mac80211 and includes the new rtl8187 driver then you MUST blacklist it otherwise the ieee80211 version of the module below will not work. »
http://www.aircrack-ng.org/doku.php?id=r8187#blacklisting_mac80211_driver_version
The 8189es WiFi doesn't switch to monitor mode under none of the linux builds. I tried Kali, Fedora, Armbian, Ubuntu.,
TheRTL8187 USB module was not loaded and the card was not attached to the system.
I saw the above article from the Aircrack, but it was not relevant, as I tested the8189es WiFistandalone.
I you have found some clues to make the 8189es WiFi work, it would be very helpful.
y52 replied at 2016-3-30 21:38
The 8189es WiFi doesn't switch to monitor mode under none of the linux builds. I tried Kali, Fedora, ...
Here https://github.com/rdm-dev/rtl8189ES_linux/tree/52ee6388111fbaf990ec60e93b086cafa6cc373a you can find latest known (to me) driver for RTL8189ES. Configuration is set directly in makefile. There is an option to enable monitor mode, but I didn't test it if it works.
Thanks for the suggestion. I've decided to try it.
root@orangepiplus:/usr/src/rtl8189ES_linux# uname -a
Linux orangepiplus 3.4.110-sun8i #18 SMP PREEMPT Tue Mar 8 20:03:32 CET 2016 armv7l GNU/Linux
root@orangepiplus:/usr/src/rtl8189ES_linux# dmesg |grep 8189
[ 3.923104] RTL871X: rtl8189es v4.3.0.4_11916.20140724_COB
[ 3.923090] RTL871X: module init start
[ 3.923104] RTL871X: rtl8189es v4.3.0.4_11916.20140724_COB
[ 3.923112] RTL871X: build time: Mar8 2016 20:02:27
root@orangepiplus:~# lsmod
Module SizeUsed by
8189es 8966880
root@orangepiplus:~# rmmod 8189es
root@orangepiplus:/usr/src/rtl8189ES_linux# ls -al /lib/modules/`uname -r`/
lrwxrwxrwx 1 root root 36 Mar8 20:03 build -> /usr/src/linux-headers-3.4.110-sun8i
root@orangepiplus:/usr/src# svn ls https://github.com/rdm-dev/rtl8189ES_linux/trunk
Kconfig
Makefile
clean
core/
hal/
ifcfg-wlan0
import-update.sh
include/
os_dep/
platform/
runwpa
wlan0dhcp
root@orangepiplus:/usr/src# svn export https://github.com/rdm-dev/rtl8189ES_linux/trunk
A trunk
A trunk/Kconfig
A trunk/Makefile
A trunk/clean
A trunk/core
A trunk/core/efuse
A trunk/core/efuse/rtw_efuse.c
A trunk/core/rtw_ap.c
A trunk/hal/efuse
A trunk/hal/efuse/efuse_mask.h
A trunk/hal/efuse/rtl8188e
A trunk/hal/efuse/rtl8188e/HalEfuseMask8188E_PCIE.c
A trunk/hal/efuse/rtl8188e/HalEfuseMask8188E_PCIE.h
A trunk/hal/phydm/rtl8188e/hal8188ereg.h
A trunk/runwpa
A trunk/wlan0dhcp
Exported revision 6.
root@orangepiplus:/usr/src# mv trunk rtl8189ES_linux
root@orangepiplus:/usr/src# ls -al rtl8189ES_linux
total 112
drwxr-xr-x7 root root4096 Apr2 19:28 .
drwxr-xr-x 11 root root4096 Apr2 19:30 ..
-rw-r--r--1 root root 64 Oct6 21:21 clean
drwxr-xr-x3 root root4096 Apr2 19:28 core
drwxr-xr-x8 root root4096 Apr2 19:28 hal
-rw-r--r--1 root root 54 Oct6 21:21 ifcfg-wlan0
-rwxr-xr-x1 root root 496 Oct6 21:21 import-update.sh
drwxr-xr-x4 root root 12288 Apr2 19:28 include
-rw-r--r--1 root root 110 Oct6 21:21 Kconfig
-rwxr-xr-x1 root root 51507 Oct6 21:21 Makefile
drwxr-xr-x3 root root4096 Apr2 19:28 os_dep
drwxr-xr-x2 root root4096 Apr2 19:28 platform
-rw-r--r--1 root root 423 Oct6 21:21 runwpa
-rw-r--r--1 root root 294 Oct6 21:21 wlan0dhcp
cd /usr/src/rtl8189ES_linux
root@orangepiplus:/usr/src/rtl8189ES_linux# make -C /lib/modules/`uname -r`/build
make: Entering directory '/usr/src/linux-headers-3.4.110-sun8i'
HOSTCCscripts/basic/fixdep
HOSTCCscripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCCscripts/kconfig/zconf.tab.o
HOSTLDscripts/kconfig/conf
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/linux/version.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
make: *** No rule to make target 'arch/arm/tools/gen-mach-types', needed by 'include/generated/mach-types.h'.Stop.
/usr/src/linux-headers-3.4.110-sun8i/arch/arm/Makefile:278: recipe for target 'archprepare' failed
make: *** Error 2
make: Leaving directory '/usr/src/linux-headers-3.4.110-sun8i'
How to resolve this ?
*** No rule to make target 'arch/arm/tools/gen-mach-types', needed by 'include/generated/mach-types.h'. Did you set correct CPU, eg. sunxi? Also I give you specific commit revision, because newer commits are not intendet for sunxi chips... At the end, I always crosscompile, so I can't help you with that approach, >Did you set correct CPU, eg. sunxi?
No. I don't see where to do that.
The
root@orangepiplus:/usr/src/rtl8189ES_linux# make --help
doesn't help either.
>I give you specific commit revision, because newer commits are not intendet for sunxi chips..
It is not possible exporting this commit:
root@orangepiplus:/usr/src# svn ls https://github.com/rdm-dev/rtl8189ES_linux/tree/52ee6388111fbaf990ec60e93b086cafa6cc373a
svn: warning: W160013: URL 'https://github.com/rdm-dev/rtl8189ES_linux/tree/52ee6388111fbaf990ec60e93b086cafa6cc373a' non-existent in revision 6
svn: E200009: Could not list all targets because some targets don't exist
root@orangepiplus:/usr/src# svn export https://github.com/rdm-dev/rtl8189ES_linux/tree/52ee6388111fbaf990ec60e93b086cafa6cc373a
svn: E170000: URL 'https://github.com/rdm-dev/rtl8189ES_linux/tree/52ee6388111fbaf990ec60e93b086cafa6cc373a' doesn't exist
It was possible to wget the zipped sources from the commit link you left here :
root@orangepiplus:/usr/src# wget https://github.com/rdm-dev/rtl8189ES_linux/archive/52ee6388111fbaf990ec60e93b086cafa6cc373a.zip
unzipped it.
root@orangepiplus:/usr/src# mv rtl8189ES_linux-52ee6388111fbaf990ec60e93b086cafa6cc373a rtl8189ES_linux-52ee
The result is even worse:
root@orangepiplus:/usr/src/rtl8189ES_linux-52ee# make -C /lib/modules/`uname -r`/build
make: Entering directory '/usr/src/linux-headers-3.4.110-sun8i'
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make: *** No rule to make target 'arch/arm/tools/gen-mach-types', needed by 'include/generated/mach-types.h'.Stop.
/usr/src/linux-headers-3.4.110-sun8i/arch/arm/Makefile:278: recipe for target 'archprepare' failed
make: *** Error 2
make: Leaving directory '/usr/src/linux-headers-3.4.110-sun8i'
There is certainly something wrong.
All options are intended to be set up directly in makefile. So open up makefile in text editor. Also svn is not most convenient tool for github. Why dont you use git? That way you would easily checkout specified commit. I didn't use git since it was not available as a package on my old Centos installation. Both git and svn should produce similar results.
You commit link doesn't work with both svn and git :
root@orangepiplus:/usr/src# git clone https://github.com/rdm-dev/rtl8189ES_linux/tree/52ee6388111fbaf990ec60e93b086cafa6cc373a
Cloning into '52ee6388111fbaf990ec60e93b086cafa6cc373a'...
fatal: repository 'https://github.com/rdm-dev/rtl8189ES_linux/tree/52ee6388111fbaf990ec60e93b086cafa6cc373a/' not found
Which of the options is it necessary to enable in the Makefile?
CONFIG_80211W = y
CONFIG_WIFI_MONITOR = y
Which of the 3 platforms is valid for OPI + ?
###################### Platform Related #######################
ONFIG_PLATFORM_ARM_SUN7I = y
CONFIG_PLATFORM_ARM_SUN8I_W3P1 = n
CONFIG_PLATFORM_ARM_SUN8I_W5P1 = n
Will this option compile the driver as a module?
CONFIG_DRVEXT_MODULE = y
By the same occasion, which is the good option for OPI+out of the following ?
choice: 1
Select the wafer with arch sun8i
> 1. Allwinner A3x SOCs(sun8iw1) (ARCH_SUN8IW1) (NEW)
2. Allwinner A2x SOCs(sun8iw3) (ARCH_SUN8IW3) (NEW)
3. Allwinner A33 SOCs(sun8iw5) (ARCH_SUN8IW5) (NEW)
4. Allwinner A83 SOCs(sun8iw6) (ARCH_SUN8IW6) (NEW)
5. Allwinner Axx SOCs(sun8w7) (ARCH_SUN8IW7) (NEW)
6. Allwinner V3x SOCs(sun8iw8) (ARCH_SUN8IW8) (NEW)
7. Allwinner Axx SOCs(sun8iw9) (ARCH_SUN8IW9) (NEW)
choice: 6
I was able to start the build configuration in a strange sequence of 2 commands:
1st run :
root@orangepiplus:/usr/src/rtl8189ES_linux# make ARCH=arm/mach-sunxi -C /lib/modules/`uname -r`/build
then run :
root@orangepiplus:/usr/src/rtl8189ES_linux-52ee# make -C /lib/modules/`uname -r`/build
The 1st command will raise an error:
root@orangepiplus:/usr/src/rtl8189ES_linux# make ARCH=arm/mach-sunxi -C /lib/modules/`uname -r`/build
make: Entering directory '/usr/src/linux-headers-3.4.110-sun8i'
scripts/kconfig/conf --silentoldconfig Kconfig
#
# configuration written to .config
#
include/config/auto.conf:42:warning: symbol value 'cubic' invalid for DEFAULT_TCP_CONG
include/config/auto.conf:43:warning: symbol value '' invalid for UEVENT_HELPER_PATH
include/config/auto.conf:140:warning: symbol value '/lib/modules/$UNAME_RELEASE/.config' invalid for DEFCONFIG_LIST
include/config/auto.conf:232:warning: symbol value '(none)' invalid for DEFAULT_HOSTNAME
include/config/auto.conf:240:warning: symbol value '' invalid for EXTRA_FIRMWARE
include/config/auto.conf:374:warning: symbol value '' invalid for LOCALVERSION
include/config/auto.conf:378:warning: symbol value '' invalid for CMDLINE
include/config/auto.conf:442:warning: symbol value 'cfq' invalid for DEFAULT_IOSCHED
include/config/auto.conf:479:warning: symbol value '' invalid for DEFAULT_SECURITY
include/config/auto.conf:526:warning: symbol value '' invalid for CROSS_COMPILE
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make: *** No rule to make target 'sys_config.o', needed by 'built-in.o'.Stop.
Makefile:987: recipe for target 'prepare0' failed
make: *** Error 2
make: Leaving directory '/usr/src/linux-headers-3.4.110-sun8i'
The 2nd will start the build configuration with the long options list :
root@orangepiplus:/usr/src/rtl8189ES_linux# make -C /lib/modules/`uname -r`/build
make: Entering directory '/usr/src/linux-headers-3.4.110-sun8i'
scripts/kconfig/conf --silentoldconfig Kconfig
*
* Restart config...
*
*
* General setup
*
Prompt for development and/or incomplete code/drivers (EXPERIMENTAL) (NEW)
....
which will finish with error anyway :
# configuration written to .config
#
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make: *** No rule to make target 'arch/arm/tools/gen-mach-types', needed by 'include/generated/mach-types.h'.Stop.
/usr/src/linux-headers-3.4.110-sun8i/arch/arm/Makefile:278: recipe for target 'archprepare' failed
make: *** Error 2
make: Leaving directory '/usr/src/linux-headers-3.4.110-sun8i'
Still no luck. Probably other ideas ?