Jump to content

Recommended Posts

Posted

I have a question to Igor Pecovnik on which sources have he built his v4.3.10.1_13373.20150129 driver from?

 

The driver v4.3.18.1_15373.20151005, which was built from

https://github.com/rdm-dev/rtl8189ES_linux.git

doesn't recognize the SDIO RTL8189ETV module the OPI+ and wifi interface doesn't show up despite, that the module is loaded without errors:

the logs on the system boot up:

[    3.915685] RTL871X: module init start
[    3.915701] RTL871X: rtl8189es v4.3.18.1_15373.20151005
[    3.915710] RTL871X: build time: Apr 30 2016 21:01:55
[    3.915814] RTL871X: module init ret=0
root@orangepiplus:~# lsmod
Module                  Size  Used by
8189es               1212556  0

root@orangepiplus:~# iw list
root@orangepiplus:~# iwconfig
lo        no wireless extensions.
tunl0     no wireless extensions.
eth0      no wireless extensions.

 

 

My understanding is that the sources from
https://github.com/rdm-dev/rtl8189ES_linux.git
are not meant to work with the SDIO RTL8189ETV module the OPI+ is equipped with.
They are designed for the different WIFI IC, as listed in the Makefile below:
########################## WIFI IC ############################
CONFIG_MULTIDRV = n
CONFIG_RTL8188E = y
CONFIG_RTL8812A = n
CONFIG_RTL8821A = n
CONFIG_RTL8192E = n
CONFIG_RTL8723B = n
CONFIG_RTL8814A = n
CONFIG_RTL8703B = n
CONFIG_RTL8188F = n

 

How is the Makefile configured so that it recognizes the SDIO RTL8189ETV module in your build sources?

I knocked upon another explanations here :
http://www.spinics.net/lists/linux-wireless/msg140294.html

They are several ways possible:
1) to add support of the SDIO RTL8189ETV to the main tree here
https://github.com/rdm-dev/rtl8189ES_linux.git
2) rely on another driver
3) wait for the mainstream development.

4) forget the SDIO RTL8189ETV module.

 

Any solution would be helpful.

Posted
I have a question to Igor Pecovnik on which sources have he built his v4.3.10.1_13373.20150129 driver from?

 

I wrote where I took source but I made changes to a code, since it's not working out of the box, and provide a patch against kernel. Since I was in a hurry I did not made any optimizations or else. It's build into kernel and it's working. Good enough? We will see.

Posted

It is getting more clear, that the driver source code has been provided by Amlogic openlinux. I opened their Makefile, which still shows the setting for a different IC, namely :  CONFIG_RTL8188E = y

Do you have an idea of how the 8189 chip is recognized ?

 

I approached the developer of the source I've mentioned. What we told is:

> I have no clue where an official maintained project maintaining public part of rtl8189 driver.
> The repository you mentioned (https://github.com/rdm-dev/rtl8189ES_linux/) has the only goal to make the BSP for the HomePilot device compilable by external developers.
>
> Best regards,
> Jens

 

As I understand it, the Realtek themselves don't care much about the generic driver for their equipment. Is that the same approach with the OrangePI ?

Posted

Thanks Igor, this is encouraging. Could you switch the

CONFIG_WIFI_MONITOR =

to yes ?

 

The only thing, which troubles me until I see the result, is that jernejsk has a 8188 adapter (USB), which, I believe, is different from 8189 SDIO

 

How could the patch be applied as mentioned on the link ?

https://github.com/jernejsk/OpenELEC-OPi2/blob/openelec-7.0/packages/linux-drivers/RTL8189ES/patches/RTL8189ES-000-change-build-settings.patch

Posted

I've installed and it works fine so far. About 2% rx dropped on 2GB download, so not that bad. We'll see yet...

After few days of low activity, rx dropped packages rises to ca 12%.

Posted

How  could the iperf be used for testing the speed ?

 

 

Jernejsk has kindly helped me building the new driver from

BTW: Another approach:

https://github.com/i...508183372d3c990

 

 

The driver is building without errors:
root@orangepiplus:/usr/src/rtl8189ES_linux# make ARCH=arm KSRC=/usr/src/linux-headers-$(uname -r) CROSS_COMPILE=
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/core/rtw_security.o

I switched
CONFIG_WIFI_MONITOR = y

The module loads without problem :
root@orangepiplus:/usr/src/rtl8189ES_linux# insmod 8189es.ko
root@orangepiplus:/usr/src/rtl8189ES_linux# lsmod
Module                  Size  Used by
8189es               1082364  0

May  2 21:34:07 localhost kernel: [ 1382.566732] *******************Try sdio*******************
May  2 21:34:07 localhost kernel: [ 1382.578184] mmc1: new high speed SDIO card at address 0001
May  2 21:34:07 localhost kernel: [ 1382.578505] *******************sdio init ok*******************


root@orangepiplus:/usr/src/rtl8189ES_linux# iw list

        Supported interface modes:
                 * IBSS
                 * managed   <<-- appeared now
                 * AP
                 * monitor
                 * P2P-client
                 * P2P-GO

Another improvement could be observed as the previous driver always showed two wlan's. Now a single one is present:

root@orangepiplus:/usr/src/rtl8189ES_linux# iwconfig
wlan0     unassociated  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency=2.412 GHz  Access Point: Not-Associated   
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

The major deception comes from the ultimate goal to make the Monitor mode working with RTL8189, but it still doesn't :
[+] scanning for wireless devices...
[!] no wireless interfaces were found.
[!] you need to plug in a wifi device or install drivers.

I believe the Monitor mode has not just been implemented into the driver.

I had trouble installing it:

root@orangepiplus:/usr/src/rtl8189ES_linux# make install
install -p -m 644 8189es.ko  
install: missing destination file operand after ‘8189es.ko’
Try 'install --help' for more information.
Makefile:1640: recipe for target 'install' failed
make: *** [install] Error 1

 

How could the driver be properly installed to the running system?

Posted

If you already done it - post the recipe and I'll try to put it into kernel and put out an update.

Posted

Igor,

What do you mean by recipe ? Is it a step by step procedure or anything else?

 

The only difficulty I have is installing the driver with make:

 

root@orangepiplus:/usr/src/rtl8189ES_linux# make install
install -p -m 644 8189es.ko  
install: missing destination file operand after ‘8189es.ko’
Try 'install --help' for more information.
Makefile:1640: recipe for target 'install' failed
make: *** [install] Error 1

Posted

yes, recipe = step by step.

 

"install" want's to have a destination. 

install -p -m 644 8189es.ko destination

That's a problem here, but don't bother since I will try to put it into kernel. 

Posted

Based on my 5.05 release experience, I was trying to reproduce the driver building on your new image

root@orangepiplus:/usr/src/linux-headers-3.4.112-sun8i# uname -a
Linux orangepiplus 3.4.112-sun8i #30 SMP PREEMPT Sat Apr 30 19:49:10 CEST 2016 armv7l GNU/Linux

 

It not building on this new build. I 1st tried without "make scripts" as I read in the release history that scripts are rebuilt on initial boot: "installing headers autocompile scripts"

 

But the driver build needs the scripts anyway :

 

root@orangepiplus:/usr/src/rtl8189ES_linux# make ARCH=arm KSRC=/usr/src/linux-headers-$(uname -r) CROSS_COMPILE=
make ARCH=arm CROSS_COMPILE= -C /usr/src/linux-headers-3.4.112-sun8i M=/usr/src/rtl8189ES_linux  modules
make[1]: Entering directory '/usr/src/linux-headers-3.4.112-sun8i'
  CC [M]  /usr/src/rtl8189ES_linux/core/rtw_cmd.o
/bin/sh: 1: /usr/src/linux-headers-3.4.112-sun8i/scripts/recordmcount: not found
scripts/Makefile.build:307: recipe for target '/usr/src/rtl8189ES_linux/core/rtw_cmd.o' failed
make[2]: *** [/usr/src/rtl8189ES_linux/core/rtw_cmd.o] Error 127
Makefile:1368: recipe for target '_module_/usr/src/rtl8189ES_linux' failed
make[1]: *** [_module_/usr/src/rtl8189ES_linux] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-3.4.112-sun8i'
Makefile:1634: recipe for target 'modules' failed
make: *** [modules] Error 2
root@orangepiplus:/usr/src/rtl8189ES_linux#

 

 

Then I tried to "make scripts" but in vain :

 

root@orangepiplus:/usr/src/linux-headers-3.4.112-sun8i# cd /usr/src/linux-headers-$(uname -r)
root@orangepiplus:/usr/src/linux-headers-3.4.112-sun8i# make scripts
scripts/kconfig/conf --silentoldconfig Kconfig
fs/Kconfig:287: can't open file "fs/fs_compat.kconfig"
/usr/src/linux-headers-3.4.112-sun8i/scripts/kconfig/Makefile:33: recipe for target 'silentoldconfig' failed
make[2]: *** [silentoldconfig] Error 1
/usr/src/linux-headers-3.4.112-sun8i/Makefile:493: recipe for target 'silentoldconfig' failed
make[1]: *** [silentoldconfig] Error 2
make: *** No rule to make target 'include/config/auto.conf', needed by 'scripts'.  Stop.
root@orangepiplus:/usr/src/linux-headers-3.4.112-sun8i#

 

The driver build end up in an error :

root@orangepiplus:/usr/src/linux-headers-3.4.112-sun8i# cd /usr/src/rtl8189ES_linux/
root@orangepiplus:/usr/src/rtl8189ES_linux# make ARCH=arm KSRC=/usr/src/linux-headers-$(uname -r) CROSS_COMPILE=
make ARCH=arm CROSS_COMPILE= -C /usr/src/linux-headers-3.4.112-sun8i M=/usr/src/rtl8189ES_linux  modules
make[1]: Entering directory '/usr/src/linux-headers-3.4.112-sun8i'
  CC [M]  /usr/src/rtl8189ES_linux/core/rtw_cmd.o
/bin/sh: 1: /usr/src/linux-headers-3.4.112-sun8i/scripts/recordmcount: not found
scripts/Makefile.build:307: recipe for target '/usr/src/rtl8189ES_linux/core/rtw_cmd.o' failed
make[2]: *** [/usr/src/rtl8189ES_linux/core/rtw_cmd.o] Error 127
Makefile:1368: recipe for target '_module_/usr/src/rtl8189ES_linux' failed
make[1]: *** [_module_/usr/src/rtl8189ES_linux] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-3.4.112-sun8i'
Makefile:1634: recipe for target 'modules' failed
make: *** [modules] Error 2

 

Could you figure out, why the scripts are not

 

 

By the way, the Armbian's 5.10 wifi driver is outdated and doesn't correct the duplicated wlan:

 

root@orangepiplus:~# modinfo /lib/modules/3.4.112-
sun8i/kernel/drivers/net/wireless/rtl8189es/8189es.ko

version:        v4.3.10.1_13373.20150129

 

 

root@orangepiplus:~# iwconfig
wlan1     unassociated  Nickname:"<WIFI@REALTEK>"
wlan0     unassociated  Nickname:"<WIFI@REALTEK>"

 

Another remark for the 5.10 release is that boots significantly slower and the 1st phase of booting is not indicated by any LED (all off). It is very confusing, as one may think, that the boot doesn't run.

Posted

The 5.10 release "make scripts" is broken. Will you correct it, so that I could build the driver and post the building steps?

Posted

Yes, bug is present on sun8i/h3 boards only. No fix yet.

 

Wrote on mobile phone

Posted

Unfortunately, I have no possibility to rebuild the kernel at that stage. Could the scripts compilation fix be posted or a minor release be published?

Posted

This would be great to complete at least this task ... find other bugs ;)

