Help Request: WiFi adapter drivers

Status
Not open for further replies.

berrywipe

Dabbler
Joined
Mar 11, 2012
Messages
19
hi ppl. I'm posting here because the attempt to have a working wifi installation is driving me crazy. Hope somebody can help.
None of the network adapters I tested is being seen by the os. Here is the list of the tested adapters:

1)USB dongle: chinese OEM wifi adapter (ok this one was lame... didn't expect it to work :P)
2)USB dongle: Hamlet HNWU254G (don't know which controller is based on)
3)PCI card: D-Link DWL-G520.
Based on this controller: Atheros AR5001X+
Quoting from FreeBSD documentation:
The ath(4) driver supports all Atheros Cardbus and PCI cards, except those that are based on the AR5005VL chipset.
AR5001X+ should be ok... right?
4)USB dongle: TP-Link WN821N (don't know if it's supported)
5)USB dongle: D-Link DWA-111
supported in FreeBSD 8.2, since:
[i386,amd64] The rum(4) driver supports USB 2.0 wireless adapters based on the Ralink RT2501USB and RT2601USB chipsets, including:
• ...
• D-Link DWA-111

None of these can be even seen in the nic list. Any clue?
How can I see if a driver is installed under freenas or disabled?
In case it's disabled, how can I enable it?
Is it ok to add a tunable instead of editing loader.conf (which doesn't seem to be editable)?
I tried it and under loader.conf.local I can see the line:
Code:
if_rum_load="YES"

but nothing happens

Please, any hint is welcome.
 

berrywipe

Dabbler
Joined
Mar 11, 2012
Messages
19
At least guys, how can I determine whether a wifi adapter is supported or not?
What's the point of refering to freebsd documentation for determining compatible hardware if freenas doesn't support the same devices?
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
How can I see if a driver is installed under freenas or disabled?
In case it's disabled, how can I enable it?
Is it ok to add a tunable instead of editing loader.conf (which doesn't seem to be editable)?
I tried it and under loader.conf.local I can see the line:
Code:
if_rum_load="YES"

but nothing happens

Please, any hint is welcome.

Berrywipe,

I can't answer all of your questions, but I'll give a couple of them a shot.


"kldstat" will list drivers that are loaded as modules not built into the kernel.

Yes, you can add a module as a tunable from the GUI (persistent), or "mount -uw /" and edit /boot/loader.conf (non-persistent, you'll lose it after an upgrade).

Are you sure "if_rum" is the driver you need?

Are you running x86 or x64?

Which version of FreeNAS are you using? 8.0x??? .01, .02, .03, .04??
 

berrywipe

Dabbler
Joined
Mar 11, 2012
Messages
19
Berrywipe,

I can't answer all of your questions, but I'll give a couple of them a shot.

Thank you man, I do appreciate.

"kldstat" will list drivers that are loaded as modules not built into the kernel.

Yes, you can add a module as a tunable from the GUI (persistent), or "mount -uw /" and edit /boot/loader.conf (non-persistent, you'll lose it after an upgrade).

by adding the tunable I see if_rum_load="YES" was added under boot/loader.conf.local

anyway I have no idea which kernel module is related to this driver.
Here is the output of kldstat:
Code:
[root@freenas] /boot/kernel# kldstat
Id Refs Address            Size     Name
 1   22 0xffffffff80100000 ce5960   kernel
 2    1 0xffffffff80de6000 7228     geom_gate.ko
 3    1 0xffffffff80dee000 20d20    geom_mirror.ko
 4    1 0xffffffff80e0f000 22618    geom_raid3.ko
 5    1 0xffffffff80e32000 8e80     geom_stripe.ko
 6    1 0xffffffff80e3b000 15e38    fuse.ko
 7    1 0xffffffff80e51000 4e98     geom_multipath.ko
 8    1 0xffffffff81022000 1047aa   zfs.ko
 9    1 0xffffffff81127000 19d8     opensolaris.ko


if I get it right I could also use the command "kldload" to dynamically load modules placed under boot/kernel/
but as I said, I have no idea which module is related to which driver.

Are you sure "if_rum" is the driver you need?

sure, I bought the D-Link DWA-111 usb dongle after seeing it's under the list of adapters explicitly supported by that driver.

Are you running x86 or x64?

Which version of FreeNAS are you using? 8.0x??? .01, .02, .03, .04??

Running FreeNAS 8.2.0-BETA2 x64 but also tried FreeNAS 8.0.4 x86 (wasn't able to boot x64)

The mb is an Asus A8N-SLI deluxe (nForce4 SLI chipset) with a 2GHz Opteron CPU on it.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
I just checked and if_rum is commented out of the modules to include in the kernel with FreeNAS. *MAYBE*, if I get I chance, big IF, very busy, I can try to build it for you and send you a PM. There's no guarantee it will work, it probably would, but....

Funny you should mention your A8N-SLI, I have one of those also. I use it for my MythTV system, it's served me well.
 

berrywipe

Dabbler
Joined
Mar 11, 2012
Messages
19
I just checked and if_rum is commented out of the modules to include in the kernel with FreeNAS. *MAYBE*, if I get I chance, big IF, very busy, I can try to build it for you and send you a PM. There's no guarantee it will work, it probably would, but....
Superhero! :D

modules included in the kernel are added to /boot/kernel or automatically loaded without being put in that folder?

let me see if I got the picture...

putting in loader.conf this line:
Code:
if_rum_load="YES"

tells the system to perform something like this:
Code:
kldload /boot/kernel/if_rum.ko

at boot time... right?

in /boot/kernel I can see those modules which can be dynamically loaded, but how can I see the modules/drivers which are loaded without being listed in that folder?

Funny you should mention your A8N-SLI, I have one of those also. I use it for my MythTV system, it's served me well.

Yeah glorious piece of hardware :) hope it will serve well also for my NAS... with zfs it's not lightning fast, still it's enough for home usage (faster than a WD MyBook after all....)
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
let me see if I got the picture...

putting in loader.conf this line:
Code:
if_rum_load="YES"

tells the system to perform something like this:
Code:
kldload /boot/kernel/if_rum.ko

at boot time... right?

Yes, correct.


in /boot/kernel I can see those modules which can be dynamically loaded, but how can I see the modules/drivers which are loaded without being listed in that folder?

That's a good question and I don't know the answer. Other than looking at the config file for building the kernel I'm not sure.
 

berrywipe

Dabbler
Joined
Mar 11, 2012
Messages
19
I'm afraid I haven't the knowledge to check it that way.
Anyway thanks, enough questions for now!
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Ok, the "Elf" added an extra hour to my day during the night and I used it to compile these WiFi modules for X64/amd64 built from FreeNAS 8.0.4 sources ;) You can just copy them to /boot/kernel (after doing mount -uw /) and do a kldload like you posted above. If that works, then you should add the if_rum_load="YES" or substitute other module name for "rum" in the Loaders section in the GUI.

rum # Ralink Technology RT2501USB wireless NICs
uath # Atheros AR5523 wireless NICs
ural # Ralink Technology RT2500USB wireless NICs
zyd # ZyDAS zb1211/zb1211b wireless NICs

The modules for these for drivers are zipped up into one file. Let me know if it works!

https://www.rapidshare.com/files/416619845/WiFi_Modules-FN804-x64.zip


EDIT: This command might be helpful too: "usbdevs -v"
 

berrywipe

Dabbler
Joined
Mar 11, 2012
Messages
19
Wow dude, karma-boost on you :D

But...

I tryed these files on version 8.2.0-BETA2 (x64) (the one I was using) and it didn't work.
Then, since 8.0.4 x64 didn't boot when I tried it, I reburned the iso file and this time I managed to install it properly.
Then I copied the files in /boot/kernel/ and tried kldload on them, but I received this message on the ssh shell:
Code:
kldload: can't load if_rum.ko: Exec format error


and on the consolle:
Code:
Mar 19 10:47:51 freenas kernel: KLD if_rum.ko: depends on wlan - not available or version mismatch
Mar 19 10:47:51 freenas kernel: linker_load_file: Unsupported file type


when I add a string in loader.conf and watch boot log I can see it tries to load if_rum.ko but then:
Code:
loading required module 'wlan'


kldstat output is confirming no if_rum module was loaded.

same messages for all other drivers.

I can't see any 'wlan' module under boot/kernel, but I don't think it would have been removed if it was necessary for all that stuff....
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Hi Berrywipe,

Sorry I missed that you were using 8.2 Beta. I don't have the sources for that version, no more room for VM's or source right now!

Anyway, I build the wlan module and added it to the zip file and updated the link in my post above. See if that works any better!

Cheers

-- Proto
 

berrywipe

Dabbler
Joined
Mar 11, 2012
Messages
19
swwweeeeeeeet :)

I think we have a new friend in the list:

Code:
[root@freenas] /boot/kernel# ifconfig
sk0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=80009<RXCSUM,VLAN_MTU,LINKSTATE>
        ether 00:11:d8:86:48:c3
        inet 192.168.0.2 netmask 0xffffff00 broadcast 192.168.0.255
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
nfe0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=8210b<RXCSUM,TXCSUM,VLAN_MTU,TSO4,WOL_MAGIC,LINKSTATE>
        ether 00:11:d8:86:17:84
        media: Ethernet autoselect (none)
        status: no carrier
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=3<RXCSUM,TXCSUM>
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet6 ::1 prefixlen 128
        inet 127.0.0.1 netmask 0xff000000
        nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
rum0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
        ether 00:1c:f0:ba:84:85
        media: IEEE 802.11 Wireless Ethernet autoselect <adhoc> (autoselect <adhoc>)
        status: no carrier


Grats man, I didn't think it would 'really' work :D
Now I have to jump to next step and config it... I guess ifconfig is my best friend right now.
Gotta dig into it.
I'll let you know if it works. For the moment:
thank you very very much!

PS:
A consideration jumped to my mind after these happenings:
Space requirements for those modules are: <500KB for the wlan module and ~50KB for each driver...
is it a good choice to spare <0.1% of installation space by removing network adapters' drivers? In a NAS??
 

berrywipe

Dabbler
Joined
Mar 11, 2012
Messages
19
ok, don't know why my previous post got lost, anyway:

it did work!

I can see this new dev:
Code:
rum0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
        ether 00:1c:f0:ba:84:85
        media: IEEE 802.11 Wireless Ethernet autoselect mode 11b <adhoc>
        status: running


This is great, thank you a lot! :)

Then I tried connecting to my wireless router, but it seems wpa-psk handling functions have been stripped away.
It doesn't seem to be available anything usefull to handle wpa protocol.
wpa_supplicant module first of all
but also:
wlan_wep
wlan_tkip
wlan_ccmp

is there any way to handle wpa-psk protocol under freenas?

EDIT:
I opened encryption on the router and managed to transfer the first file over wifi :D
Many features must still be set up for the connection to be actually usable, but it kinda work. Huge step forward!
here is the balance:
CIFS sharing --> working, though with small bandwidth (more like .11b than .11g)
SSH shell --> working
webgui --> not working
wpa-psk --> not working

not bad :)
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Grats man, I didn't think it would 'really' work :D
Now I have to jump to next step and config it... I guess ifconfig is my best friend right now.
Gotta dig into it.
I'll let you know if it works. For the moment:
thank you very very much!

