Author: y52

Kali 2 @ H3 boards doesn't switch to monitor mode

[Copy link]

4

threads

1118

posts

9531

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9531
Published in 2016-4-18 05:43:49 | Show all floors
Actually, that Makefile is used by module building. Check the first line of the driver building output, especially -C option (it tells where to look for Makefile).

Just set it to "-sun8i", rebuild it and hope for the best.

15

threads

105

posts

387

credits

Intermediate member

Rank: 3Rank: 3

credits
387
 Author| Published in 2016-4-19 04:44:26 | Show all floors
I editied the Makefile :

root@orangepiplus:/lib/modules/3.4.110-sun8i/build# vi Makefile

VERSION = 3
PATCHLEVEL = 4
SUBLEVEL = 110
#EXTRAVERSION =
EXTRAVERSION = -sun8i SMP preempt


root@orangepiplus:/lib/modules/3.4.110-sun8i/build# make
scripts/kconfig/conf --silentoldconfig Kconfig
warning: (ARCH_SUN8I && ARCH_SUN9I && ARCH_TEGRA_2x_SOC && ARCH_TEGRA_3x_SOC && MACH_U300) selects PINCTRL which has unmet direct dependencies (EXPERIMENTAL)
warning: (ARCH_SUN8I && ARCH_SUN9I && ARCH_TEGRA_2x_SOC && ARCH_TEGRA_3x_SOC && MACH_U300) selects PINCTRL which has unmet direct dependencies (EXPERIMENTAL)
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
  UPD     include/generated/utsrelease.h
make[1]: *** 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: *** [archprepare] Error 2
root@orangepiplus:/lib/modules/3.4.110-sun8i/build#

Then I rebuilt the drive in a usual way:

root@orangepiplus:/usr/src/rtl8189ES_linux# make ARCH=arm KSRC=/usr/src/linux-headers-3.4.110-sun8i

Now

root@orangepiplus:/usr/src/rtl8189ES_linux# insmod   8189es.ko
insmod: ERROR: could not insert module 8189es.ko: Invalid module format

Gives the error:
[ 3785.304498] 8189es: version magic '3.4.110-sun8i SMP preempt mod_unload ARMv7 p2v8 ' should be '3.4.110-sun8i SMP preempt mod_unload modversions ARMv7 p2v8 '

So, the difference is minimal :
'3.4.110-sun8i SMP preempt mod_unload ARMv7 p2v8 '
'3.4.110-sun8i SMP preempt mod_unload modversions ARMv7 p2v8 '

This time, I don't know which setting the word "modversions" comes from.

More efforts are necessary to resolving it.

4

threads

1118

posts

9531

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9531
Published in 2016-4-19 13:46:46 | Show all floors
SMP preempt and other parts are definetly not meant to be put there. I think this comes from correct config file for kernel. I think that you are missing kernel config file in the right place. I'm not sure where to put it.

15

threads

105

posts

387

credits

Intermediate member

Rank: 3Rank: 3

credits
387
 Author| Published in 2016-4-21 04:40:08 | Show all floors
Have you tired this driver with MONITOR mode enabled on your system? Does it work?
I can't find a solution so far.

4

threads

1118

posts

9531

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9531
Published in 2016-4-21 12:53:09 | Show all floors
Driver is working, but I didn't try out monitor mode. I will, but currently I'm not home.

15

threads

105

posts

387

credits

Intermediate member

Rank: 3Rank: 3

credits
387
 Author| Published in 2016-4-30 05:37:02 | Show all floors
Apparently the Armbian team has made more tweaks to it:

http://openlinux.amlogic.com:800 ... 5-90ed86d42d.tar.gz
>I succeed to port this driver to kernel.

I haven't yet tried it. Need to figure out it yet.

15

threads

105

posts

387

credits

Intermediate member

Rank: 3Rank: 3

credits
387
 Author| Published in 2016-4-30 23:45:04 | Show all floors
The driver posted by Igor at the Armbian forum on 27 April 2016 - 06:25 PM
doesn't provide the MONITOR mode

It is also rather out dated.
root@orangepiplus:/lib/modules/3.4.111-sun8i/kernel/drivers/net/wireless/rtl8189es# modinfo 8189es.ko
filename:       /lib/modules/3.4.111-sun8i/kernel/drivers/net/wireless/rtl8189es/8189es.ko
version:        v4.3.10.1_13373.20150129

Probably this is the reason, that the CONFIG_WIFI_MONITOR = y was not present in the v4.3.10.1_13373.20150129


I have been able rebuilding conveniently the 8189es driver on the regular Armbian 5.05 from the '52ee6388111fbaf990ec60e93b086cafa6cc373a' commit

where the CONFIG_WIFI_MONITOR = y

The build went smoothly after replacing the platform_ARM_SUNnI_sdio.c in the driver's platform directory with the one from :

https://github.com/loboris/Orang ... rm_ARM_SUNnI_sdio.c

Then

root@orangepiplus:/usr/src/rtl8189ES_linux# make ARCH=arm KSRC=/usr/src/linux-headers-$(uname -r)
make ARCH=arm CROSS_COMPILE= -C /usr/src/linux-headers-3.4.110-sun8i M=/usr/src/rtl8189ES_linux  modules
make[1]: Entering directory '/usr/src/linux-headers-3.4.110-sun8i'
  CC [M]  /usr/src/rtl8189ES_linux/core/rtw_cmd.o
...

  CC [M]  /usr/src/rtl8189ES_linux/hal/phydm/rtl8188e/hal8188erateadaptive.o
  CC [M]  /usr/src/rtl8189ES_linux/hal/phydm/rtl8188e/phydm_rtl8188e.o
  CC [M]  /usr/src/rtl8189ES_linux/platform/platform_ops.o
  CC [M]  /usr/src/rtl8189ES_linux/core/rtw_mp.o
  CC [M]  /usr/src/rtl8189ES_linux/core/rtw_mp_ioctl.o
  LD [M]  /usr/src/rtl8189ES_linux/8189es.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /usr/src/rtl8189ES_linux/8189es.mod.o
  LD [M]  /usr/src/rtl8189ES_linux/8189es.ko
make[1]: Leaving directory '/usr/src/linux-headers-3.4.110-sun8i'
root@orangepiplus:/usr/src/rtl8189ES_linux#

Looking at the info from :

root@orangepiplus:/usr/src/rtl8189ES_linux# lsmod 8189es.ko
Usage: lsmod
root@orangepiplus:/usr/src/rtl8189ES_linux# modinfo 8189es.ko
filename:       /usr/src/rtl8189ES_linux/8189es.ko
version:        v4.3.18.1_15373.20151005
author:         Realtek Semiconductor Corp.
description:    Realtek Wireless Lan Driver
license:        GPL
srcversion:     374911DC5AF9842313AEAA0
alias:          sdio:c*v024Cd8179*
depends:        
vermagic:       3.4.110-sun8i SMP preempt mod_unload modversions ARMv7 p2v8

This driver is more recent, than the one provided  by Igor v4.3.10.1_13373.20150129

The magic version matches the kernel well now and the module loads without errors:

The regular module with the Armbian 5.05:

root@orangepiplus:/usr/src/rtl8189ES_linux# lsmod
Module                  Size  Used by
8189es                896688  0
root@orangepiplus:/usr/src/rtl8189ES_linux# rmmod 8189es

Custom built module:
root@orangepiplus:/usr/src/rtl8189ES_linux# insmod 8189es.ko
root@orangepiplus:/usr/src/rtl8189ES_linux# lsmod
Module                  Size  Used by
8189es               1212556  0

However, I am not sure that the MONITOR mode is available now with the new module.
Probably it would be necessary to reboot the system.
How to replace the regular module with the custom one, so that to load it on the system boot up and discover the MONITOR mode?
Any suggestions on that?

How the iperf could be used for testing the speed ?

4

threads

1118

posts

9531

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9531
Published in 2016-5-1 00:12:23 | Show all floors
Are you sure that it loads nicely? What is dmesg after you insmod it? I think you can just replace .ko file in /lib/modules dir and it should be loaded.

15

threads

105

posts

387

credits

Intermediate member

Rank: 3Rank: 3

credits
387
 Author| Published in 2016-5-1 00:44:46 | Show all floors
The module loads without errors. But there are no logs in the dmesg.
root@orangepiplus:/lib/modules/3.4.110-sun8i/kernel/drivers/net/wireless/rtl8189es# insmod 8189es.ko
root@orangepiplus:/lib/modules/3.4.110-sun8i/kernel/drivers/net/wireless/rtl8189es# lsmod
Module                  Size  Used by
8189es               1212556  0

Furthermore, after loading it the wlan's disappear:
root@orangepiplus:/lib/modules/3.4.110-sun8i/kernel/drivers/net/wireless/rtl8189es# iwconfig
lo        no wireless extensions.
tunl0     no wireless extensions.
eth0      no wireless extensions.

while the old regular driver showed:
root@orangepiplus:~# lsmod
Module                  Size  Used by
8189es                896688  0
root@orangepiplus:~# lsmod 8189es
Usage: lsmod
root@orangepiplus:~# iwconfig
wlan1     unassociated  Nickname:"<WIFI@REALTEK>"
wlan0     unassociated  Nickname:"<WIFI@REALTEK>"

It looks, that the custom built module doesn't work properly, or other settings should be changed further.

15

threads

105

posts

387

credits

Intermediate member

Rank: 3Rank: 3

credits
387
 Author| Published in 2016-5-1 00:46:42 | Show all floors
probably, this is the only log related to loading the custom built module:
Apr 30 18:33:32 localhost kernel: [  194.006739] *******************Try sdio*******************
Apr 30 18:33:32 localhost kernel: [  194.023205] mmc1: new high speed SDIO card at address 0001
Apr 30 18:33:32 localhost kernel: [  194.023549] *******************sdio init ok*******************
Apr 30 18:34:00 localhost kernel: [  221.482235] mmc1: card 0001 removed

nothing else
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list