Posted

This would be great to complete at least this task ... find other bugs ;)

We are still in the fixing phase and small things can be done withing this release.

Posted

Thanks to the Armbian team for the headers scripts generation bug fixing and the minor version 5.11 release.
I was able upgrading the 5.10 image to 5.11 and building the 5 october .

 

Here is a recipe :
root@orangepiplus:~# apt-get update && apt-get upgrade

root@orangepiplus:~# cd /usr/src/linux-headers-$(uname -r)
root@orangepiplus:/usr/src/linux-headers-3.4.112-sun8i# make scripts

root@orangepiplus:~# cd /usr/src

root@orangepiplus:/usr/src# git clone https://github.com/jwrdegoede/rtl8189ES_linux/

root@orangepiplus:/usr/src# cd rtl8189ES_linux
root@orangepiplus:/usr/src/rtl8189ES_linux# git checkout 080f2aaf6bc8e08eeb3b51f0b8c377eae1ea7ed7

root@orangepiplus:/usr/src/rtl8189ES_linux#

wget https://raw.githubusercontent.com/jernejsk/OpenELEC-OPi2/openelec-7.0/packages/linux-drivers/RTL8189ES/patches/RTL8189ES-000-change-build-settings.patch

root@orangepiplus:/usr/src/rtl8189ES_linux# patch -p1 < RTL8189ES-000-change-build-settings.patch

