You are not logged in.

#1 2005-06-08 01:41:57

jota_dominguez
Member
Registered: 2005-06-08
Posts: 18

Setting wireless connection on boot up

I need help on setting up my wireless card to automatically register with my wireless router.
My wireless card is already working perfectly, but every time i log in to my user i have to open the konsole and type:

-- su -
-- [password]
-- iwconfig wlan0 essid "Losoriginales"
-- dhcpcd wlan0

and thats how i get wireless connection.

Thank you for your help

Offline

#2 2005-06-08 01:47:30

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: Setting wireless connection on boot up

I've never setup wireless but I'v noticed what looks like to be the conf for it (commented out) in /etc/conf.d/wireless. Did you look at that?

Offline

#3 2005-06-08 02:06:02

jota_dominguez
Member
Registered: 2005-06-08
Posts: 18

Re: Setting wireless connection on boot up

what i have in /etc/conf.d/wireless  is

#
# Settings for wireless cards
#
# For each wireless interface declared in INTERFACES (in rc.conf), declare
# a wlan_${IF} variable that contains the arguments to be passed to
# iwconfig(8).  Then list the original interface name in the
# WLAN_INTERFACES array.
#

#wlan_eth0="eth0 mode managed essid default"
#WLAN_INTERFACES=(eth0)

Offline

#4 2005-06-08 02:31:24

jota_dominguez
Member
Registered: 2005-06-08
Posts: 18

Re: Setting wireless connection on boot up

this is how my rc.conf looks like:

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

#
# Localization
#
# HARDWARECLOCK: set to "UTC" or "localtime"
# 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/unimaps
# USECOLOR: use ANSI color sequences in startup messages
#
HARDWARECLOCK="localtime"
TIMEZONE=America/New_York
KEYMAP=us
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"

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

#
# Networking
#
HOSTNAME="JotaLinux"

#
# Module to load at boot-up (in this order)
#   (prefix a module with a ! to disable it)
#
MODULES=(!usbserial !ide-scsi ndiswrapper)

#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
#   (prefix an interface in INTERFACES with a ! to disable it)
#
# Note: to use DHCP, set your interface to be "dhcp" (eth0="dhcp")
#
lo="lo 127.0.0.1"
# eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"

eth0="dhcp"
INTERFACES=(lo eth0)

#
# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
#   (prefix a route in ROUTES with a ! to disable it)
#
# gateway="default gw 192.168.0.1"
ROUTES=(!gateway)

#
# 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 hotplug pcmcia network netfs crond kdm)

# End of file

Offline

#5 2005-06-08 09:29:58

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: Setting wireless connection on boot up

dude - you have posted all of the information you need to get it working:

# For each wireless interface declared in INTERFACES (in rc.conf), declare
# a wlan_${IF} variable that contains the arguments to be passed to
# iwconfig(8). Then list the original interface name in the
# WLAN_INTERFACES array.

How hard can it be? You use wlan0.  In rc.conf you give the settings for an interface as normal - this i the "wireless interface declared in INTERFACES"

wlan0="dhcp"
INTERFACES=(lo eth0 wlan0)

Then in conf.d/wireless ${IF} is wlan0 so you need:

wlan_wlan0="eth0 mode managed essid Losoriginales"
WLAN_INTERFACES=(wlan0)

That's it

Offline

#6 2005-06-08 10:45:42

jerem
Member
From: France
Registered: 2005-01-15
Posts: 310

Re: Setting wireless connection on boot up

Use rc.local to setup your wireless settings and use rc.conf for the ip stuff.

That's how I do it an how I will do until Arch has a way as simple as Debian to set it up.

Last time I played with /etc/conf.d/wireless, it simply ignored my settings, although I had all interfaces up in rc.conf...

Offline

#7 2005-06-08 10:59:29

dtw
Forum Fellow
From: UK
Registered: 2004-08-03
Posts: 4,439
Website

Re: Setting wireless connection on boot up

post your conf.d/wireless and we might be able to suggest some improvements - saying it just didn't work isn't going to help much

Offline

