LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   WiFi with rc.inet1 script only (http://www.linuxquestions.org/questions/slackware-14/wifi-with-rc-inet1-script-only-4175456236/)

czezz 03-31-2013 02:08 AM

WiFi with rc.inet1 script only
 
Slackkware 14 x86 installation
Wlan0 with "ath5k"

I can connect my Slackware 14 installation to my home WiFi (WPA and WPA2) with NetworkManager.
Because of my curiosity , I have disabled NetworkManager and tried to connect using /etc/rc.d/rc.inet1 script.

This is my:
/etc/rc.d/rc.inet1.conf
Code:

IFNAME[4]="wlan0"
#IPADDR[4]=""
#NETMASK[4]=""
USE_DHCP[4]="yes"
#DHCP_HOSTNAME[4]="icculus-wireless"
#DHCP_KEEPRESOLV[4]="yes"
#DHCP_KEEPNTP[4]="yes"
#DHCP_KEEPGW[4]="yes"
#DHCP_IPADDR[4]=""
WLAN_ESSID[4]="MyHomeWiFi"
WLAN_MODE[4]=Managed
##WLAN_RATE[4]="54M auto"
##WLAN_CHANNEL[4]="auto"
##WLAN_KEY[4]="D5AD1F04ACF048EC2D0B1C80C7"
WLAN_IWPRIV[4]="set AuthMode=WPAPSK | set EncrypType=TKIP | set WPAPSK=MySecretPasswd"
WLAN_WPA[4]="wpa_supplicant"
#WLAN_WPADRIVER[4]="ndiswrapper"

/etc/wpa_supplicant.conf
Code:

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=root

With that configuration it doesnt work and apparently Im missing something.
Can anyone please help me figure out what is wrong in this config ?

TommyC7 03-31-2013 06:06 AM

Hi there,

Your wpa_supplicant.conf file is missing a network block. At home my family uses a basic WPA2-PSK with an SSID, so my network blocked was created by using the wpa_passphrase command. Then it generates a network block for you which you can append to your /etc/wpa_supplicant.conf file:

Code:

wpa_passphrase "Home AP" "SuperSecretPassword" >> /etc/wpa_supplicant.conf
Here is the relevant information in my /etc/rc.d/rc.inet1.conf file:

Code:

# Config information for wlan0[1]:
IFNAME[1]="wlan0"
IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]="yes"
DHCP_KEEPRESOLV[1]="yes"
DHCP_HOSTNAME[1]=""
WLAN_ESSID[1]="Home AP"
WLAN_MODE[1]="Managed"
WLAN_WPA[1]="wpa_supplicant"

Also, don't be afraid to add more to the rc.inet1.conf file or the wpa_supplicant.conf file for more than one location. access point.

Code:

man wpa_supplicant.conf
Shows many other types of setups too beyond that of just a WEP/WPA/WPA2-PSK in case you run into those situations.

czezz 03-31-2013 05:23 PM

Hey Tommy, that works!
Thank you very much :D


All times are GMT -5. The time now is 01:00 AM.