Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
135
rated 0 times [  135] [ 0]  / answers: 1 / hits: 630470  / 2 Years ago, mon, august 1, 2022, 8:13:22

So basically, I'd like to use iwconfig to connect to my wifi network when I'm not inside X. But I just don't see a way to do it in the man page. Any idea?


More From » wireless

 Answers
3

iw (list/config) can only handle WEP.



You need the wpasupplicant package which provides the wpa_supplicant command, install if necessary through sudo apt-get install wpasupplicant.



You put your SSID and password into /etc/wpa_supplicant.conf (requires sudo).



Example:



network={
ssid="ssid_name"
psk="password"
}


Assuming your interface is wlan0 you can connect with:



sudo wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf -D wext
sudo dhclient wlan0


"wext" is a driver and that will be specific for each card; refer to wpa_supplicant -h. Examples:



hostap (default) Host AP driver (Intersil Prism2/2.5/3). (this can also be used with Linuxant DriverLoader).
hermes Agere Systems Inc. driver (Hermes-I/Hermes-II).
madwifi MADWIFI 802.11 support (Atheros, etc.).
atmel ATMEL AT76C5XXx (USB, PCMCIA).
wext Linux wireless extensions (generic).
ndiswrapper Linux ndiswrapper.
broadcom Broadcom wl.o driver.
ipw Intel ipw2100/2200 driver.
wired wpa_supplicant wired Ethernet driver
roboswitch wpa_supplicant Broadcom switch driver
bsd BSD 802.11 support (Atheros, etc.).
ndis Windows NDIS driver.

[#38343] Tuesday, August 2, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
terose

Total Points: 185
Total Questions: 125
Total Answers: 131

Location: Venezuela
Member since Mon, Dec 13, 2021
2 Years ago
terose questions
;