Welcome! Log In Create A New Profile

Advanced

Installing module rtl88x2bu for 1200ac usb wifi

Posted by echowarrior108 
Installing module rtl88x2bu for 1200ac usb wifi
November 14, 2019 10:10PM
This is my workaround for installing rtl88x2bu module for 1200ac usb wifi, I had a difficult time and days of searches to make it work and since no one else made a finished what to do if this happens list for it I kept notes:)

I won't go into all the errors that prompted all of the edits as I would need to do a fresh install and to be honest who wants to do such a thing twice?

to start you will need to install the following:


dpkg -i /boot/linux-headers-4.4.189-oxnas-tld-1_1.0_armel.deb
(or current version)

then

apt install git dkms build-essential


git clone https://github.com/cilynx/rtl88x2BU_WiFi_linux_v5.3.1_27678.20180430_COEX20180427-5959.git

or latest update which is maintained on github.

dkms add ./rtl88x2BU_WiFi_linux_v5.3.1_27678.20180430_COEX20180427-5959

cd /lib/modules/$(uname -r)
rm -r build
rm -r source      
( these two files above may not be there)

ln -s /usr/src/linux-headers-$(uname -r) build
ln -s /usr/src/linux-headers-$(uname -r) source

verify these are there when completed!

cd  /usr/src/linux-headers-4.4.189-oxnas-tld-1/arch/
ln -s arm armv6l


 cd /usr/src/linux-headers-4.4.189-oxnas-tld-1/arch/armv6l/include/asm/mach (or current Linux-headers)
 cp -r irq.h to irqs.h 
 nano irqs.h  (change all instances of irq.h in file to irqs.h)

cd /usr/src/linux-headers-4.4.189-oxnas-tld-1/include/linux/
cp -r /usr/src/linux-headers-4.4.189-oxnas-tld-1/arch/armv6l/include/asm/mach/irqs.h  irqs.h

cp -r /usr/src/linux-headers-4.4.189-oxnas-tld-1/arch/armv6l/include/asm/mach  /usr/src/linux-headers-4.4.189-oxnas-tld-1/arch/armv6l/include/mach

nano /usr/src/linux-headers-4.4.189-oxnas-tld-1/include/net/sch_generic.h
insert #include <uapi/linux/pkt_cls.h>  before #include <linux/pkt_cls.h>

(leave # in front of the command)

nano /usr/src/rtl88x2bu-5.3.1/core/rtw_debug.c
delete RTW_PRINT_SEL(sel, "build time: %s %s\n", __DATE__, __TIME__); (on line 45)

sudo dkms install rtl88x2bu/5.3.1

if everything worked ok it should run for a long time with no error messages.

modprobe 88x2bu

after that it should show up in iwconfig.

note: this may be a work around for other realtek devices and may need to be used when kernel updates are completed.
I also tried this on my Ubuntu laptop and it worked the same.
I tried not to miss any steps but if you get and error please post it and I will try to help:)

learning is living! Echowarrior108



device pogoplug-pro v3

Debian GNU/Linux bullseye/sid \n \l
Linux version 4.4.201-oxnas-tld-1 (root@tldDebian) (gcc version 8.3.0 (Debian 8.3.0-6) ) #1 SMP PREEMPT Fri Nov 15 04:12:45 PST 2019



Edited 1 time(s). Last edit at 11/14/2019 10:13PM by echowarrior108.
Re: Installing module rtl88x2bu for 1200ac usb wifi
November 15, 2019 03:58AM
echowarrior108,

Good works :)

I don't know if you've noticed that I have corrected the module building problem for Kirwood and MVEBU kernels, but have not done that for this OXNAS kernel!

https://forum.doozan.com/read.php?2,89449,89449#msg-89449

When I release a new kernel for OXNAS (have not been requested by anyone), I would like to you to try building this module without any work around to see if it works.

For example, the uapi path that you needed to corrected, I believe was because of the problem in my previous build procedure with make-kpkg (there was a bug in this Debian tool that messed up the headers).

insert #include <uapi/linux/pkt_cls.h>  before #include <linux/pkt_cls.h>

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Installing module rtl88x2bu for 1200ac usb wifi
November 16, 2019 12:00AM
Thanks!!

sure will try, I also wanted to build a from scratch spare usb and I can do it on that:)

I did as well get the plug to work as an AP using create_ap which works very good. I will post that on the wifi ap post as it appears to be a really nice setup and is working really well !!

I'm just learning builds so it was a challenge and I am sure you are way more advanced at his than I am:)

learning is living! Echowarrior108



device pogoplug-pro v3

