You are not logged in.

#1 2009-02-13 11:58:14

jelly
Administrator
From: /dev/null
Registered: 2008-06-10
Posts: 714

Netcfg & Wpa_supplicant

Normally i use wpa-supllicant and a script to connect to a wireless network, but i want to do it with netcfg.

ctrl_interface=/var/run/wpa_suplicant
ap_scan=1

network={
ssid="eduroam"
key_mgmt=IEEE8021X
eap=TTLS
identity="jvanderwaa@tudelft.nl"
password="xxxxxx"
phase2="auth=PAP"
}

and then

 sudo /usr/sbin/wpa_supplicant -i wlan0 -c /etc/wpa_suplicant.conf &
dhcpcd wlan0

This works with the command line but when i try it with netcfg

 INTERFACE=wlan0
HOSTNAME=""
# Interface Settings
IP="dhcp"
IFOPTS="dhcp"
DHCP_TIMEOUT=20
# Wireless Settings
SECURITY="wpa-config"
ESSID="eduroam"
KEY=""
SCAN="yes"
TIMEOUT=10
# WPA Specific Settings
WPA_OPTS=""
WPA_CONF="/etc/wpa_suplicant.conf"

This doesn't work how could i fix it?  It would be nice to use netcfg to automaticly connect to a wireless network at boot

Offline

#2 2009-02-13 14:08:45

bgc1954
Member
From: Edmonton, AB, Canada
Registered: 2006-03-14
Posts: 1,160

Re: Netcfg & Wpa_supplicant

This may or may not help but this is what I have used forever with netcfg.

My wireless profile in /etc/network.d/wireless--mine is static but you can change easily to dhcp.

CONNECTION="wireless"
INTERFACE=wlan0
SCAN="yes"
SECURITY="wpa-config"
ESSID="myessid"
KEY=""
IP="static"
IFOPTS="192.168.0.101 netmask 255.255.255.0 broadcast 192.168.0.255"
GATEWAY="192.168.0.1"
TIMEOUT=30

My /etc/wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant

eapol_version=1

ap_scan=1

fast_reauth=1

network={
        ssid="myessid"
        psk=my_random_code_password
        key_mgmt=WPA-PSK
        pairwise=TKIP
        group=TKIP
        proto=WPA
}

My network part of /etc/rc.conf

# NETWORKING
# -----------------------------------------------------------------------
#
# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
#
HOSTNAME="myhostname"

# Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available interfaces.
#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
#   - prefix an entry in INTERFACES with a ! to disable it
#   - no hyphens in your interface names - Bash doesn't like it
# 
# DHCP:     Set your interface to "dhcp" (eth0="dhcp")
# Wireless: See network profiles below
#
#eth0="eth0 192.168.0.101 netmask 255.255.255.0 broadcast 192.168.0.255"
INTERFACES=(!eth0)

# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
#   - prefix an entry in ROUTES with a ! to disable it
#
gateway="default gw 192.168.0.1"
ROUTES=(!gateway)
 
# Enable these network profiles at boot-up.  These are only useful
# if you happen to need multiple network configurations (ie, laptop users)
#   - set to 'menu' to present a menu during boot-up (dialog package required)
#   - prefix an entry with a ! to disable it
#
# Network profiles are found in /etc/network.d
#
# This now requires the netcfg package
#
NETWORKS=(wireless)

# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
# Daemons to start at boot-up (in this order)
#   - prefix a daemon with a ! to disable it
#   - prefix a daemon with a @ to start it up in the background
#
DAEMONS=(@syslog-ng @crond net-profiles hal cpudyn @alsa)

Time is a great teacher, but unfortunately it kills all its pupils ... - Louis Hector Berlioz

Offline

Board footer

Powered by FluxBB