PS:
A consideration jumped to my mind after these happenings:
Space requirements for those modules are: <500KB for the wlan module and ~50KB for each driver...
is it a good choice to spare <0.1% of installation space by removing network adapters' drivers? In a NAS??

I think one of the reasons wifi wasn't included was that transfer speeds are so rediculously slow for wifi that the space tradeoff wasn't worth it, of course that isn't including the encryption modules. Since I've already come this far I'll look into building those also, though I'm getting deep into working on Plugins.... ;)

Also, your other post was automatically flagged as possible spam because it was posted 4 times in a row. This isn't your fault, it's happend to me several times, a good couple of pages of the same post. It's some forum bug that pops up at random times. Anyway, I approved the first one and deleted the others.

I'll post back later when I get a chance to build those other modules and will update the original link above again.

You're welcome!

Cheers


EDIT: Link Updated with additional modules
 

berrywipe

Dabbler
Joined
Mar 11, 2012
Messages
19
hey wtf :D (thanks)
maybe I shall take some time to learn how to compile from source but it's gonna be very painfull....

By the way, I was just thinking about that wlan_amrr module you included. I think it was quite important... a lot of stuff went wrong because it was missing:
Code:
freenas kernel: ieee80211_load_module: load the wlan_amrr module by hand for now.


Yeah speed is ridiculously slow. Not even 11b... it's 1Mbit (!! like my internet upload speed!).
Something is wrong with the 'media' property of my wlan device, but changing it through ifconfig doesn't seem to work.
I'll try with the new modules you included.
Also, I could try installing freebsd and seeing if I can get better speeds (~20-30 Mbit would be enough...)
Ok, trying those modules now.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Also, I could try installing freebsd and seeing if I can get better speeds (~20-30 Mbit would be enough...)
Ok, trying those modules now.