Debian GNU/Linux bullseye/sid \n \l
Linux version 4.4.201-oxnas-tld-1 (root@tldDebian) (gcc version 8.3.0 (Debian 8.3.0-6) ) #1 SMP PREEMPT Fri Nov 15 04:12:45 PST 2019
Re: Installing module rtl88x2bu for 1200ac usb wifi
November 16, 2019 09:06PM
Here is the new kernel

https://forum.doozan.com/read.php?2,16044

Quote

Kernel linux-4.4.201-oxnas-tld-1 package was uploaded.

New/Update features:

- Pickup security patches from mainline.
- This kernel header now can be installed and used to build modules, without any special tweaks (this issue was described here).

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Installing module rtl88x2bu for 1200ac usb wifi
November 17, 2019 11:36PM
Hi bodhi, run new kernel on this device, to differentiate from my original plug I will name it device 2,
keep in mid I have done this from a fresh install so all of the above workarounds are still in place, When I get more time I will do a frsh install and see what I need to add.

When first ran the dpkg:

dpkg -i linux-image-4.4.201-oxnas-tld-1_1.0_armel.deb
Selecting previously unselected package linux-image-4.4.201-oxnas-tld-1.
(Reading database ... 54573 files and directories currently installed.)
Preparing to unpack linux-image-4.4.201-oxnas-tld-1_1.0_armel.deb ...
Unpacking linux-image-4.4.201-oxnas-tld-1 (1.0) ...
Setting up linux-image-4.4.201-oxnas-tld-1 (1.0) ...
dkms: running auto installation service for kernel 4.4.201-oxnas-tld-1:Error! Your kernel headers for kernel 4.4.201-oxnas-tld-1 cannot be found.
Please install the linux-headers-4.4.201-oxnas-tld-1 package,
or use the --kernelsourcedir option to tell DKMS where it's located


so of course I ran it:

dpkg -i linux-headers-4.4.201-oxnas-tld-1_1.0_armel.deb
Selecting previously unselected package linux-headers-4.4.201-oxnas-tld-1.
(Reading database ... 55999 files and directories currently installed.)
Preparing to unpack linux-headers-4.4.201-oxnas-tld-1_1.0_armel.deb ...
Unpacking linux-headers-4.4.201-oxnas-tld-1 (1.0) ...
Setting up linux-headers-4.4.201-oxnas-tld-1 (1.0) ...


all went well with that, next I ran again:


dpkg -i linux-image-4.4.201-oxnas-tld-1_1.0_armel.deb
(Reading database ... 70064 files and directories currently installed.)
Preparing to unpack linux-image-4.4.201-oxnas-tld-1_1.0_armel.deb ...
Unpacking linux-image-4.4.201-oxnas-tld-1 (1.0) over (1.0) ...
Setting up linux-image-4.4.201-oxnas-tld-1 (1.0) ...
dkms: running auto installation service for kernel 4.4.201-oxnas-tld-1:
Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j2 KERNELRELEASE=4.4.201-oxnas-tld-1 KVER=4.4.201-oxnas-tld-1 src=/usr/src/rtl88x2bu-5.3.1......(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.4.201-oxnas-tld-1 (armv6l)
Consult /var/lib/dkms/rtl88x2bu/5.3.1/build/make.log for more information.

the log file result was:

DKMS make.log for rtl88x2bu-5.3.1 for kernel 4.4.201-oxnas-tld-1 (armv6l)
Sun Nov 17 23:17:21 EST 2019
/bin/sh: 1: bc: not found
make ARCH=armv6l CROSS_COMPILE= -C /lib/modules/4.4.201-oxnas-tld-1/build M=/var/lib/dkms/rtl88x2bu>
make[1]: Entering directory '/usr/src/linux-headers-4.4.201-oxnas-tld-1'
Makefile:631: arch/armv6l/Makefile: No such file or directory
make[1]: *** No rule to make target 'arch/armv6l/Makefile'.  Stop.
make[1]: Leaving directory '/usr/src/linux-headers-4.4.201-oxnas-tld-1'
make: *** [Makefile:2011: modules] Error 2

the thing we are missing in the headers is that it is calling for (armv6l) which is actually a symbolic link to the original file arm:

/usr/src/linux-headers-4.4.201-oxnas-tld-1/arch# ln -s arm armv6l

was all I ran thus far then I re-ran the dpkg file:

dpkg -i linux-image-4.4.201-oxnas-tld-1_1.0_armel.deb
(Reading database ... 70064 files and directories currently installed.)
Preparing to unpack linux-image-4.4.201-oxnas-tld-1_1.0_armel.deb ...
Unpacking linux-image-4.4.201-oxnas-tld-1 (1.0) over (1.0) ...
Setting up linux-image-4.4.201-oxnas-tld-1 (1.0) ...
dkms: running auto installation service for kernel 4.4.201-oxnas-tld-1:
Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j2 KERNELRELEASE=4.4.201-oxnas-tld-1 KVER=4.4.201-oxnas-tld-1 src=/usr/src/rtl88x2bu-5.3.1.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
cleaning build area...

DKMS: build completed.

88x2bu.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.4.201-oxnas-tld-1/updates/dkms/

depmod....
Failed to restart systemd-modules-load.service: Connection timed out
See system logs and 'systemctl status systemd-modules-load.service' for details.

DKMS: install completed.
.
update-initramfs: Generating /boot/initrd.img-4.4.201-oxnas-tld-1

at this point this was all that was needed, I need to finish the upgrade to the kernel and reboot.
I will get back to the this with some updates below later:)

