Wifi Module problems

8 posts
by wAlex » Sat Jul 14, 2012 2:41 pm
i've some problem with a module (r8712u.ko) and i use Debian wheezy.
I've downloaded one already compiled and i did
Code: Select all
insmod r8712.ko
this is what i got
Code: Select all
Error: could not insert module r8712u.ko: Invalid module format
and in dmesg
Code: Select all
r8712u: disagrees about version of symbol module_layout
Then i decided to compile the module myself (directly on the raspberry), i found the source code and i did a
Code: Select all
make ARCH=arm
Code: Select all
make: *** /lib/modules/3.1.9+/build: No such file or directory.  Stop.
then i cloned git linx sources, i created the build folder and i copied all linux source files in that directory. I copied my config in /build/script/kconfig/ and i did a modules_prepare.Then I've compiled wifi modules, this time the process has been successful, and i've got the 8712u.ko,
Code: Select all
install -p -m 644 8712u.ko /lib/modules/3.1.9+/kernel/drivers/net/wireless/
insmod 8712u.ko
.....same error than before....
Code: Select all
modeprobe -a
..... nothing.
I updated and upgraded, upgrade the firmware with rpi-update... I tried insmod 8712u.ko....error, i recompile all again... error....
Any help?
Ah, i tried to recompile kernel too, but it didn't boot.
Posts: 9
Joined: Mon Jul 09, 2012 3:17 pm
by lytnus » Sun Jul 15, 2012 12:55 pm

I am having the same problems; I had no problem using the kernel module supplied on the RPI VerifiedPeripherals page for the rtl8188SU chipset with firmware-realtek on Debian Squeeze, but since moving to Raspbian (debian wheezy with armhf), I have not been able to get my wireless card working at all, although it shows up in lsusb. I have the same errors as yourself when using the kernel module that worked in squeeze.

I think I found the source code, but I must admit I wouldn't have a clue how to compile that into a new, working kernel module!

One solution, which I am reluctant to employ, may be using ndiswrapper in conjunction with the windows drivers to get the card working. I'd rather not do that if I can help it as it feels like a somewhat patchy approach!

Any help would be appreciated :)

Posts: 4
Joined: Sun Jul 15, 2012 12:50 pm
by wAlex » Sun Jul 15, 2012 4:39 pm
Ndiswrapper will not work with raspberry cause his architecture. Ndiswrapper is made for x86 driver and raspberry has arm architecture.
I'm trying to find a solution, but at present none seems to solve the problem.
Posts: 9
Joined: Mon Jul 09, 2012 3:17 pm
by richardtheboffin » Sun Jul 15, 2012 11:04 pm
Same problem here.

Have Edimax 7811 realtek based usb dongle.

Was all working fine until I did rpi-update to get latest firmware and now no wifi...

Same error about 'disagress about verison of symbol module_layout'

I don't quite understand why I'd need to re-compile anything. I'm sure I'm not the only user of an edimax usb dongle with an RPI! Surely the drivers must exisit on the net somewhere.

apt-get install firmware-realtek didn't help either... says I have the latest verision.
Posts: 24
Joined: Thu Apr 19, 2012 12:04 pm
by lytnus » Sun Jul 15, 2012 11:57 pm
I was just typing out a response highlighting how frustrating this problem was, and then I fixed it!

I believe in my case, the problem may have occurred because I followed the squeeze instructions which got everything working before, and placed the r8712u.ko module linked from the RPi verifiedPeripherals page into the /lib/modules/3.1.9+/... folder where modprobe could see it. However, being built for debian squeeze, it threw up errors as we discovered.

Turns out, that by running:
Code: Select all
cd /lib/modules
find -name "r8712*"

Two r8712u.ko files showed up! if I then run:
Code: Select all
insmod path/to/file

On each of the modules, one of them will throw up errors, but the other one works perfectly fine! So it was just a case of removing the offending .ko file, so that it was not picked over the correct one> I assume then that if the module name (r8712u) is listed in /etc/modules, it'll load automatically on startup (assuming it doesn't try too already).

How the working .ko file got there, I don't know. Since I havnt compiled my own, I'll assume it was either there from square one or installed with firmware-realtek. I should note that im running the Raspbian pisces R3 build at the moment, but the above should apply to Debian Wheezy as well I would have thought.

Anyway, I hope that this helps somebody, as it just saved me a lot of headaches!
Posts: 4
Joined: Sun Jul 15, 2012 12:50 pm
by lytnus » Mon Jul 16, 2012 12:07 am
Actually, as a followup to my previous post (I was a bit excited and got it out before fully testing things), I still got some symbol related error when I tried to modprobe the r8712u module I kept out of the two that I had. However running:

Code: Select all
sudo insmod path/to/ko/file

Seemed to work. I also ran:

Code: Select all
sudo depmod -a

And after these, modprobing seems to work from then on. It may have been the case that installing the module using insmod resolved some dependancy lark, and depmod did something along similar lines, allowing the .ko file to function happily once again. But I don't know what's going on there really!

Still, a reboot later and wifi seems to be working now (modprobing no longer complains), making me a happy person!

Posts: 4
Joined: Sun Jul 15, 2012 12:50 pm
by richardtheboffin » Mon Jul 16, 2012 12:16 am
Finally got sucess...

downloaded a few versions of the 8192cu.ko until I found this one:

http://dl.dropbox.com/u/80256631/8192cu-latest.tar.gz (which addresses the problem of not getting the latest, latest version)

And then I found that I was installing the file to:

sudo install -p -m 644 8192cu.ko /lib/modules/3.1.9+/kernel/drivers/net/wireless/

But it appears I should have been putting it here:

sudo install -p -m 644 8192cu.ko /lib/modules/3.1.9+/kernel/net/wireless/
Posts: 24
Joined: Thu Apr 19, 2012 12:04 pm
by wAlex » Mon Jul 16, 2012 3:50 pm
I finally solved the problem.
the module r8712.ko is a staging modules, it can be found in /lib/modules/3.1.9+/kernel/drivers/staging/rtl8712/r8712u.ko
i did insmod /lib/modules/3.1.9+/kernel/drivers/staging/rtl8712/r8712u.ko the module was loaded (till a reboot).
But my wifi adapter still didn't work, cause the vendor id was not present in the module (this is why i wanted to compile it myself).
Code: Select all
to see what was my vid/pid device : 0df6 005b.
Then I installed an hex editor (ghex) and I did (in X terminal)
Code: Select all
ghex /lib/modules/3.1.9+/kernel/drivers/staging/rtl8712/r8712u.ko

Menu Edit ---> find --->I searched for a vid/pid that i know was in (cause i saw it in module source code) F6 0D 5D 00 (vid/pid was 0DF6 005D), I changed it in F6 0D 5B 00 and after a reboot and a new insmod my device worked perfectly
Posts: 9
Joined: Mon Jul 09, 2012 3:17 pm