root@orangepiplus:/usr/src/rtl8189ES_linux#

make ARCH=arm KSRC=/usr/src/linux-headers-$(uname -r) CROSS_COMPILE=

 

The "make install" doesn't run. I copied it manually :

cp -a 8189es.ko /lib/modules/3.4.112-sun8i/kernel/drivers/net/wireless/rtl8189es/

 

root@orangepiplus:/usr/src/rtl8189ES_linux# modinfo 8189es.ko
filename:       /usr/src/rtl8189ES_linux/8189es.ko
version:        v4.3.18.1_15373.20151005 <== 5 october 2015
author:         Realtek Semiconductor Corp.
description:    Realtek Wireless Lan Driver
license:        GPL
srcversion:     AD6BE9C509ECC03E70462BA
alias:          sdio:c*v024Cd8179*
depends:        
vermagic:       3.4.112-sun8i SMP preempt mod_unload modversions ARMv7 p2v8


I enabled the Monitor mode in the Make file.

It even shows up in the module capabilities:
root@orangepiplus:/usr/src/rtl8189ES_linux# iw list
        Supported Ciphers:
                * WEP40 (00-0f-ac:1)
                * WEP104 (00-0f-ac:5)
                * TKIP (00-0f-ac:2)
                * CCMP (00-0f-ac:4)
        Available Antennas: TX 0 RX 0
        Supported interface modes:
                 * IBSS
                 * managed
                 * AP
                 * monitor   <----
                 * P2P-client
                 * P2P-GO
        software interface modes (can always be added):
                 * monitor

Unfortunately, the switch to monitor mode doesn't run :

"iwconfig wlan0 mode monitor"

oot@orangepiplus:/usr/src/rtl8189ES_linux# iwconfig wlan0 mode monitor
Error for wireless request "Set Mode" (8B06) :
    SET failed on device wlan0 ; Operation not permitted.

Despite this, the positive bug fix for this driver is that the wlan interface shows up correctly in the single instance and is not duplicated:

root@orangepiplus:~# iwconfig
lo        no wireless extensions.

tunl0     no wireless extensions.

wlan0     unassociated  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency=2.412 GHz  Access Point: Not-Associated  

I haven't tested the driver performance and the packets drop rate.

 

 

I believe it is worth integrating in the new release.

Posted

I'll merge it asap. Thanks too you too.

 

BTW. Now we are extending task to include support for 8189ftv found on latest OPi boards.

Posted

@y52, I don't have time to test it just now, but are you sure that simple "ifconfig wlan0 down" before changing mode wouldn't help?

Posted

This is easy to check. Here is a log :

 