learning is living! Echowarrior108



device pogoplug-pro v3

Debian GNU/Linux bullseye/sid \n \l
Linux version 4.4.201-oxnas-tld-1 (root@tldDebian) (gcc version 8.3.0 (Debian 8.3.0-6) ) #1 SMP PREEMPT Fri Nov 15 04:12:45 PST 2019
Re: Installing module rtl88x2bu for 1200ac usb wifi
November 18, 2019 02:39AM
After rebooting I found it necessary to renter the create_ap

sudo create_ap -g 10.10.6.72 wlxb wlp0s0  myap myappassword 
WARN: Your adapter does not fully support AP virtual interface, enabling --no-virt
Config dir: /tmp/create_ap.wlxb.conf.7Mf1i5DR
PID: 14381
Network Manager found, set wlxbas unmanaged device... DONE
Sharing Internet using method: nat
hostapd command-line interface: hostapd_cli -p /tmp/create_ap.wlxb.conf.7Mf1i5DR/hostapd_ctrl
Configuration file: /tmp/create_ap.wlxb.conf.7Mf1i5DR/hostapd.conf
Using interface wlxb with hwaddr xx:xx:xx:xx:xx:xx and ssid "myap"
wlxbc: interface state UNINITIALIZED->ENABLED
wlxbc: AP-ENABLED

not sure at this point how to set it to autorun on startup:)

the speed is also slow, I am sure the settings need to be changed yet but I have not got that far with this, right now it is slower than the actual incoming signal which is 300mbs received on wlp0s0 and 54mbs sending on wlxb. but it does work and hold a consistent connection which fixed a problem in my home as far as streaming video to my spare bedroom.....

learning is living! Echowarrior108



device pogoplug-pro v3

Debian GNU/Linux bullseye/sid \n \l
Linux version 4.4.201-oxnas-tld-1 (root@tldDebian) (gcc version 8.3.0 (Debian 8.3.0-6) ) #1 SMP PREEMPT Fri Nov 15 04:12:45 PST 2019
Re: Installing module rtl88x2bu for 1200ac usb wifi
November 18, 2019 03:14AM
Quote

the thing we are missing in the headers is that it is calling for (armv6l) which is actually a symbolic link to the original file arm:

/usr/src/linux-headers-4.4.201-oxnas-tld-1/arch# ln -s arm armv6l

That's interesting! I guess I need to take a look to see why it does not know that it is armv6l.

Quote

not sure at this point how to set it to autorun on startup:)

If you need to rerun create_ap upon reboot then add it to /etc/rc.local (add the same command at the end of rc.local, before exit 0, and without sudo).


create_ap -g 10.10.6.72 wlxb wlp0s0  myap myappassword

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 11/18/2019 03:15AM by bodhi.
Re: Installing module rtl88x2bu for 1200ac usb wifi
November 18, 2019 09:55AM
Thanks, will do!!

learning is living! Echowarrior108



device pogoplug-pro v3

Debian GNU/Linux bullseye/sid \n \l
Linux version 4.4.201-oxnas-tld-1 (root@tldDebian) (gcc version 8.3.0 (Debian 8.3.0-6) ) #1 SMP PREEMPT Fri Nov 15 04:12:45 PST 2019
Re: Installing module rtl88x2bu for 1200ac usb wifi
November 18, 2019 05:22PM
Echowarrior108,

Did DKMS figured out it is armv6l, or did you set any env in your shell to explicitly saying your box is armv6l ?

make ARCH=armv6l CROSS_COMPILE= -C /lib/modules/4.4.201-oxnas-tld-1/build M=/var/lib/dkms/rtl88x2bu>
Usually this is just arm
make ARCH=arm CROSS_COMPILE= -C /lib/modules/4.4.201-oxnas-tld-1/build M=/var/lib/dkms/rtl88x2bu>

