You are not logged in.

#1 2007-01-28 18:48:05

tm8992
Member
Registered: 2007-01-01
Posts: 36

Ndiswrapper, dhcp, internet headaches.

I recently got a nintendo wii (!, woohoo) and it didn't immediately work with my wireless internet.  I read up on it and was told to upgrade & reset my router.  I did it, and now the wii works, and all my Windows computers work with the net perfectly as well.

Nevertheless, after this router upgrade, Arch's internet just won't work.  I use ndiswrapper with the netgear wg121 USB adapter, with the netgear wgr614v4 router.

My network's essid is "mnet", so to load my network, before the upgrade, I would just:

modprobe ndiswrapper
iwconfig wlan0 essid mnet
dhcpcd wlan0

...and that would be the end of it.
Now, however, I can't connect to anything when I do that.  It still detects the network -- i.e., when running iwconfig I can see my network, my router's mac address, etc.  dhcpcd doesn't give me a lot of helpful information as to what the problem is--It just runs and closes.  I've tried numerous variations of it, i.e., dhcpcd -G 192.168.0.1 wlan0, etc., but nothing usually works.  Here's the deal: sometimes it does!  On occasion, after running dhcpcd numerous times and playing with it for 15+ minutes, I can get it to connect to the internet, but there is no way to tell why!  It just "decides" randomly to connect occassionally, and it's not like I issued a different command -- each time it "decides" to connect, it was because I issued a command I must have done at least 10 times before.

dhclient gives a little more info--I found out that I was being set up with 192.168.0.5, every time--whether the net worked or not.  This is kind of signifigant because I actually set up my router to have my mac address always get 192.168.0.5, so it seems dhcp is actually working.

So the question is, why would the internet always work on windows, and rarely work on arch?  What could be the difference with the upgraded router?

Thanks for any ideas...

Offline

#2 2007-01-28 19:46:15

arew264
Member
From: Friendswood, Texas, US
Registered: 2006-07-01
Posts: 394
Website

Re: Ndiswrapper, dhcp, internet headaches.

Well, I am afraid I don't really know much about any issues NDISwrapper might have here, but you can find out if DHCP is the problem or the driver.

Just set up your adapter with a static ip address.
To do that, you just tell it the essid like normal, but instead of starting dhcpcd, run the following commands:
ifconfig wlan0 192.168.0.5 netmask 255.255.255.0 broadcast 192.168.0.255
route add default gw 192.168.0.1

This sets up your router as the default gw and sets your ip address, netmask, etc.

If the network works when you do this, well, it works and you can just use a static ip. If this is still unreliable when you do this though, you have a driver problem somewhere thats screwing things up.

Offline

#3 2007-01-28 21:55:34

tm8992
Member
Registered: 2007-01-01
Posts: 36

Re: Ndiswrapper, dhcp, internet headaches.

No luck sad.  I don't understand what the driver problem would be, because the driver worked perfectly until I upgraded my router.  I downloaded the latest ndis drivers from the netgear site, but those don't make a difference either.

What other drivers do I have to choose from?

Offline

#4 2007-01-29 08:17:26

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Ndiswrapper, dhcp, internet headaches.

ndiswrapper fails off and on like this.  I didn't push 1.33 (I think) because it did this on my card, but there's no real way to test this on all ndiswrapper cards available.  If you have an old ndiswrapper package (in /var/cache/pacman/pkg ) you might want to roll back to that one.

Offline

#5 2007-01-29 10:14:19

pelle.k
Member
From: Åre, Sweden (EU)
Registered: 2006-04-30
Posts: 667

Re: Ndiswrapper, dhcp, internet headaches.

So the question is, why would the internet always work on windows, and rarely work on arch?

You can't possibly think that linux driver technology in general has the same driver coverage as windows! ndiswrapper is a dirty hack, so no wonder it doesn't work as great as a native windows driver. You can't compare grapes to apples.

To be unfair - You _haven't_ given us very much info to go on. What is the output of "iwconfig" when you have a connection? What is the output of "iwlist wlan0 scan"? last 20 lines from "dmesg"?

