LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 10-29-2006, 04:23 PM   #1
Kane2002
Member
 
Registered: Dec 2002
Location: UK
Distribution: Slackware, Zenwalk
Posts: 173

Rep: Reputation: 30
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
 
Old 10-29-2006, 04:49 PM   #2
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,769
Blog Entries: 1

Rep: Reputation: 410Reputation: 410Reputation: 410Reputation: 410Reputation: 410
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.
 
Old 10-29-2006, 05:04 PM   #3
Kane2002
Member
 
Registered: Dec 2002
Location: UK
Distribution: Slackware, Zenwalk
Posts: 173

Original Poster
Rep: Reputation: 30
thanks

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?
 
Old 10-30-2006, 06:39 AM   #4
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,769
Blog Entries: 1

Rep: Reputation: 410Reputation: 410Reputation: 410Reputation: 410Reputation: 410
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.
 
Old 08-13-2007, 01:56 PM   #5
pappy_mcfae
Member
 
Registered: Feb 2007
Location: Dallas
Distribution: Gentoo x86 & x86_64
Posts: 190

Rep: Reputation: 30
Post

Quote:
Originally Posted by Hangdog42 View Post
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ndiswrapper + NetworkManager + wpa_supplicant lonelydreamer Linux - Wireless Networking 5 06-13-2006 07:45 AM
wpa_supplicant and ndiswrapper rabidus Linux - Wireless Networking 2 10-20-2005 10:02 AM
ndiswrapper, wpa_supplicant, prism duette WORKS! esl537 Linux - Wireless Networking 3 08-28-2005 05:57 PM
ndiswrapper, driverloader, wpa_supplicant, libranet (debian), smc2835W esl537 Linux - Wireless Networking 1 08-27-2005 05:17 PM
wpa_supplicant/ndiswrapper seifenblasen Linux - Laptop and Netbook 3 03-24-2005 12:40 PM


All times are GMT -5. The time now is 05:55 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration