Jump to content

proper wpa_supplicant configs


i8igmac

Recommended Posts

Iwlist scan will report all the information you need to know about a access point. to build a proper config for use with WPA supplicant you need to include the access point variables in your config file.

if the access point is not satisfied with your config file used during Association. you will be disconnected from this access point.

I was thinking about automating this process but I wonder if this has already been done? All the tools that already exist for this process? Sorting threw iwlist scan and building a proper config file?

Link to comment
Share on other sites

#ap_scan=2

network={

ssid="mywlan"

scan_ssid=1

proto=WPA RSN

key_mgmt=WPA-PSK

pairwise=CCMP TKIP

group=CCMP TKIP psk=b22ec921c254c73f99b31b76ff876692ecde36839a1f2d92150829e6afcb5515

}

I have looked at some quick examples of wpa_cli...

group, pairwise, key_mgmt, proto... these variables will be automatically configured?

If I set a minimal config that only includes ssid and psk, wpa_cli can automate the rest of the configuration process?

Link to comment
Share on other sites

You can run "wpa_supplicant" from the command line to connect the with a conf file. You feed wpa_passphrase the ssid, password, and it does pretty much the rest to create the conf file for you.

example:

wpa_passphrase MYSSID passphrase > myap.conf

Then just connect with:

wpa_supplicant -B -i interface -c myap.conf

I put them in my home directory with the names of the AP's I want to use though, and then just connect with them manually per AP when I need, using a shell script to load them vs the whole command.

Arch has some docs on the tools:

https://wiki.archlinux.org/index.php/WPA_supplicant

edit:

you can ad the whole dhcp process in the shell script as well, so when it executes, it connects to the AP, and then acquires an IP with something like dhclient or dhcpd3 or whatever your system uses,

Edited by digip
Link to comment
Share on other sites

I'm not in a position to test right now, but it should be that you can use those programs to connect to an AP. It will quiz you on the connection parameters and allow to store those variables you provided and the settings it detected in the standard config file for future reference, so wpa_supplicant will automagically reconnect to that AP next time it sees it.

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.

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...