root@orangepiplus:~# date
Thu May 26 23:20:49 CEST 2016

 

root@orangepiplus:~# iwconfig
wlan0     unassociated  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency=2.412 GHz  Access Point: Not-Associated   

 

root@orangepiplus:~# ifconfig wlan0 down

 

The wlan0 still present :
root@orangepiplus:~# iwconfig
wlan0     unassociated  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency=2.412 GHz  Access Point: Not-Associated   

 

root@orangepiplus:~# iwconfig wlan0 mode monitor
Error for wireless request "Set Mode" (8B06) :
    SET failed on device wlan0 ; Operation not permitted.

 

root@orangepiplus:~# ifconfig wlan0 up

root@orangepiplus:~# iwconfig
wlan0     unassociated  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency=2.412 GHz  Access Point: Not-Associated

Posted

I checked source code and monitor mode seems to be supported. Maybe you can try this:

sudo iw phy phy0 interface add wlan1 type monitor

where wlan1 is some unused interface. If that doesn't work, try to play with ifconfig up/down before.

 

At the end, you will have two interfaces, linked to same physical device. You can remove unneeded one with:

sudo iw <interface> del

where <interface> is the name of the interface you want to delete.

Posted

It seems this method fails as well on the rtl8189 driver build.

" iw phy phy0 interface add mon0 type monitor "

creates a somewhat nonfunctional interface, which does nothing, and is not capable monitoring network activities.

 

 

I have another dongle WiFi. It switches to monitor mode natively:

 

root@bananapipro:~# lsmod
Module                  Size  Used by
rt2800usb              17661  0
rt2800lib              71334  1 rt2800usb

 

root@bananapipro:~#  iwconfig
wlan0     IEEE 802.11bgn  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=0 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off

root@bananapipro:~# iwconfig wlan0 mode monitor

 

root@bananapipro:~#  iwconfig
wlan0     IEEE 802.11bgn  Mode:Monitor  Tx-Power=0 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
 

root@bananapipro:~# iwconfig
wlan0     IEEE 802.11bgn  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=0 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
         

Another method works as well:
root@bananapipro:~# iw phy phy0 interface add mon0 type monitor
root@bananapipro:~# iwconfig
wlan0     IEEE 802.11bgn  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=0 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
         
mon0      IEEE 802.11bgn  Mode:Monitor  Tx-Power=0 dBm   
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:off

 

The mon0 works with rt2800usb but fails with rtl8189

Posted

To reproduce your scenario :

 

root@orangepiplus:~# date
Sun May 29 23:20:01 CEST 2016

 

root@orangepiplus:~# lsmod
Module                  Size  Used by
8189es               1082364  0

 

root@orangepiplus:~# iwconfig
wlan0     unassociated  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency=2.412 GHz  Access Point: Not-Associated   
          Sensitivity:0/0  
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

root@orangepiplus:~# iw phy phy0 interface add mon0 type monitor
root@orangepiplus:~# iwconfig
mon0      IEEE 802.11bg  Mode:Monitor  Tx-Power=12 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          
wlan0     unassociated  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency=2.412 GHz  Access Point: Not-Associated   
          Sensitivity:0/0  
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

root@orangepiplus:~# iw wlan0 del

 

root@orangepiplus:~# iwconfig
mon0      IEEE 802.11bg  Mode:Monitor  Tx-Power=12 dBm   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:on

 

root@orangepiplus:~# airodump-ng mon0

 CH 11 ][ Elapsed: 20 s ][ 2016-05-29 23:23                                         
 BSSID              PWR  Beacons    #Data, #/s  CH  MB   ENC  CIPHER AUTH ESSID
                                                                                                                                  

Doesn't find any wireless network.

Posted

@y52,

 

just for fun I tried to use monitor mode on OPi2 using my OpenELEC system. I installed wireless tools and tcpdump from repo and to my amazement, it worked. So I think some service on Armbian is preventing wifi to work correctly. Maybe you will have more luck now that Igor included latest driver in regular builds.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines