Jump to content

I have wlan0 (USB WiFi)... Now what? [solved]


theYinYeti
 Share

Recommended Posts

As the title says, it seems I managed to install my D-Link Airplus DWL-G122..B1 USB2 WiFi adaptor (:o)

 

I installed latest Mandriva (Cooker) kernel and ndiswrapper. Then I downloaded latest XP driver for this device from D-Link site. I did this:

# ndiswrapper -i ./NetRTUSB.inf
# modprobe ndiswrapper
(...seemed locked somehow... so I unplugged the thing... and plugged it again...)
# modprobe ndiswrapper (worked this time!)
# iwlist wlan0 scan
# iwconfig wlan0 mode Managed  (I have a WiFi-enabledADSL modem-router as AP)
# iwconfig wlan0 essid <the BSSID of the modem>

according to this excellent URL:

http://www.wlanfr.net/forum.php?op=mess&pid=3838

 

So now, as advised, I tried to do dhclient wlan0 but to no avail...

# dhclient wlan0
Internet Systems Consortium DHCP Client V3.0.2
Copyright 2004 Internet Systems Consortium.
All rights reserved.
For info, please visit [url]http://www.isc.org/products/DHCP[/url]

sit0: unknown hardware address type 776
eth1: unknown hardware address type 24
/sbin/dhclient-script: configuration for wlan0 not found.
sit0: unknown hardware address type 776
eth1: unknown hardware address type 24
Listening on LPF/wlan0/00:11:95:bf:XX:XX
Sending on   LPF/wlan0/00:11:95:bf:XX:XX
Sending on   Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 14
...

 

So you see, it seems that wlan0 can be used and is configured as it should (LNK led is lighted, but ACT led is off), but now I don't know what to do to get an IP from the modem (or even a static address: I don't absolutely need a dynamic one).

 

Yves.

Link to comment
Share on other sites

Hello,

It seems I've got a little further with ndiswrapper :)

 

Seeing the "/sbin/dhclient-script: configuration for wlan0 not found." message from dhclient, and following Aomighty's hint, I decided to let Mandriva do as much as it could. So I started from the beginning:

# ndiswrapper -e netrtusb  (start anew)
(... At this point, the WiFi device is not plugged...)
# ndiswrapper -i ./NetRTUSB.inf
# modprobe ndiswrapper     (no error)
(... Now, I plug the WiFi device...)
(... I wait a little, until iwconfig reports wlan0...)
# drakconf &

There I choose "Configure new network connexion" in the Control Center. I choose DHCP for the IP, I set the mode (managed), the ESSID, and no key (key disabled on the WiFi modem); any other needed info, I set to "auto".

 

I reboot the computer after unplugging the WiFi device. Then I do:

# modprobe ndiswrapper

I unplug the RJ45 plug, and soon "route" gives an empty routing table. Then I plug the WiFi device, I wait a minute or so, and then :banana: !! "route" gives a new routing table (same as the old one actually) with wlan0 appearing instead of eth0 :) And from another computer that is connected on the modem, I can see (on the modem web page) that there is one DHCP lease for "salon/192.168.1.3" (eth0) and one DHCP lease for "salon.local/192.168.1.10" (wlan0) :) And I can see my WiFi device registered in the "Wireless status" web page of the modem :).

 

Yet when I ping anything other than 192.168.1.10 on my WiFi-enabled computer, I only get hundreds of failures :( ... even for the gateway (192.168.1.1) itself!

And on the modem's web page for wireless status, the line for my WiFi device is checked under the column header "Attached", but not checked under the column "Authorized", even thougt I think that I've disabled all kinds of securities.

 

On the modem, "Hide Access Point" is unchecked, the "BSSID" is the one I used as "ESSID", the mode is "Access Point", the key is disabled, most configuration items are set to auto.

Next, I even tried to force both devices to 802.11b @9Mb/s, and force the chanel to 5 on both sides... no change :(

 

So what is wrong with my WiFi configuration?

 

Yves.

 

Edit: I just found this page where they say that my WiFi may actually be Ralink-based, in which case I may hope to find a native driver eventually.

And on this page, they say to execute "ndiswrapper -m", which I did not do (and other tutorials don't mention this...), so I may try.

Link to comment
Share on other sites

Yves,

Do you have a light on the adapter to say when its active.

My PC card one has and I leanred that I can do all the config etc. but that the adaptor isn't actually activated... and a /etc/init.d/network restart does the trick...

 

I applied this to my PCI cards with the same success ...

 

If you know the IP range you can get a static address simply by

ifconfig wlan0 x.x.x.x (where x.x.x.x is the IP add you want)

 

you will not have default routes setup nor dns but you should be able to ping the router...

 

check with

 

route

 

you can then add a address to your /etc/resolv.conf for DNS resolution and add a default route

 

route add default gw wlan0

Link to comment
Share on other sites

Thanks for answering Gowator.

 

Indeed, I forgot to say that lights seem to work well, as they did with my first attempt:

(LNK led is lighted, but ACT led is off)

However, I do see a fast blink of the ACT light once on both sides (modem and G122) just after wlan0 appears and LNK lights; this is probably the DHCP request, since this corresponds to the moment my device gets listed on the modem's Wireless status web page (FYI, the line disappears if I unplug the G122, and on the PC, ifdown wlan0 gets executed).

 

So it really seems that the driver issue is done with, and that I have a WiFi issue now. However, I'm not too fond of this "ndiswrapper" thing (it feels like running the Windows version of Gimp using Wine :lol:) hence I'll probably try what I found this morning:

GPL driver, based on (enhenced from) the RAlink one:

http://rt2x00.serialmonkey.com/wiki/index.php/FAQ

http://rt2x00.serialmonkey.com/wiki/index....10_rt2570_Howto

or

http://www.ralinktech.com/supp-1.htm

 

Yves.

Link to comment
Share on other sites

There's good news and there's bad news (two pieces of that actually).

 

The good news first: The OpenSource rt2570 driver does work with the D-Link G122 model B1. It even works with WPA-PSK! I did it for real, so I'm really sure :)

 

Now the bad news:

1/ It only works for 5 minutes or so, and then the driver freezes, stopping the connexion, and keeping the computer from cleanly shutting down :(

2/ Next... I'm really stupid sometimes!!! The problems I previously had with ping or dhcp failing were related to the firewall, that was letting some packets go only for eth0...

 

Conclusion: I'll have to try again with ndiswrapper and the now properly configured firewall.

 

Thanks anyway to those who took some time to ponder on my issue.

I'll report back as I progress.

 

Yves.

Link to comment
Share on other sites

:angry: The ndiswrapper driver really does not work...

 

Well, I'll come back to rt2570, which worked actually quite good. But this time:

- I'll take latest CVS, and

- I'll probably have to disable USB2 (as the WiKi suggests), with the unfortunate consequence of reverting to 802.11b and limiting all USB bandwidth...

 

I'll report as usual.

 

Yves.

Link to comment
Share on other sites

UPDATE!!! ndiswrapper does work, and damn well and stable it seems (and with USB2).

 

However, to achieve this result, I had to uncheck the little box titled "Hide Access Point" on my modem's web page. This is not really an issue, since better protections exist, namely MAC filters and WPA.

 

To conclude, here's a brief description of the config:

- wlan0 configured with ndiswrapper as usual (see also above posts).

- with MCC, wlan0 and eth0 both configured for DHCP, both for the same hostname/network/gateway, and both activated on boot and hot-startable.

 

So whichever connexion comes first establishes the internet connexion automatically :)

SOLVED.

 

Yves.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...