Also, i would suggest "ifconfig wlan0 up" before any actions on it.
as phrakture said, try to roll back driver version. open up /etc/pacman.d/extra and copy one of those adresses in to firefox, and look for an old ndiswrapper pkg. download it and "pacman -U packagename.pkg.tar.gz " it.


"Your beliefs can be like fences that surround you.
You must first see them or you will not even realize that you are not free, simply because you will not see beyond the fences.
They will represent the boundaries of your experience."

SETH / Jane Roberts

Offline

#6 2007-01-29 17:37:23

tm8992
Member
Registered: 2007-01-01
Posts: 36

Re: Ndiswrapper, dhcp, internet headaches.

Okay then.  I just tried multiple ndiswrapper versions -- 1.35, 1.34 (what I've been using forever), 1.33, 1.32, 1.28, and 1.8.  None of them worked.  (BTW, I've been compiling ndiswrapper from source forever, and not using the pacman versions.  I did this before the network stopped working, too, so I didn't think this could possibly be a problem?)

I didn't expect ndiswrapper to work as good as native windows drivers!  I just found it weird that the driver would suddenly stop working in linux, and keep working in windows/wii.

I tried "ifconfig wlan0 up" and just about a billion other commands.

Now, I tried a bunch of really interesting tests:  First, I connected to a neighbor's network.  And it worked.  Second, I installed ubuntu and ndiswrapper 1.8 on that.  And it worked.  Why would it work with ubuntu consistently, and not with arch?  That seemed odd.

And now, the logs:
iwconfig - broken, working.  (I didn't add in the lo, eth0, sit0 on the second one; they weren't being picked up by iwconfig > file, so I added them in on the first one, but they were showing up when I ran the command).
iwlist wlan0 scan - broken, working.
dmesg - broken, working (I actually unmodprobe'd ndiswrapper and remodprobed it right before it started working.  It's weird tricks like that that get it to work, but it's not consistent, like I said).
ping google.com - broken (just in case it might help; I doubt it will, but that pops up after about 30 seconds when the internet's not working).

Notice how the broken/working contents for almost everything is pretty much the same.  That's why I figured it would be useless to post it! tongue

Any ideas now, especially about how it would work on ubuntu and not arch (which is a little more fair then comparing arch to windows, I guess)?

Thanks again!

Last edited by tm8992 (2007-01-29 17:37:41)

Offline

#7 2007-01-29 18:25:33

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,487

Re: Ndiswrapper, dhcp, internet headaches.

tm8992 wrote:

My network's essid is "mnet", so to load my network, before the upgrade, I would just:

modprobe ndiswrapper
iwconfig wlan0 essid mnet
dhcpcd wlan0

Afaik there still is a bug parsing the essid. The last letter is cut off. Maybe it will work when you try something like

iwconfig wlan0 essid mnet+

Just add one letter to your essid-name and give it a try.
And yes, this is no solution for your problem - I was just wondering why I have to add one additional letter, and you don't?

Last edited by Moo-Crumpus (2007-01-29 18:28:56)


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#8 2007-01-29 19:05:06

tm8992
Member
Registered: 2007-01-01
Posts: 36

Re: Ndiswrapper, dhcp, internet headaches.

That's interesting tongue.  Well, no, there's no difference anyway, I tried it.  That's really weird, I've never heard that...it doesn't even detect my essid (i.e., it changed to "essid off/any" in iwconfig) when I try that.

Maybe you have a really old version? tongue

Offline

#9 2007-01-29 21:48:37

pelle.k
Member
From: Åre, Sweden (EU)
Registered: 2006-04-30
Posts: 667

Re: Ndiswrapper, dhcp, internet headaches.

well, your AP (router) is associated in all logfiles, so you are connected in some way. Are you sure dhcp is the problem?
A reset/upgrade resets all previous settings in the router. Are you sure dhcp is activated in the router?
BTW this is most probably _not_ a problem with ndiswrapper.

What about ifconfig? what does it show before/after an attempt at getting an ip?
Are you using (!gateway) or (gateway) in rc.conf?
what does /etc/resolv.conf say before/after?
What does "route" say before/after?
Can you ping your router? Even if google doesn't work doesn't mean your connection to the router doensn't.


"Your beliefs can be like fences that surround you.
You must first see them or you will not even realize that you are not free, simply because you will not see beyond the fences.
They will represent the boundaries of your experience."

SETH / Jane Roberts

Offline

#10 2007-01-29 23:17:49

tm8992
Member
Registered: 2007-01-01
Posts: 36

Re: Ndiswrapper, dhcp, internet headaches.

I'm not 100% sure dhcp is the problem, but it seems that's most likely because I have to play with dhcpcd/dhclient to get the net to work.  I am 100% sure dhcp is activated in the router.

ifconfig: before, after
I have !gateway in rc.conf.
resolv.conf: before & after (they were both the same).
route: before, after
ping: router (so I guess I can't ping my router?  I can when I'm connected.)

Last edited by tm8992 (2007-01-29 23:59:57)

Offline

#11 2007-01-30 00:07:05

pelle.k
Member
From: Åre, Sweden (EU)
Registered: 2006-04-30
Posts: 667

Re: Ndiswrapper, dhcp, internet headaches.

Well, this is a tricky one. It seems your best bet would be to configure network manually. Turn dhcp on after a few updates.
remember to use gateway in rc.conf (your router ip) and set "nameserver 192.168.0.1" (also your router ip) in /etc/resolv.conf


"Your beliefs can be like fences that surround you.
You must first see them or you will not even realize that you are not free, simply because you will not see beyond the fences.
They will represent the boundaries of your experience."

SETH / Jane Roberts

Offline

#12 2007-01-30 19:57:23

tm8992
Member
Registered: 2007-01-01
Posts: 36

Re: Ndiswrapper, dhcp, internet headaches.

Does that mean I use ifconfig...?  What do you mean by "manually"?  Sorry! tongue

And does that mean I change !gateway to gateway?

Offline

#13 2007-01-31 11:29:31

pelle.k
Member
From: Åre, Sweden (EU)
Registered: 2006-04-30
Posts: 667

Re: Ndiswrapper, dhcp, internet headaches.

Maybe you should take a look at the wiki? this is an example of static adress configuration in /etc/rc.conf;

# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
#   - prefix an entry in INTERFACES with a ! to disable it

lo="lo 127.0.0.1"
eth0="dhcp"
wlan0="wlan0 192.168.0.1 netmask 255.255.255.0 broadcast 192.168.0.255"
wlan_wlan0="wlan0 essid youressid channel 6 key restricted s:yourkey"

INTERFACES=(lo eth0 wlan0)
# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
#   - prefix an entry in ROUTES with a ! to disable it

gateway="default gw 192.168.0.1"
ROUTES=(!gateway)

with !gateway, the line above it won't be used. whis is ideal if you wan't dhcp to set default gateway. but since you are trying out configuring network manually (static address), you _should_ use ROUTES=, and therefore remove the "!".


"Your beliefs can be like fences that surround you.
You must first see them or you will not even realize that you are not free, simply because you will not see beyond the fences.
They will represent the boundaries of your experience."

SETH / Jane Roberts

Offline

#14 2007-02-01 15:13:32

F
Member
Registered: 2006-10-09
Posts: 322

Re: Ndiswrapper, dhcp, internet headaches.

tm8992 wrote:

I recently got a nintendo wii (!, woohoo) and it didn't immediately work with my wireless internet.  I read up on it and was told to upgrade & reset my router.  I did it, and now the wii works, and all my Windows computers work with the net perfectly as well.

My network's essid is "mnet", so to load my network, before the upgrade, I would just:

modprobe ndiswrapper
iwconfig wlan0 essid mnet
dhcpcd wlan0

Try feeding more options to iwconfig. ie.

# iwconfig wlan0 essid mnet freq 1.428G chan 11

See if that helps any. You can get the appropriate information (such as frequency and channel) by doing:

# iwlist wlan0 scan

And then finding your appropriate wireless network (in your case just look for essid mnet).

Offline

Board footer

Powered by FluxBB