LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (https://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   Ndiswrapper Help with D-link DWL-G510 (https://www.linuxquestions.org/questions/linux-wireless-networking-41/ndiswrapper-help-with-d-link-dwl-g510-214888/)

leftnutrzr 11-11-2004 09:25 AM

Quote:

Originally posted by Poetics
Not to beat a dead horse, but I've finally gotten ahold of my old CD (and the mrv8k51.inf driver), but ndiswrapper doesn't seem to like it.

Code:

# ndiswrapper -i /etc/ndiswrapper/mrv8k51.inf
Installing mrv8k51
Parse error in inf. Unable to find section W8100PCI.zerocfg
Parse error in inf. Unable to find section W8100PCI.zerocfg
Parse error in inf. Unable to find section W8100PCI.zerocfg
#

After poking around inside the inf file, I find that the W8100PCI is referenced inside the "Win XP DDInstall section" of the file, including AddReg and CopyFiles sections. After running ndiswrapper as above, the mrv8k51 directory is still created, within which are several .conf files and the executable mrv8k51.inf

Trying ndiswrapper -l gives me "Installed ndis drivers: mrv8k51 hardware present" and my ailiased (via ndiswrapper -m) wlan0 isn't recognized.

Thoughts?

those errors are perfectly normal from what i've seen
the .zerocfg is for the winxp zeroconf service

the -m makes ndiswrapper a kernel module
try
$ modprobe ndiswrapper
as root and it should be recognised

although after a while you might have to set the essid via iwconfig but it seems to be a bug in the drivers themselves as after about a week connected my card takes a dump in windows and has to be disabled and re-enabled
linux fix
iwconfig wlan0 essid $yourap$
dhcpcd wlan0

LOL things are so much easier with the :Pengy:

Poetics 11-11-2004 02:04 PM

Sorry for being so new at this, but "iwconfig" (after the modprobe) just gives me "no wireless extensions" for both loopback and eth0. Duh there shouldn't be any for loopback, but shouldn't eth0 be recognized?

After typing "iwconfig wlan0 essid <ssid>" it spits out:
Code:

Error for wireless request "Set ESID" (8B1A) :
    SET failed on device wlan0 ; No such device.

I'm wondering how to get from "eth0" as my network device to "wlan0" -- I can't seem to find that in any guide around

:newbie: :scratch:

leftnutrzr 11-11-2004 06:40 PM

i'd check to see if modules.conf has the ndiswrapper info in it ...
if it does then try uninstalling the xp drivers from ndiswrapper and try the win2k ones
or edit the inf to exclude the .zeroconf entries

i really wish hardware vendors would open their eyes and come here .... they might be more apt to write linux drivers

it may be a hassle to set up but once it is ... you dont have to worry anymore

Poetics 11-12-2004 02:46 AM

The problem is that there are no XP/2k/ME/98-specific drivers; they've all come packaged in one bundle, which is the only release I've been able to find.

As I said, I can't figure out what to do between "modprobe ndiswrapper" and anything dealing with the "wlan0"-designated interface; it's just not coming together. I'll check the config file in the morning and see what I can come up with.

Thanks for the continued help guys, slowly but surely we'll get this done!

Hangdog42 11-12-2004 06:32 AM

I know you've run ndiswrapper -m, but did it actually modify your /etc/modprobes.conf with the alias wlan0 ndiswrapper line? I've seen a few cases where it hasn't for some reason and that could explain why you're not seeing wlan0.

leftnutrzr 11-12-2004 01:43 PM

when you unzip the official dlink downloaded drivers there's 4 folders in there .. xp. 2k, me, 98
/manual/Win2K
/manual/WinME
/manual/XP
/manual/98

thanks handog for correcting me ... i had a brainfart and couldnt remember if it was modules or modprobes.conf

dont dispair poetics .. it does work :)

Poetics 11-12-2004 08:00 PM

ppppthp, brain fart -- I didn't even check the /manual/ directories. I saw the alias go through the first time; I'll check the config when I get home tonight.

Thanks! And don't worry, I'm stubborn enough to get it working; I did choose Slack, didn't I? :D

leftnutrzr 11-13-2004 12:48 AM

Quote:

Originally posted by Poetics

Thanks! And don't worry, I'm stubborn enough to get it working; I did choose Slack, didn't I? :D [/B]
LOL so am i sometimes
mandrake wouldnt compile the things i wanted so ... here i am plodding w/ slack and loving it all

Poetics 11-13-2004 03:38 AM

Hey! The WinME drivers did the trick, just as was said! Now iwconfig responds with devices for lo, eth0, and wlan0. Now I just have to setup my Essid, Wep, et cetera! It turns out that the modprobe edited modules.conf but not modprobe.conf, so I made them the same (just one line each about the alias)

Edit:
So now, when I boot my computer, I run "modprobe ndiswrapper" (I could throw that into rc.local I suppose) to get iwconfig to recognize wlan0. However, how do I get connected to my AP? My AP's SSID is "Lshoan Harah" and it has WEP enabled, but I'm not able to turn on security.