If the modules work, I doubt using them from FreeBSD will make them any faster. WiFi just sucks and I'm sure that's why they didn't include them for this type of application.

Anyway, it's nice to have the option for some people.

If you put yourself together a virtual FreeBSD test system, you can learn to build modules, it's not that hard. It's building the complete package that can be tricky and very time consuming.

Anyway, it's nice to know the modules worked for you and it wasn't a complete waste of time. :)
 

berrywipe

Dabbler
Joined
Mar 11, 2012
Messages
19
No sir, no waste of time. It helped a lot.

So, the wep module is working and I can at least use wep encryption (which wasn't working before).
Didn't try wpa, but it's not vital right now (I think it will work now and if it didn't I could even live with wep).
wlan_amrr warnings have gone.
WebGUI remains unavailable from wifi, but it's not so important, since it's ok using it from ethernet.

Speed is just lol (~500 Kbit/sec.)

Anyway something isn't working properly (genius)

Code:
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 00:1c:f0:ba:84:85
        inet 192.168.1.101 netmask 0xffffff00 broadcast 192.168.1.255
        media: IEEE 802.11 Wireless Ethernet DS/1Mbps mode 11g
        status: associated
        ssid TP-LINK_DACB92 channel 1 (2412 MHz 11g) bssid d8:5d:4c:da:cb:92



that 'DS/1Mbps mode 11g' is not ok.
I got the list of supported media types and modes by:
ifconfig -m wlan0
and used:
Code:
 ifconfig wlan0 media OFDM/54Mbps mode 11g

but it just doesn't change what it should.
Using the same commands directly on rum0 interface produces no effect.

It could even be a problem concerning the rum driver...
I'm sleepy right now. Will further investigate on it tomorrow.
 

berrywipe

Dabbler
Joined
Mar 11, 2012
Messages
19
Yesterday night another post got blocked but no problem.

Today I did more tests.
This time I used a live distro of FreeBSD 8.2.
I could even get the d-link dwl-g520 pci adapter to work (which wasn't previously working)
I set an ftp server on my main pc and...
got 4-5 Mbit/sec on both adapters!
Huge improvement (factor 10) lol. Crazy, I know.
No, ok seriously, it still hugely sucks and since speeds were about the same on both adapters and this was plain freebsd, I don't think it can get any better.

At least I learned a few things about unix. My i-f-c-o-n-f-g keys are broken lol.

Thanks for your help man, that was super.
 

MotorSport

Dabbler
Joined
Sep 10, 2012
Messages
18
Hello,

I want add my wireless driver to Freenas 8.3. (amd64)
I have check the version of my Freenas ( base to Freebsd 8.3 release P5)
I have install a fresh Freebsd 8.3 amd64 and extract the if_run.ko and copy to my NAS in /boot/kernel/ replace the permission in 555
And load the module with kldload if_run.ko
but I have this error.
"kldload: can't load if_run.ko: Exec format error"
Why
Thanks for your help because I"m noob in BSD.
 
Status
Not open for further replies.
Top