Different topic:

And this in your post above does not look right. Did you rebuild the kernel or just forgot to change your post signature?
Linux version 4.4.201-oxnas-tld-1 (root@tldDebian) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)

The kernel version is
Linux version 4.4.201-oxnas-tld-1 (root@tldDebian) (gcc version 8.3.0 (Debian 8.3.0-6) ) #1 SMP PREEMPT Fri Nov 15 04:12:45 PST 2019

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Installing module rtl88x2bu for 1200ac usb wifi
November 18, 2019 06:39PM
folder name:
/rtl88x2BU_WiFi_linux_v5.3.1_27678.20180430_COEX20180427-5959

when I type in make:

make ARCH=armv6l CROSS_COMPILE= -C /lib/modules/4.4.201-oxnas-tld-1/build M=/root/rtl88x2BU_WiFi_linux_v5.3.1_27678.20180430_COEX20180427-5959  modules


dkms.conf

PACKAGE_NAME="rtl88x2bu"
PACKAGE_VERSION="5.3.1"
MAKE[0]="make KVER=$kernelver src=$source_tree/rtl88x2bu-$PACKAGE_VERSION"
CLEAN="make clean"
BUILT_MODULE_NAME[0]="88x2bu"
DEST_MODULE_LOCATION[0]="/kernel/drivers/net"
AUTOINSTALL="yes"


so I guess instead of $kernelver i could put arm, it was preset:)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I only copied the verision part after updating , thanks for catching that:)

learning is living! Echowarrior108



device pogoplug-pro v3

Debian GNU/Linux bullseye/sid \n \l
Linux version 4.4.201-oxnas-tld-1 (root@tldDebian) (gcc version 8.3.0 (Debian 8.3.0-6) ) #1 SMP PREEMPT Fri Nov 15 04:12:45 PST 2019



Edited 1 time(s). Last edit at 11/18/2019 06:45PM by echowarrior108.
Re: Installing module rtl88x2bu for 1200ac usb wifi
November 18, 2019 06:48PM
I meant you only need to use arm:
make ARCH=arm CROSS_COMPILE= -C /lib/modules/4.4.201-oxnas-tld-1/build M=/root/rtl88x2BU_WiFi_linux_v5.3.1_27678.20180430_COEX20180427-5959  modules

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Installing module rtl88x2bu for 1200ac usb wifi
November 18, 2019 10:08PM
oh , I just ran the make file that was supplied from git, I like your way better:)

learning is living! Echowarrior108



device pogoplug-pro v3

Debian GNU/Linux bullseye/sid \n \l
Linux version 4.4.201-oxnas-tld-1 (root@tldDebian) (gcc version 8.3.0 (Debian 8.3.0-6) ) #1 SMP PREEMPT Fri Nov 15 04:12:45 PST 2019
Re: Installing module rtl88x2bu for 1200ac usb wifi
November 18, 2019 10:21PM
bodhi Wrote:
-------------------------------------------------------

> If you need to rerun create_ap upon reboot then
> add it to /etc/rc.local (add the same command at
> the end of rc.local, before exit 0, and without
> sudo).
>
>
>
> create_ap -g 10.10.6.72 wlxb wlp0s0  myap
> myappassword
>


thanks for the tip it worked great!!!

learning is living! Echowarrior108



device pogoplug-pro v3

Debian GNU/Linux bullseye/sid \n \l
Linux version 4.4.201-oxnas-tld-1 (root@tldDebian) (gcc version 8.3.0 (Debian 8.3.0-6) ) #1 SMP PREEMPT Fri Nov 15 04:12:45 PST 2019
Re: Installing module rtl88x2bu for 1200ac usb wifi
November 18, 2019 10:40PM
Cool :)

I'm adding this to the Wiki as a more modern way to create an AP on Kirkwood.

https://forum.doozan.com/read.php?2,6300,92794#msg-92794

If you'd like to add more details or do further cleanup, it would be great!

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Installing module rtl88x2bu for 1200ac usb wifi
November 18, 2019 11:08PM
Great!! I thank you, I will be keeping up with this as i am learn as I go and if it helps others then its all for the better!! I will do as you have done with other wikis and make proper edits when needed on the top of the page and explain why it was needed.

learning is living! Echowarrior108



device pogoplug-pro v3

Debian GNU/Linux bullseye/sid \n \l
Linux version 4.4.201-oxnas-tld-1 (root@tldDebian) (gcc version 8.3.0 (Debian 8.3.0-6) ) #1 SMP PREEMPT Fri Nov 15 04:12:45 PST 2019
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: