LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (https://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   wpa_supplicant .config build (https://www.linuxquestions.org/questions/linux-wireless-networking-41/wpa_supplicant-config-build-609077/)

Twirk3d 12-25-2007 04:01 PM

wpa_supplicant .config build
 
Heres my problem:
i've installed madwifi in compatibility to my netgear WAG511, it runs fine on wep and such, but it doesn't go well with WPA, so i find the WPA supplicant. Since i cant download it straight to my backtrack linux laptop on my thinkpad 240 (because i dont have a unsecure wireless network around me, nor those my ethernet port work), i use a thumbdrive to transfer the files. Now this is where im stuck, i gunzip the .gz, untar it.

use the make command, tells me to make a .config file for what i want installed, but im stumped here. I don't know what im doing at this point x.x'
im not sure what drivers i should be using for the wpa_supplicant inside the .config file, heres the list of what i could use


CONFIG_IEEE8021X_EAPOL=y
CONFIG_EAP_MD5=y
CONFIG_EAP_MSCHAPV2=y
CONFIG_EAP_TLS=y
CONFIG_EAP_PEAP=y
CONFIG_EAP_TTLS=y
CONFIG_EAP_GTC=y
CONFIG_EAP_OTP=y
CONFIG_EAP_SIM=y
CONFIG_EAP_AKA=y
CONFIG_EAP_PSK=y
CONFIG_EAP_SAKE=y
CONFIG_EAP_GPSK=y
CONFIG_EAP_PAX=y
CONFIG_EAP_LEAP=y
CONFIG_DRIVER_HOSTAP=y
CONFIG_DRIVER_HERMES=y
CONFIG_DRIVER_MADWIFI=y
CONFIG_DRIVER_ATMEL=y
CONFIG_DRIVER_WEXT=y
CONFIG_DRIVER_NDISWRAPPER=y
CONFIG_DRIVER_BROADCOM=y
CONFIG_DRIVER_IPW=y
CONFIG_DRIVER_BSD=y
CONFIG_DRIVER_NDIS=y
CONFIG_WIRELESS_EXTENSION=y
CONFIG_IEEE8021X_EAPOL=y
CONFIG_EAP_MD5=y
CONFIG_EAP_MSCHAPV2=y
CONFIG_EAP_TLS=y
CONFIG_EAP_PEAP=y
CONFIG_EAP_TTLS=y
CONFIG_EAP_GTC=y
CONFIG_EAP_OTP=y
CONFIG_EAP_SIM=y
CONFIG_EAP_AKA=y
CONFIG_EAP_PSK=y
CONFIG_EAP_SAKE=y
CONFIG_EAP_GPSK=y
CONFIG_EAP_PAX=y
CONFIG_EAP_LEAP=y
CONFIG_PCSC=y

not that i dont know what to use... i just dont understand most of these protocols/drivers/configurations

Twirk3d 12-26-2007 09:08 AM

So i found a example .config file in the defconfig, everything seems fine, except one thing, the madwifi gives me an error of

make: *** [driver_madwifi.o] Error 1

this seems to be a big problem with old versions of madwifi.. but my current version is 0.9.3.3 and my wpa sup is 0.5.9

any help at all is appreciated
im running BT version 2.6.20

jayjwa 12-28-2007 09:00 AM

You do know you need the madwifi source code to build against, right? You have to point the CFLAGS at it. Stick it in /usr/src, because you'll need to rebuilt it each time you upgrade/update your kernel. Untar wpa_supplicant there too, for that matter.

Ex:

Code:

/usr/src

glibc-2.7/                linux@            rpm/
hostapd-0.5.9/            linux-2.6.23.12/  wpa_supplicant-0.5.8/
ipset-20071225/          madwifi-0.9.3.3/
iptables-1.4.0-20071225/  Makefile

.config without the empty lines or comments:

Code:

/usr/src/wpa_supplicant-0.5.8>] cat .config | grep -v '^#' | grep .

CONFIG_DRIVER_HOSTAP=y
CONFIG_DRIVER_MADWIFI=y
CFLAGS += -I/usr/src/madwifi-0.9.3.3
CONFIG_DRIVER_NDISWRAPPER=y
CONFIG_DRIVER_ATMEL=y
CONFIG_DRIVER_IPW=y
CONFIG_DRIVER_WEXT=y
CONFIG_DRIVER_TEST=y
CONFIG_DRIVER_WIRED=y
CONFIG_IEEE8021X_EAPOL=y
CONFIG_EAP_MD5=y
CONFIG_EAP_MSCHAPV2=y
CONFIG_EAP_TLS=y
CONFIG_EAP_PEAP=y
CONFIG_EAP_TTLS=y
CONFIG_EAP_GTC=y
CONFIG_EAP_OTP=y
CONFIG_EAP_PSK=y
CONFIG_EAP_PAX=y
CONFIG_EAP_LEAP=y
CONFIG_EAP_SAKE=y
CONFIG_EAP_GPSK=y
CONFIG_EAP_GPSK_SHA256=y
CONFIG_PKCS12=y
CONFIG_SMARTCARD=y
CONFIG_CTRL_IFACE=y
CONFIG_READLINE=y
CONFIG_BACKEND=file
CONFIG_MAIN=main
CONFIG_OS=unix
CONFIG_ELOOP=eloop
CONFIG_L2_PACKET=linux
CONFIG_PEERKEY=y
CONFIG_IEEE80211W=y
CONFIG_TLS=gnutls
CONFIG_GNUTLS_EXTRA=y
CFLAGS += -I/usr/local/include
LIBS += -L/usr/local/lib

For the AP side, hostap works well. I just did a Netgear wg311t setup with hostap and wpa_supplicant. It took a little bit of work to get WPA and friends working...

Edit: I just downloaded and tried wpa_supplicant-0.5.9 and that works as well w/same as above.

Twirk3d 12-30-2007 09:41 AM

yeah thanks man! i got it myself, totally forgot about the source code, thought it came inside its the wpa_supplicant, didn't know it was the ACTUAL madwifi, anyway i got that done, i compiled everything, now my card is working, except for the WPA, i can connect to a normal network, but i cant seem to configure the iwconfig and ifconfig to connect to the encrypted network, i essid, enc, channel, and i think thats all, i believe i didn't compile wpa_supplicant with the right .config, i'll edit it with what u have and report...

doing it...

seems to compile fine..

now i edited my iwconfig again, essid, enc, and channel, when i do "ifconfig up ath0" it tells tells me host name lookup failure. I used KWIFI to detect my network and it sees it fine with a descent signal, but since KWIFI only support wep i cant configure the WPA, anyway, i think i may need to edit my hostapd .config file, what did u compile yours with?

thanks for the help tons! oh and i copied the src folders to /usr/src

PTrenholme 12-30-2007 10:05 AM

Don't you need to tell wpa_supplicant how to connect using the wpa_cli command? Of course, if you're using the NetworkManager service, it will prompt you for the connection type and password, and run wpa_cli to make the connection for you.

Twirk3d 12-31-2007 12:26 AM

oh ok, i didn't know about that.
well i run it, and its giving me this message:
"Could not connect to wpa_supplicant - re-trying"
and it hangs there...

[add]
So im trying to install Network manager, apparently i need wireless-tools, so i download the rpm, try to install wireless tools, tells me it needs glibc, i download that, try to install that, then IT needs glibc-common, basesystem, ligcc, then i download THAT and now basesystem needs a crap load of other dependencies, and glibc and glibc common are conflicting?

so overall, i gave up on that approach -.-

PTrenholme 01-01-2008 07:28 AM

Perhaps I missed it, but I can't see where you've specified the distribution you're using. Since you mention using a rpm (i.e., Red Hat Package Manager) file, I assumed that you were using one of the distributions derived from the Red Hat base, but, of course, other distributons can also use rpm files.

If, by some chance, you're using Fedora, all you need to do to get pre-compiled and configured madwifi running is to add one of the "non-free" repositories (I, mostly, use livna) to your /etc/repos.d/ directory and use yum or yumex to install the packages and resolve the dependencies.

In any case, most distributions make it fairly easy to install packages like madwifi and NetworkManager without compiling anything, If you specify you distribution, you may receive more speific help for your problem.

When you start a thread talking about compile-time options, most of your readers will presume that you are an experienced Linux user and just new to LinuxQuestions. They will also presume that you are familiar with various package managers (e.g., yum, apt, yast, smart, etc.) that will automatically resolve dependencies and warn of conflicts.

Twirk3d 01-01-2008 05:05 PM

Ok, sorry about that, heres my situation:

im running BackTrack 2.0 Final linux kernel 2.6.20
Network card is a Netgear WAG511
I have a Thinkpad 240
I only have a telephone modem, no ethernet, and wireless, so i currently have no way of getting on to the internet (with that laptop, i have other ways with other laptops)
I checked for yum and yumex and my system doesn't have those.
I have installed wpa-supplicant with the .config jayjwa suggested.
I have installed madwifi with its defconfig .config setting
I have installed hostapd with its defconfig .config setting
I can detect wireless networks around me (even wpa), i haven't tested connecting to a WEP b/c i dont have any around me (but i assume i can if i can detect them as most linux systems can use wep by default)
My wpa_cli returns: "Could not connect to wpa_supplicant - re-trying" and hangs there.
I configured my essid, encryption and channel with iwconfig, set an ip-address using ifconfig
Launched ifconfig ath0 up (ath0 is my current connection)
No return from ping to google

hope that cleared things up, thanks for any help that you guys can and have provided. =]

PTrenholme 01-02-2008 08:18 AM

Well, the error message is, I think, quite clear: You have to have the wpa_supplicant service running before you can interact with that service using the command line interface.

Have you looked at man wpa_supplicant for setup and configuration advice? If I recall correctly (I'm on an XP system right now, so I can't check.) you need to start wpa_supplicant with the options "-D -I<interface> -C<path to config>" where "path to config" is where you have your configuration file, and "interface" is one of the driver options you specified in the config file when you compiled wpa_supplicant. (I don't see WAG511 in the list, so you probably need to try "wext" for the "generic" interface.) The "-D" (if my memory is correct) is to tell wpa_supplicant" to detach and run as a service. (For testing, you can, of course, run it in the foreground and start wpa_cli from a second terminal window. Which might be a "good thing" since that way you can see ant error messages generated by either process.)

Hum: BackTrack 2.0 Final. That's a Slackware derivative, so you might find precompiled, installable, software and advice in a Slack forum and repository.

Twirk3d 01-06-2008 08:39 PM

Ok so i figured that out, i re-edited my wpa_supplicant.conf with the proper format, this is what i used:

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1 # 2 works for me too
ap_scan=1
fast_reauth=1
network={
ssid="hacktheplanet" # this should be your ESSID
key_mgmt=WPA-PSK
proto=RSN
pairwise=CCMP TKIP
group=CCMP TKIP
scan_ssid=0
#psk="YourPassphrase" # use 'wpa_passphrase yourEssid' and enter your passphrase up to 64 chars
psk=**********
}

seem'd to work fine, so now its a running process, now im getting another problem (as if i expected for everything to go on smoothly)

gives me:


bt etc# wpa_cli
wpa_cli v0.5.9

selected interface 'ath0'
Warning: Failed to attach to wpa_supplicant.

>'PING' command timed out.
Connection to wpa_supplicant lost - trying to reconnect
Connection to wpa_supplicant re-established

Warning: Failed to attach to wpa_supplicant.

>'PING' command timed out.
Connection to wpa_supplicant lost - trying to reconnect
Connection to wpa_supplicant re-established

Warning: Failed to attach to wpa_supplicant.

>'PING' command timed out.
Connection to wpa_supplicant lost - trying to reconnect
Connection to wpa_supplicant re-established


...
etc :/

PTrenholme 01-07-2008 09:24 AM

Is ath0 the correct interface? wpa_cli does have an -i <interface name> argument where you can specify the interface to use. It should be the same interface you used when you started wpa_supplicant. (ath0 is, alphabetically, the first interface in the list of interfaces.)

Have you read man wpa_cli?

I still think you're "beating you head against the wall" for no good reason. The "NetworManager" package is available for Slackware distributions, so you should be able to find a pre-complied version for your Back Track 2.0 Final distribution. Have you looked in the Slack repositories for one for your kernel version?

From what I read, Back Track is (just?) a standard Slackware distribution with specific "find the hacker" software included.


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