A friend asked me to help him connecting his Slackware PC to wireless connection,
So i gave him this tutorial i wrote 3+ years ago in Arabic when i faced the same problem that took good two days of reading documentations.
Anyway I think it would be useful to translate it in English so it could help more people
- The obvious and easiest way to get your Slacware PC connected to a wireless network is using WICD, Unfortunately for some reasons this wasn’t possible for me.
So here is how to make a native wireless connection
- I’ll assume you have a running WPA2/PSK encrypted wireless network you want to log in
1- Know your hardware
lspci | grep 'Network controller' 03:00.0 Network controller: Intel Corporation Wireless WiFi Link 5100
Fortunately its supported by the kernel, i need no patches or drivers
2- Know your cards name
ifconfig -a
You will get something like this
eth0 Link encap:Ethernet HWaddr 00:1e:33:81:5a:fc UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:28 Base address:0x4000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:48 errors:0 dropped:0 overruns:0 frame:0 TX packets:48 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:2560 (2.5 KiB) TX bytes:2560 (2.5 KiB) wlan0 Link encap:Ethernet HWaddr 00:21:6b:3e:27:5c inet addr:192.168.1.166 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::221:6bff:fe3e:275c/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6245 errors:0 dropped:0 overruns:0 frame:0 TX packets:5587 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:4484716 (4.2 MiB) TX bytes:1016291 (992.4 KiB)
So it’s wlan0… lets wake it up!
ifconfig wlan0 up
2- You can use this if you’re not sure what’s your network name “ESSID”
iwlist wlan0 scan
If you didn’t get any output – make sure your network is setup properly or the more disturbing, search for your hardware driver… God help you.
3- Assuming everything went fine,
su - c wpa_passphrase YourESSID Password #Replace them with your ESSID and password
You will get something like:
root@ahmed:~# wpa_passphrase YOURESSID password
network={
ssid="YOURESSID"
#psk="password"
psk=9662ef151ea49312e467ff7b9220f4a7204d618aca903d5a86383dd9e1ca0dea
}
4- copy those lines, and open this file with your favorite text editor
/etc/wpa_supplicant.conf
There you’ll find something like this
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1
network={
scan_ssid=0
ssid="your_essid"
proto=WPA RSN
key_mgmt=WPA-PSK WPA-EAP
pairwise=CCMP TKIP
group=CCMP TKIP
psk=your_64_hex_characters_long_key
}
change ssid value with your networks’ name, psk with psk value from the output you copied, And proto with WPA2
5- Change file privileges
chmod 600 /etc/wpa_supplicant.conf
6- Open this file with your favorite text editor
/etc/rc.d/rc.inet1.conf
And add those lines
# Config information for wlan0 (using dhcp): IFNAME[1]="wlan0" IPADDR[1]="" NETMASK[1]="" USE_DHCP[1]="yes" DHCP_HOSTNAME[1]="My_ESSID" #Change it with your networks' name WLAN_WPA[1]="wpa_supplicant" WLAN_WPADRIVER[1]="wext"
And add your networks’ values if you are not using DHCP.
- save the file, We are almost there
/etc/rc.d/rc.inet1 wlan0_restart
congratulations your PC should be connected now
Resources :
/usr/doc/wpa_supplicant-0.6.10/README.slackware
Configuring your network in Slackware
Slackware Linux Essentials – Network Configuration
You sir, are the man!
I had to change all the [1] to [4] and move the block down the file (/etc/rc.d/rc.inet1.conf) below number 3. Before this I was getting “error set nickname (8B1C)”
Thank you very much
I’m glad it helped you