You are not logged in.

#1 2007-01-14 04:21:55

amunimanghi
Member
Registered: 2006-11-21
Posts: 78

Setup wireless card during bootup

Hey,

It took my awhile to get my wireless card to work but I finally got it to work. In the beginning, I had to type every command to get my wireless card to work. A little later my friend made a script that runs during start up. But it encountered a problem. When the command ''dhcpcd ath0" it would just hang so I took that out. It ran fine but now I have to run "dhcpcd ath0", let it run for 4 or 5 seconds, then kill it with ctrl + c, and then finally run it again. My connection is then established. So this gets a little annoying.
Now I come to you, the community. What is the best way to setup a wireless card during boot-up? My friend (yes, its the same one as before tongue ) said that there was a wireless script or profile that most people use. Would this help? Thanks.

Offline

#2 2007-01-14 11:25:54

Asaru
Member
Registered: 2006-05-06
Posts: 14

Re: Setup wireless card during bootup

i use the network-profiles for this
and have set the NET_PROFILES to menu so i can choose what to use at start..

have a look at /etc/network-profiles/


hth
Asaru

Offline

#3 2007-01-16 00:50:59

amunimanghi
Member
Registered: 2006-11-21
Posts: 78

Re: Setup wireless card during bootup

Asaru wrote:

i use the network-profiles for this
and have set the NET_PROFILES to menu so i can choose what to use at start..

have a look at /etc/network-profiles/


hth
Asaru

Can you emphasize, I'm still new to editing files in /etc.

Offline

#4 2007-01-16 23:18:49

arew264
Member
From: Friendswood, Texas, US
Registered: 2006-07-01
Posts: 394
Website

Re: Setup wireless card during bootup

I assume you meant elaborate smile

The first and most recommended way of doing this is through rc.conf, which has lines that allow you to set up a network adapter quite simply.

However, this file does not allow you, to my knowledge, to set up a wireless card with the essid and any encryption. Even if it did, your system would be trying to set up your wireless card every boot, and if this is a laptop that may not be in range of your network sometimes, your system would be trying to set up a card on a network that wasn't there. I don't know what exactly would result there, but I'd rather not worry about it.

The method Asaru mentioned is to set up a network profile in /etc/network-profiles/. There is a decent wiki article about this, I believe, so try searching there (wiki.archlinux.org) for network profiles. This seems to be the method of choice for setting up a network card on boot, and simply allows you to specify any settings you want to apply to it, and even set up a menu that will display on boot asking which network profile you want to use, which would be handy with a laptop because you could create a profile that does nothing in case you aren't going to connect to a wireless network.

I do not have a wireless card in use under linux nor do I have any experience with wireless under Arch, so if I am incorrect anywhere above I would ask that someone with more experience here would correct me.

Offline

#5 2007-01-17 01:13:50

amunimanghi
Member
Registered: 2006-11-21
Posts: 78

Re: Setup wireless card during bootup

Ok, I went ahead and looked at the wiki. One thing lead to another and I found a patch made by ____. Here's the link. http://iphitus.loudas.com/arch/network/ … oved.patch

Do I need to edit this? If so, what do I need to edit inside of it? Elaborate when needed. ;-)

EDIT: I took a quick look at it and already I don't know what $IWOPTS means.

Offline

#6 2007-01-17 08:22:18

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Setup wireless card during bootup

that patch was applied a long time ago. Please follow Asaru's suggestion of using /etc/network-profiles

Try copying the default/example, and modifying it. READ what the fields do, many such as IWOPTS are optional.

James

Offline

#7 2007-01-17 23:12:07

amunimanghi
Member
Registered: 2006-11-21
Posts: 78

Re: Setup wireless card during bootup

#
# Network Profile
#

DESCRIPTION="Default Network Profile"

# Network Settings
INTERFACE=ath0
HOSTNAME=manghi

# Interface Settings (use IFOPTS="dhcp" for DHCP)
IFOPTS="dhcp"
GATEWAY=192.168.0.1

# DNS Settings (optional)
DOMAIN=localdomain
DNS1=192.168.0.1
DNS2=

