You are not logged in.

#1 2009-08-06 22:25:16

vjoe
Member
From: Milton Keynes
Registered: 2008-06-14
Posts: 72

Netcfg2 doesn't connect to my wireless network on startup

Hello,

I have done everything to try to get my netcfg2 connecting to my network on startup and edited rc.conf so much that I probably added some irrelevant stuff, and most important, it still doesn't work.

Here are my conf files:

rc.conf

#
# /etc/rc.conf - Main Configuration for Arch Linux
#

# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
# LOCALE: available languages can be listed with the 'locale -a' command
# HARDWARECLOCK: set to "UTC" or "localtime"
# USEDIRECTISA: use direct I/O requests instead of /dev/rtc for hwclock
# TIMEZONE: timezones are found in /usr/share/zoneinfo
# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
# CONSOLEMAP: found in /usr/share/kbd/consoletrans
# USECOLOR: use ANSI color sequences in startup messages
#
LOCALE="en_GB.utf8"
HARDWARECLOCK="localtime"
USEDIRECTISA="no"
TIMEZONE="UTC"
KEYMAP="pt-latin9"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"

# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
# MOD_AUTOLOAD: Allow autoloading of modules at boot and when needed
# MOD_BLACKLIST: Prevent udev from loading these modules
# MODULES: Modules to load at boot-up. Prefix with a ! to blacklist.
#
# NOTE: Use of 'MOD_BLACKLIST' is deprecated. Please use ! in the MODULES array.
#
MOD_AUTOLOAD="yes"
#MOD_BLACKLIST=() #deprecated
MODULES=(r8169 iwl4965 snd-mixer-oss snd-pcm-oss snd-hwdep snd-page-alloc snd-pcm snd-timer snd snd-hda-intel !soundcore fuse vboxdrv bridge)


# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"

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

# 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
#
wlan0="dhcp"
br0="dhcp"
eth0="eth0 130.88.162.88 netmask 255.255.240.0 broadcast 130.88.175.255"
INTERFACES=(eth0 wlan0 br0)

# 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 130.88.171.250"
ROUTES=()
 
# 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=(ethernet)
AUTO_NETWORKS=(auto-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 @net-auto @net-profiles netfs crond oss fam hal xinetd laptop-mode mpd lighttpd mysqld vboxnet slim)

network profile:

CONNECTION="wireless"
INTERFACE=wlan0
SCAN="yes"
SECURITY="wpa"
ESSID="hugenetwork"
KEY=""
IP="dhcp"
TIMEOUT=30

Can you help me fix this problem?

Thanks

Offline

#2 2009-08-07 02:08:58

Profjim
Member
From: NYC
Registered: 2008-03-24
Posts: 658

Re: Netcfg2 doesn't connect to my wireless network on startup

vjoe wrote:
wlan0="dhcp"
br0="dhcp"
eth0="eth0 130.88.162.88 netmask 255.255.240.0 broadcast 130.88.175.255"
INTERFACES=(eth0 wlan0 br0)
# 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 130.88.171.250"
ROUTES=()

If you're using netcfg, none of the above matters.

NETWORKS=(ethernet)
AUTO_NETWORKS=(auto-wireless)

What that says is that you're going to ask the daemon net-profiles to load the profile /etc/network.d/ethernet, and that you're going to ask the daemon net-auto to load the first profile it can in /etc/network.d/* that is a wireless connection, has the matching interface, and has an ESSID that is also seen when netcfg scans for existing networks. None of that will happen unless the relevant daemons are also activated in the DAEMONS list. Also, you haven't specified the AUTO_NETWORKS correctly. If your wireless interface is, for example, wlan0, that should read:

AUTO_NETWORKS=(auto-wireless wlan0)
DAEMONS=(syslog-ng @net-auto @net-profiles netfs crond oss fam hal xinetd laptop-mode mpd lighttpd mysqld vboxnet slim)

That looks OK, at least at the beginning. You've backgrounded the network startup daemons, though, and I don't know how your network-wanting daemons at the end will respond to being started when the network may not yet be up...


CONNECTION="wireless"
INTERFACE=wlan0
SCAN="yes"
SECURITY="wpa"
ESSID="hugenetwork"
KEY=""
IP="dhcp"
TIMEOUT=30

Well, you have to specify a key---you can get it by typing "wpa_passphrase hugenetwork PASSWORD" and using the KEY=... line it returns. Probably you've done that and are just omitting the key from your posting. Otherwise this looks ok to me. Do you also have a profile named "ethernet" which the net-profiles daemon will also be trying to launch? This profile above will only be loaded by net-auto if it sees an access point named "hugenetwork" when it scans. Can you scan manually (use "iwlist wlan0 scan", replacing "wlan0" with your wifi interface) and see that access point?

Offline

#3 2009-08-07 23:27:04

vjoe
Member
From: Milton Keynes
Registered: 2008-06-14
Posts: 72

Re: Netcfg2 doesn't connect to my wireless network on startup

Adding wlan0 to the AUTO_NETWORKS solved it. Thanks a lot! smile

Offline

Board footer

Powered by FluxBB