OrangePI Club
RT8192EU usb-wifi module problem - Printable Version

+- OrangePI Club (http://orangepi.club)
+-- Forum: International (English) Forums (http://orangepi.club/forumdisplay.php?fid=3)
+--- Forum: *nix Distro (http://orangepi.club/forumdisplay.php?fid=4)
+---- Forum: RetrOrangePI (http://orangepi.club/forumdisplay.php?fid=5)
+----- Forum: Hardware compatibility (http://orangepi.club/forumdisplay.php?fid=19)
+----- Thread: RT8192EU usb-wifi module problem (/showthread.php?tid=2206)



RT8192EU usb-wifi module problem - mrxiong - 09-11-2017

Hello guys! Sorry for disturbing, i have not so much experience with compiling something, but maybe you can show me the right way.

What I have:

I have an OPI PC, an usb-wifi dongle TP-LINK TL-WN823N V2 which have 8192eu chipset (at least google says me that) and ROPi 3.0.1 image running. There is no 8192eu support out of the box, so I tried to compile it by myself.

I performed commands like this:
Code:
git clone https://github.com/Mange/rtl8192eu-linux-driver
cd rtl8192eu-linux-driver
make clean
make ARCH=arm
make install

After that, it's appears 8192eu.ko file within directory :/lib/modules/3.4.113-RetrOrangePi--sun8i/kernel/drivers/net/wireless/. then running
Code:
depmod -ae

Then I type 
Code:
sudo modprobe 8192eu

and got this error:

modprobe: ERROR: could not insert '8192eu': Exec format error

Code:
dmesg | tail

telling me "8192eu: disagrees about version of symbol module_layout".

Some google research make me think that I'm using wrong version of linux headers, but linux headers as I understand are similar to the kernel of ROPi:
Code:
uname -r
3.4.113-RetrOrangePi--sun8i

Code:
ls /usr/src/
linux-headers-3.4.113-sun8i
mt7601-3.0.0.4

What am I doing wrong? Maybe there is any other way to start this dongle? Thanks in advance!


RE: RT8192EU usb-wifi module problem - mrxiong - 09-15-2017

As i understand, my mistake was (at least) that I've used other kernel headers than those with which kernel was built - i just simlinked build folder from original armbian sources.
And i see that gcc version used to build kernel (5.4.0) was different than installed in system (4.9.2), but i'm not sure that's an issue.
I tried to build 8192eu.ko within official Armbian dist on my OPi, and there was no problems - module built and loaded properly:
Code:
pi@orangepipc:~/rtl8192eu-linux-driver$ sudo make install
install -p -m 644 8192eu.ko  /lib/modules/3.4.113-sun8i/kernel/drivers/net/wireless/
/sbin/depmod -a 3.4.113-sun8i
pi@orangepipc:~/rtl8192eu-linux-driver$ sudo modprobe 8192eu
pi@orangepipc:~/rtl8192eu-linux-driver$ lsmod
Module                  Size  Used by
8192eu                907941  0
mali_drm                2732  1
drm                   178255  2 mali_drm
bmp085                  3487  0
pcf8591                 3363  0
mali                  123146  0
ump                    29379  3 mali
8189es               1076034  0
btrfs                 712409  0

Is there any workaround here? Maybe i can get original build folder somewhere?  Smile  Problem to get another wifi dongle is that i have 3 dongles and they are all using same chipset.


RE: RT8192EU usb-wifi module problem - alexkidd - 09-15-2017

what if you copy the module from Armbian to RetrOrangePi, it's likely to work since they're based in the same kernel i wonder. We'll be able to generate build folder only for upcoming ROPi v4


RE: RT8192EU usb-wifi module problem - mrxiong - 09-15-2017

(09-15-2017, 07:12 PM)alexkidd Wrote: what if you copy the module from Armbian to RetrOrangePi, it's likely to work since they're based in the same kernel i wonder

Still no success, same result - "ERROR: could not insert '8192eu': Exec format error".

(09-15-2017, 07:12 PM)alexkidd Wrote: We'll be able to generate build folder only for upcoming ROPi v4

Wow, that would be great!
Thanks for answering! i'll be waiting for this release, i think.


RE: RT8192EU usb-wifi module problem - mrxiong - 10-02-2017

Well, i think i made it!

I built the module again within Armbian and copied it to the driver folder (just as you say). Then i added (a little bit dirty IMO) command to the /etc/rc.local:
Code:
modprobe -f 8192eu

which is force loading this module.
That's all! Seems like everything now works good.

[Image: screen.png]

Maybe this will be helpful for somebody too Wink

Thanks.