When I first boot up, wlan0's output says ...
Code:

IEEE 802.11b  ESSID:"Lshoan Harah"
Mode:Managed  Frequency:2.447GHz  Access Point: <MAC ADDY>
Bit Rate:54Mb/s  Sensitivity=-200 dBm
RTS thr:2346 B  Fragment thr:2346 B
Encryption key:off
Power Management:off
Link Quality:100/100  Signal level:-81 dBm  Noise level:-256 dBm
Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
Tx excessive retries:0  Invalid misc:61  Missed beacon:0

Seems fine, other than the fact I have an 802.11g card, but hey, if it works it works. So then I try typing in "iwconfig wlan0 key s:<ASCII KEY>" and the results change. The ESSID changes to "off/any" (even if I re-specify), the Access Point MAC resets to 00's, and Encryption is still off. Tx excessive retries clicks up to 1 and the Invalid misc goes up as well.

What am I missing?

Hangdog42 11-13-2004 08:52 AM

I don't know that you're missing anything. For reasons I've never understood, ndiswrapper can be a real pain to get working with WEP. Getting the WEP key to take can be really difficult. If it is any help at all, here is a script I used to use for configuring my card (I actually called it from /etc/rc.d/rc.inet1):

Code:

#!/bin/sh
  #
  # rc.wlan0
  #
  ESSID="MyDomain"
  INTERFACE="wlan0"
  KEY="WEP KEY"
  MODE="Managed"
  NETMASK="255.255.255.0"

  #Load the module
  echo "Loading NDISWRAPPER"
  /sbin/modprobe ndiswrapper

  # Set up the WiFi card

  echo "Configuring ${INTERFACE}:"
  /sbin/iwconfig ${INTERFACE} essid ${ESSID}
  /sbin/iwconfig ${INTERFACE} mode ${MODE}
  /sbin/iwconfig ${INTERFACE} key ${KEY}

  # Get IP address from dhcp

  /sbin/dhcpcd -t 10 -d wlan0

  # Bring up interface - I'm not sure if this is necessary,
  # but it doesn't hurt

  ifconfig wlan0 up

Quote:

iwconfig wlan0 key s:<ASCII KEY>
I don't know if this makes any difference, but I don't use the ASCII version of the key, I use the hex version. The other bit of ndiswrapper lore that may apply is switching your mode to Auto instead of Managed. That was a trick that worked for some cards with older versions of ndiswrapper.

Poetics 11-13-2004 12:39 PM

I had seen that script posted elsewhere but didn't know where to put it, especially with my WEP key printed in plain view :newbie: :)

I'll try with the Hex key and see what's going on. I really just want this to work. As I said, though, thanks so much for your guys' help on this.

Poetics 11-13-2004 01:19 PM

I had to edit the script (it was running ESSID= and the rest as commands), but the settings just aren't sticking. I'm getting the same results attempting with the full wep key as before. However, upon boot, it doesn't recognize the device wlan0 until I manually modprobe it. Ideas?

Hangdog42 11-13-2004 03:47 PM

Um, if it was trying to run the variables as commands, something is truly funky. As far as I know, that is a plain vanilla bash script. Maybe try changing the /bin/sh to /bin/bash, but I run Slackware as well, and that script never gave me any trouble.

I suppose that you could add a sleep command after the modprobe in the script. sleep 10 would give your system 10 seconds to get the module loaded and settled down before iwconfig tries to do its thing.

Have you looked in your logs to see if any of these commands is tossing out errors? Maybe we're all missing something.

leftnutrzr 11-14-2004 01:30 AM

there is an alternitive to fiddling w/ wep
enable mac filters
if they cant connect and associate then in a wild envrionment they cant discern your encryption key from the remote server

even with air snort it'll be hard to figure out what packet goes where

i've used air snort and iris packet sniffer in the local area and it's just an insane amount of packets flyin to make heads or tails of it
also turning off the ssid broadcast helps too

just my two cents ... smack me if i'm wrong

Poetics 11-14-2004 02:06 AM

No, nothing wrong with that idea, leftnutrzr, but I really want to get WEP enabled because in a work environment I'll be jumping into any day now they have WEP and I'm going to have to show them that Linux handles it just as well / better than MS :D

I was wondering what the "sleep" commands were I had seen in other versions of the script; mayhap that's the key to it all. I'll reboot right now and see.

Edit: So I added in a "Sleep 4" and the script is working fine. However, when I run "iwconfig" to see what changes have been enacted, it was if no commands had been run; no ESSID, encryption still off, no AP mac addy, et cetera. I try to run "iwconfig mode Auto" (for example), but still no changes are sticking. Any idea?

Could part of the problem be signal strength from my AP? My laptop gets solid reception in the same location, but another desktop (with the same make/model card) gets pretty lousy...


All times are GMT -5. The time now is 06:22 PM.