LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-17-2005, 10:56 AM   #1
chud67
Member
 
Registered: Jul 2004
Location: San Antonio, TX, USA
Posts: 34

Rep: Reputation: 15
Question Wireless help


I have a Toshiba laptop with an Orinoco Classic Gold wireless card. At home it works great with my wireless router, I don't even need to do anything it just works.

At work recently we got wireless access but it has a key and essid. Anyone know how to configure this in Slack?
 
Old 05-17-2005, 11:02 AM   #2
datadriven
Member
 
Registered: Jun 2003
Location: Holly Hill, Florida
Distribution: Slackware 10.1
Posts: 317

Rep: Reputation: 30
The keys & essid go in /etc/rc.d/rc.wireless.conf
 
Old 05-17-2005, 11:40 AM   #3
chud67
Member
 
Registered: Jul 2004
Location: San Antonio, TX, USA
Posts: 34

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by datadriven
The keys & essid go in /etc/rc.d/rc.wireless.conf
Thanks. Btw could you post a sample rc.wireless.conf file? I looked inmy /etc/rc.d/ and I don't seem to have one. Thanks again.
 
Old 05-17-2005, 01:07 PM   #4
killerbob
Member
 
Registered: Oct 2004
Location: Ottawa, ON
Distribution: Slackware
Posts: 662

Rep: Reputation: 31
Rather than using rc.wireless.conf, you could do what I'm doing... I have a script that sets the values for me. I find that with rc.wireless.conf, it doesn't really help. With my laptop, I connect to several different wireless nets, and I can't set the options in rc.wireless.conf, because I would need to boot up, change the values accordingly, and then run rc.inet1.

Instead, I wrote a script and called it from rc.local. This script asks which wireless net I want to use, and then sets the card accordingly.

Here's the script, edited for content.

Code:
#!/bin/bash
# New wlan-up script, prompt for which wireless LAN AP we want to use.

# I am deliberately not putting in a WHILE loop. I want it to skip the setup of the WLAN if I
# don't tell it to specifically use one of the lans.

# Global variables:
INTERFACE="ath0"
ESSID="no-essid"
KEY="none"
TIMELIMIT=5

# Show the menu:

echo ""
echo "-=-=-=- Choose a Wireless AP for connection -=-=-=-"
echo "a. Home 54mbit - Bedroom end of house"
echo "b. Home 11mbit - Dining room and Sun Room"
echo "c. University Library"
echo ""
echo "-=-=- Type anything else to cancel connection -=-=-"

read -t ${TIMELIMIT} choice

case $choice in a)
  ESSID="essid1"
  KEY="key1"
esac

case $choice in b)
  ESSID="essid2"
  KEY="key2"
esac

case $choice in c)
  ESSID="essid3"
esac

if echo "${ESSID}" | grep -q "no-essid"
then
  echo "*** Exiting without configuring LAN. You can reinvoke it with /sbin/wlan ***"
else
  echo ""
  echo "Enabling ${INTERFACE}"
  ifconfig ${INTERFACE} up
  echo "  Setting ESSID"
  iwconfig ${INTERFACE} essid ${ESSID}
  sleep 2

  if echo "${KEY}" | grep -q "none"
  then
    echo "  Configuring for access without encryption"
  else
    echo "  Setting Network Key"
    iwconfig ${INTERFACE} key ${KEY}
    sleep 2
  fi

  echo "  Obtaining DHCP"
  killall dhcpcd
  sleep 1
  dhcpcd ${INTERFACE}
fi
As you can see, it's very easy to add extra wireless nets to the configuration file. Just update the menu, and add a new case declaration following the same format as above. I've set it to timeout without setting up the wlan if I don't make my choice in 5 seconds, or if I don't make a valid choice.

I find this script allows me more leeway, in that it gives me a chance to choose which wireless net I'm going to use, and it also lets me choose whether or not to have encryption enabled just by whether or not I set a variable.

HTH.
 
Old 05-17-2005, 02:39 PM   #5
chud67
Member
 
Registered: Jul 2004
Location: San Antonio, TX, USA
Posts: 34

Original Poster
Rep: Reputation: 15
Cool, thanks.
 
Old 05-17-2005, 04:00 PM   #6
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, OpenSuSE
Posts: 1,839

Rep: Reputation: 242Reputation: 242Reputation: 242
The CLI rules, of course, but sometimes GUI tools can be helpful. So if you use KDE you may want to try KWifiManager. There's probably something similar for GNOME, I just don't know.

gargamel
 
Old 05-17-2005, 04:38 PM   #7
coffeedrinker
Member
 
Registered: Sep 2003
Posts: 173

Rep: Reputation: 30
For a PCMCIA card you don't use /etc/rc.d/rc.wireless.conf.

You have to use the one in /etc/pcmcia
 
Old 05-17-2005, 07:26 PM   #8
Cheiron
LQ Newbie
 
Registered: Aug 2004
Location: On. Canada
Distribution: Slack 10.2 and Slack 8.1
Posts: 23

Rep: Reputation: 15
wifi

Quote:
At work recently we got wireless access but it has a key and essid. Anyone know how to configure this in Slack?
You could also do:

iwconfig wlan0 essid XXXXXXX key XXXXXX...XXXXX
then
ifconfig wlan0 up
then
dhcpcd wlan0

Just replace wlan0 with the name of your wifi interface (like eth1... etc) and X'es with your values and you're good to go.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Broadcom Wireless (BCM4306) Wireless problems: modprobe ndiswrapper freezes HP Laptop shthap3ns Linux - Hardware 11 02-11-2007 12:53 PM
Trouble installing wireless-tools & trying to install Wireless PCI pragmatic Linux - Wireless Networking 1 06-21-2005 07:39 AM
wireless problems; Broadcom 802.11G Mini PCI Wireless with redhat WS surfbass Linux - Laptop and Netbook 1 12-17-2004 12:48 PM
need wireless internet help mandrake 10 dell inspiron 510m intel wireless 2100 3A nickleus Mandriva 3 11-09-2004 09:52 PM
connecting to the internet via wireless through Intel PRo/Wireless LAN 2100 3B Mini P k_wjss Linux - Newbie 1 09-28-2004 05:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration