# PROBLEMS Setting up Wireless with DWLg510 wireless card and driver MRV8K51



## emiliec15 (Mar 12, 2010)

I've seen online where people have gotten this wireless card to work under previous releases of FreeBSD.  I just somehow even after following three or four online tutorials and howtos have yet to succeed.  I kinda know how to use ndisulator (project evil).

Coming from linux I know that they are two completely different programs and even with linux it varied on the mileage and ease with this card on how easy it is to setup.
Lets call my AP (router) Internet and it does not have a password set.  Under linux it worked as DHCP.

I have scoured the forum here and followed a few threads and tried to get it setup functionally but alas no success.  If I have missed one or you think I should try one again please let me know.  I will admit now I do not recall the address to any of them.


----------



## richardpl (Mar 12, 2010)

If you tell us what you did maybe we could help you.


----------



## emiliec15 (Mar 12, 2010)

Ok I will try to recall everything I did NO promises.

I used ndisgen to generate a kernel module.
Loaded that with ndis and if_ndis
One time I tried to configure that as  wireless device, another I used command something like:
[CMD=]"ndis0 creae wlandev wlan0"[/CMD]
then tried to get wlan0 working.
I've tried to use a file called wpa_supplicant.conf
Tried editing some stuff into rc.conf and loader.conf
Once I ran sysinstall after I'd gotten ndis0 and wlan0 registering and somehow ended up with  working wireless network until I logged out.

I'm sorry that I can't recall all of the steps and that I'm having such a hard time finding those guies I followed.  Thanks for the help.


----------



## emiliec15 (Mar 13, 2010)

Just ran [CMD=]dmesg[/CMD]

And it recognizes that ndis0 exists but [CMD=]ifconfig[/CMD] does not.


----------



## richardpl (Mar 13, 2010)

Show output of `# kldstat`
Show output of `# dmesg |grep ndis`


----------



## emiliec15 (Mar 13, 2010)

Here you go:
[CMD=]kldstat[/CMD]

```
Id Refs Address    Size     Name
 1   21 0xc0400000 b6dfe0   kernel
 2    2 0xc0f6e000 f75c     if_ndis.ko
 3    3 0xc0f7e000 1e040    ndis.ko
 4    1 0xc0f9d000 425a4    MRV8K51_sys.ko
 5    1 0xc4bef000 4000     logo_saver.ko
```

[CMD=]dmesg |grep ndis[/CMD]

```
ndis0: <D-Link AirPlus G DWL-G510 Wireless PCI Card> mem 0xea000000-0xea00ffff,0xea010000-0xea01ffff irq 19 at device 7.0 on pci2
ndis0: [ITHREAD]
ndis0: NDIS API version: 5.0
ndis0: init handler failed
device_attach: ndis0 attach returned 6
```


----------



## richardpl (Mar 14, 2010)

For some reason miniport driver failed to initialize device.
There are several reasons this could happen. Try some other drivers.


----------



## emiliec15 (Mar 14, 2010)

Are you saying to try a different driver like going from the Win2K driver to the WinXP driver that's on the cd for the wireless card.  OR to find some other driver that works for this card?

If it's the second I have no idea what driver exists that would work for it on FreeBSD I couldn't find any alternative drivers for linux... if that's what I need to do can someone point me in the right direction?


----------



## richardpl (Mar 14, 2010)

If did not already, check XP driver first.

There should always be multiple driver versions on the net.

You said that it somehow worked before ... so maybe it is because you are using windows on same machine and on windows you use some utility from vendor.


----------



## emiliec15 (Mar 14, 2010)

I meant that I've used this wireless card on linux (many different distros) (I know FreeBSD and Linux are not the same thing).  I was capable of getting that working with the normal windows drivers.  But I will try using the other drivers for the other versions of Windows.

Wish me luck and thanks for everything so far!


----------



## emiliec15 (Mar 21, 2010)

Ok, I've tried all the drivers on the disk and I keep getting this as the dmesg info about the driver/wireless card.  Any ideas/solutions would be helpful.

```
ndis0: [ITHREAD]                                                                               
ndis0: NDIS API version: 5.0                                                                   
ndis0: init handler failed                                                                     
device_attach: ndis0 attach returned 6                                                         
no match for _except_handler3                                                                  
no match for ObfReferenceObject                                                                
no match for MmProbeAndLockPages                                                               
no match for MmUnlockPages
```
P.S. to anyone trying to follow this thread I apologize for taking so long to get around to it.  Life outside of computers called.


----------



## richardpl (Mar 21, 2010)

Maybe I could add missing symbols to NDISulator:
Check http://gitorious.org/NDISulator frequently.

On Linux you used native drivers or ndiswrapper?


----------



## emiliec15 (Mar 21, 2010)

I used ndiswrapper.  With the drivers for XP for some distros and the drivers for 2000 on others.   I will check the git repo now.  Thanks for the link.

How do I use it/install it.... I've been using the ndisulator that came with the dvd download of freebsd 8.0.


----------



## richardpl (Mar 21, 2010)

Downlad tarball from site, or clone repo via git.

Than use mount_nullfs(8) to mount src/sys/compat/ndis and src/sys/dev/if_ndis under /sys

Then you only need to go to /sys/modules/ndis and  /sys/modules/if_ndis and type `# make install clean`


----------



## emiliec15 (Mar 25, 2010)

Ok....I must be doing something stupid here: I tried the commands you said using an untarballed tarball and I get:

```
# mount_nullfs src/sys/compat/ndis /sys
# mount_nullfs src/sys/dev/if_ndis /sys
# cd /sys/modules/ndis
/sys/modules/ndis: No such file or directory.
```


----------



## richardpl (Mar 25, 2010)

Yow do not know how to use mount_nullfs(8) (read manual pages first)

correct command is:

`# mount_nullfs src/sys/compat/ndis /sys/compat/ndis`
`# mount_nullfs src/sys/dev/if_ndis /sys/dev/if_ndis`


----------



## richardpl (Mar 25, 2010)

emiliec15 said:
			
		

> /sys/modules/ndis: No such file or directory.




You must have source installed, under /usr/src and /sys must point to usr/src/sys.


----------



## emiliec15 (Apr 3, 2010)

ok...I've tried reading everywhere and I can't seem to either understand it OR find the right resource.

Once ndis0 shows up in ifconfig correctly how do I get it to connect to a network?

I know someone knows the answer and I know it's probably somewhere on this site too but I can't find it.
Do I use wlandev and if so exactly how?  Feel like a newb to everything...


----------



## richardpl (Apr 3, 2010)

Use the handbook/google luke.


----------