# Wireless Settings (optional)
ESSID=FMang
KEY=**********(inputed key)
#IWOPTS="mode managed essid FMang channel 6 key restricted A16B61B296"

WIFI_INTERFACE=wlan0   # use this if you have a special wireless interface
                        # that is linked to the real $INTERFACE

WIFI_WAIT=5            # seconds to wait for the wireless card to
                        # associate before bringing the interface up
#USEWPA="yes"           # start wpa_supplicant with the profile
#WPAOPTS=""             # use "" for normal operation or specify 
additional
                        # options (eg, "-D ipw")
                        # see /etc/wpa_supplicant.conf for configuration
#AUTOWPA="yes"          # automatically configure WPA
#PASSKEY=""             # wpa passkey/phrase. for use with AUTOWPA

Is this correct?

Offline

#8 2007-01-18 18:34:56

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,962

Re: Setup wireless card during bootup

amunimanghi wrote:
#
# Network Profile
#

DESCRIPTION="Default Network Profile"

# Network Settings
INTERFACE=ath0
HOSTNAME=manghi

# Interface Settings (use IFOPTS="dhcp" for DHCP)
IFOPTS="dhcp"
GATEWAY=192.168.0.1

# DNS Settings (optional)
DOMAIN=localdomain
DNS1=192.168.0.1
DNS2=

# Wireless Settings (optional)
ESSID=FMang
KEY=**********(inputed key)
#IWOPTS="mode managed essid FMang channel 6 key restricted A16B61B296"

WIFI_INTERFACE=wlan0   # use this if you have a special wireless interface
                        # that is linked to the real $INTERFACE

WIFI_WAIT=5            # seconds to wait for the wireless card to
                        # associate before bringing the interface up
#USEWPA="yes"           # start wpa_supplicant with the profile
#WPAOPTS=""             # use "" for normal operation or specify 
additional
                        # options (eg, "-D ipw")
                        # see /etc/wpa_supplicant.conf for configuration
#AUTOWPA="yes"          # automatically configure WPA
#PASSKEY=""             # wpa passkey/phrase. for use with AUTOWPA

Is this correct?

Not entirely.

Comment everything in the DNS section , it's not used with dhcp and could cause conflicts

In wireless settings

- uncomment the line for IFOPTS

- comment the line WIFI_INTERFACE (iirc it's only needed with ndiswrapper)


Change the DESCRIPTION field to something appropriate like "Wlan at home"


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#9 2007-01-18 22:52:10

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Setup wireless card during bootup

Lone_Wolf wrote:

- uncomment the line for IFOPTS

No need, the script uses a sane default when IWOPTS isnt defined in the config.

Offline

#10 2007-01-19 01:40:13

amunimanghi
Member
Registered: 2006-11-21
Posts: 78

Re: Setup wireless card during bootup

Ok, now that it is all configured, how would I get this to run at start-up?

Offline

#11 2007-01-19 10:54:06

Asaru
Member
Registered: 2006-05-06
Posts: 14

Re: Setup wireless card during bootup

look in your rc.conf for network-profile.
you need to change this to "menu" (if you want the menu to choose) or just name the profile there (havent used this yet.. i think its the filename)

Offline

#12 2007-01-19 11:04:43

manmower
Member
From: Belgium
Registered: 2006-11-17
Posts: 100

Re: Setup wireless card during bootup

Asaru wrote:

look in your rc.conf for network-profile.
you need to change this to "menu" (if you want the menu to choose) or just name the profile there (havent used this yet.. i think its the filename)

Yep, just use the name of your profile if you don't need to choose while booting.

Then you can

/etc/rc.d/network restart

as super-user to see if it connects without having to reboot.

Offline

#13 2007-01-22 19:02:15

Asaru
Member
Registered: 2006-05-06
Posts: 14

Re: Setup wireless card during bootup

or try with

netcfg --menu

as root to test the configs

Offline

#14 2007-01-22 19:59:15

amunimanghi
Member
Registered: 2006-11-21
Posts: 78

Re: Setup wireless card during bootup

Thanks for everyones help. It works now automatically on startup.

Offline

Board footer

Powered by FluxBB