LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (https://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   Ndiswrapper wpa_supplicant Query (https://www.linuxquestions.org/questions/linux-wireless-networking-41/ndiswrapper-wpa_supplicant-query-496709/)

Kane2002 10-29-2006 04:23 PM

Ndiswrapper wpa_supplicant Query
 
Hi guys,
Well ive accomplished getting my safecom wireless adapter to work with wpa,
i posted before about using driverloader, but now im using ndiswrapper (i think) lol.

what i mean by this is that i copied the driver from my windows partition and installed it
using ndiswrapper (previously i tried the driver from the disk which it says to use on some site but i didnt have much success) and i could actually scan my access point, so i was pretty pleased about that :) and then i decided to try and connect using wpa (it was already installed as im using zenwalk) and this is what i have to do:
i start wpa_supplicant with
wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -Dwext
i dont know what wext is,i tried ndiswrapper first and it said something about not being able to load the driver :S and then i found something that suggested wext is for newer wpa_supplicant?
anybody care to enlighten me?

and then i can ping my router 192.168.1.1 but not google.

so i do
ifconfig wlan0 192.168.1.6 netmask 255.255.255.0 up

and still can only ping router but not google, so then i have to do
route add default gw 192.168.1.1

and finally i can access the internet with my wireless.

i guess im just wondering if anyone could explain why i have to do that ^ to get it working?
and how/if i could eliminate the need or automate it?
and why does wext work when im using ndiswrapper?

also after running the wpa_supplicant command i get
Code:

Trying to associate with 00:0f:3d:b4:ba:3c (SSID='G604T_WIRELESS' freq=2437 MHz)Associated with 00:0f:3d:b4:ba:3c
WPA: Key negotiation completed with 00:0f:3d:b4:ba:3c [PTK=TKIP GTK=TKIP]
CTRL-EVENT-CONNECTED - Connection to 00:0f:3d:b4:ba:3c completed (auth) [id=0 id_str=]
WPA: Group rekeying completed with 00:0f:3d:b4:ba:3c [GTK=TKIP]
WPA: Group rekeying completed with 00:0f:3d:b4:ba:3c [GTK=TKIP]
WPA: Group rekeying completed with 00:0f:3d:b4:ba:3c [GTK=TKIP]
WPA: Group rekeying completed with 00:0f:3d:b4:ba:3c [GTK=TKIP]
WPA: Group rekeying completed with 00:0f:3d:b4:ba:3c [GTK=TKIP]
WPA: Group rekeying completed with 00:0f:3d:b4:ba:3c [GTK=TKIP]

is there some way of running it in the background, and is this normal?

by the way if anyone has a safecom SWLPT-54108 and is having problems with their drivers i would gladly send u the ones i have that work.

Thanks guys
Kane

Hangdog42 10-29-2006 04:49 PM

Quote:

dont know what wext is,i tried ndiswrapper first and it said something about not being able to load the driver :S and then i found something that suggested wext is for newer wpa_supplicant?
anybody care to enlighten me?
I'll give it a go..... wpa_supplicant needs to use a "driver" to communicate with the wireless card. There is a specific driver for ndiswrapper, but in more recent versions they have added the generic wext driver. My understanding is that wext works throug iwconfig, but that may not be entirely correct. In theory, any driver that can use iwconfig might be able to use wpa_supplicant via the wext driver.

At any rate, if you have the lastest wpa_supplicant (0.49 I believe) you have the choice of using either the ndiswrapper or the wext driver. In theory either should work. Just change the -D flag and see which works best.
Quote:

is there some way of running it in the background, and is this normal?
Try adding the -Bw flag to your startup for wpa_supplicant. That should put it into daemon mode and cause it to wait if the interface isn't up for some reason.

Quote:

i guess im just wondering if anyone could explain why i have to do that ^ to get it working?
and how/if i could eliminate the need or automate it?
I think you're missing the last step. Wpa_supplicant will configure the card, but it won't request an IP address. You need to use a DHCP client to do that. Since you use Slackware, dhcpcd is the client of choice. So after you've run your wpa_supplicant command and confirmed that the card is configured, run this as root:

dhcpcd wlan0

That should get you an IP address from the DHCP server, and set the gateway and /etc/resolv.conf.

Kane2002 10-29-2006 05:04 PM

thanks :D

the -Bw worked and dhcpd worked too.

if i remember ive seen dhcpd run at startup, so do i need to run the wpa_supplicant command before that starts so that i have the net working after boot?

Hangdog42 10-30-2006 06:39 AM

The dhcpcd you're seeing at boot is probably not for your wireless card unless you've done some setup for it. Personally, I run both wpa_supplicant and dhcpcd from a script. You could use rc.local for example. The only real issue is you need to add a few seconds delay between starting wpa_supplicant and running dhcpcd as the script can execute faster than the card is configured.

pappy_mcfae 08-13-2007 01:56 PM

Quote:

Originally Posted by Hangdog42 (Post 2483038)
The dhcpcd you're seeing at boot is probably not for your wireless card unless you've done some setup for it. Personally, I run both wpa_supplicant and dhcpcd from a script. You could use rc.local for example. The only real issue is you need to add a few seconds delay between starting wpa_supplicant and running dhcpcd as the script can execute faster than the card is configured.

It's good to know I am not the only one who does it that way. I invoke wpa_supplicant, dhcpcd an IP address, then invoke samba. It works wonderfully!

The latest version of wpa_supplicant is actually 0.5.8.

Blessed be!
Pappy


All times are GMT -5. The time now is 11:01 PM.