#8 2005-06-08 15:30:25

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Setting wireless connection on boot up

there's also about 5 or 6 other implementations in the wiki and stuff (dibble and I each have are own - sometimes they wrestle, but no one ever wins... lol)

Offline

#9 2005-06-08 17:00:25

Victor
Member
From: Zaragoza/ESPAÑA (Spain)
Registered: 2005-01-27
Posts: 23

Re: Setting wireless connection on boot up

It is very simple:

/etc/conf.d/wireless

wlan_eth1="eth1 mode managed essid your_essid key XXXX-...-XXXX"
WLAN_INTERFACES=(eth1)

/etc/rc.conf

eth1="dhcp"
INTERFACES=(lo eth1)

Good luck
(...o buena suerte, que por el nombre creo que eres español)  wink


http://aur.archlinux.org
[code][Victor]
Server = http://personales.ya.com/vmromanos/arch/pkgs
[/code]
http://vmromanos.homelinux.net/foro

Offline

#10 2005-06-08 21:48:38

vladtepes
Member
From: Radaspona, Germania
Registered: 2004-06-11
Posts: 37

Re: Setting wireless connection on boot up

Greetings,

if have 2 network devices in my notebook, and i want usually my wireless lan card on.
so i use this script to change between my to devices.
maybe it helps you in some way.

#!/bin/bash 

. /etc/rc.conf 
. /etc/rc.d/functions 

case "$1" in 
    start) 
      stat_busy "Starting Wireless Interface" 
      ifconfig eth0 down
      ifconfig eth1 up 
      ifconfig eth1 192.168.2.18
      route add default gw 192.168.2.1
      iwconfig eth1 essid xxxxxxx 
      iwconfig eth1 mode Managed 
      iwconfig eth1 key restricted xxxxxxxx      
             
      if [ $? -gt 0 ]; then 
          stat_fail 
      else 
          add_daemon wireless 
          stat_done 
      fi 
      ;; 
    stop) 
      stat_busy "Stopping Wireless Interface" 
      ifconfig eth1 down 
      if [ $? -gt 0 ]; then 
          stat_fail 
      else 
      ifconfig eth0 up
          ifconfig eth0 192.168.2.18
      route add default gw 192.168.2.1
          rm_daemon wireless 
          stat_done 
      fi 
      ;; 
    restart) 
      $0 stop 
      sleep 1 
      $0 start 
      ;; 
    *) 
      echo "Usage $0 {start|stop|restart}" 
      ;; 
esac

[img]http://www.ccc.de/campaigns/music/boykott1.gif[/img]

Offline

#11 2005-06-09 03:34:38

jota_dominguez
Member
Registered: 2005-06-08
Posts: 18

Re: Setting wireless connection on boot up

where do insert that code?

Offline

#12 2005-06-09 03:43:04

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: Setting wireless connection on boot up

jota_dominguez wrote:

where do insert that code?

you run it.
save it some place and do:

chown root /path/to/file
chmod 744 /path/to/file

then run it by giving the complete path to it. Or cd into that directory and do ./nameoffile or bash nameoffile

Offline

#13 2005-06-09 18:38:20

vladtepes
Member
From: Radaspona, Germania
Registered: 2004-06-11
Posts: 37

Re: Setting wireless connection on boot up

Greetings,

if you mean mine, you put it int /etc/rc.d/ as a deamon.
start it at boot time. (deamon in rc.conf) if you want wlan at startup.

if you want to stop then the wlan device, just type ./wireless stop (or whatever name you give the script)


[img]http://www.ccc.de/campaigns/music/boykott1.gif[/img]

Offline

#14 2005-06-09 21:40:17

jota_dominguez
Member
Registered: 2005-06-08
Posts: 18

Re: Setting wireless connection on boot up

thanks, all you guys,

i got it to work

Offline

#15 2005-09-25 03:55:40

sml
Member
Registered: 2005-05-21
Posts: 89

Re: Setting wireless connection on boot up

jota ..  which method was easiest to solve your problem?

Offline

Board footer

Powered by FluxBB