Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Gentoo wireless tools howto
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
cramhead
n00b
n00b


Joined: 27 Jun 2004
Posts: 1

PostPosted: Mon May 30, 2005 4:46 am    Post subject: Gentoo wireless tools howto Reply with quote

I've always had difficulty setting up wireless on linux, so I decided to actually learn some stuff and define a mechanism that actually works; at least
for me.

In hopes that this helps others I have posted this little write up

How to get wireless working with wireless-tools

GIVEN the pcmcia card has already been recognized.

iwconfig returns information about your card. Something like following:

lo no wireless extensions.

eth0 no wireless extensions.

eth1 IEEE 802.11-DS ESSID:"my essid" Nickname:"liquid"
Mode:Managed Frequency:2.412 GHz Access Point: 00:09:5B:3F:7A:A0
Bit Rate:11 Mb/s Tx-Power=15 dBm Sensitivity:1/3
Retry min limit:8 RTS thr:off Fragment thr:off
Encryption key:my encyption key Security mode:open
Power Management:off
Link Quality=64/92 Signal level=-52 dBm Noise level=-149 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0



Overview:
Step 1. edit the /etc/pcmcia/wireless.opts file to configure the pcmcia card so that it knows how to attach to your network.
Step 2. edit the /etc/conf.d/net so that the system knows to use specific tcp/ip settings and dhcpcd

Details:
Step 1.
1) Backup the /etc/pcmcia/wireless.opts to something like /etc/pcmcia/wireless.opts.original
2) Remove everything from the wireless.opts file but the case delimiters and the generic example

It should look like the following:
case "$ADDRESS" in
# Generic example (decribe all possible settings)
*,*,*,*)
INFO="Fill with your own settings..."
# ESSID (extended network name) : My Network, any
ESSID=""
# NWID/Domain (cell identifier) : 89AB, 100, off
NWID=""
# Operation mode : Ad-Hoc, Managed, Master, Repeater, Secondary, auto
MODE=""
# Frequency or channel : 1, 2, 3 (channel) ; 2.422G, 2.46G (frequency)
FREQ=""
CHANNEL=""
# Sensitivity (cell size + roaming speed) : 1, 2, 3 ; -70 (dBm)
SENS=""
# Bit rate : auto, 1M, 11M
RATE=""
# Encryption key : 4567-89AB-CD, s:password
KEY=""
# RTS threshold : off, 500
RTS=""
# Fragmentation threshold : off, 1000
FRAG=""
# Other iwconfig parameters : power off, ap 01:23:45:67:89:AB
IWCONFIG=""
# iwspy parameters : + 01:23:45:67:89:AB
IWSPY=""
# iwpriv parameters : set_port 2, set_histo 50 60
IWPRIV=""
;;
esac

3) Remove any options that you are not going to use.

This left me with the following:
case "$ADDRESS" in
# Generic example (decribe all possible settings)
*,*,*,*)
# ESSID (extended network name) : My Network, any
ESSID=""
# Encryption key : 4567-89AB-CD, s:password
KEY=""

;;
esac

4) Fill in the ESSID and KEY. Note:these values are case sensitive

5) When you eject your card and reinsert it the values of the wireless.opts file should appear in the appropriate place when you type iwconfig. If not check the /var/log/everything/current log. It may give you indications of formatting errors.

6) When the values appear when you type iwconfig then you likely ready for step 2

Step 2:
The goal of this step is to get an IP address, a gateway and a subnet mask. This involves two steps:
1) type ifconfig. Output should be something like the following:
eth1 Link encap:EthernetHWaddr 00:08:0D:9A:29:0C
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:590 (590.0 b)
Interrupt:11 Base address:0xcf00


lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:26 errors:0 dropped:0 overruns:0 frame:0
TX packets:26 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1300 (1.2 Kb) TX bytes:1300 (1.2 Kb)

eth1 is my wireless card.
When I have an IP address, BROADCAST MULTICAST is replaced with an IP address.
What I had to do was to edit /etc/conf.d/net. The working copy of the file is the following:

# Global config file for net.* rc-scripts

# This is basically the ifconfig argument without the ifconfig $iface
#
iface_eth0="192.168.0.2 broadcast 192.168.0.255 netmask 255.255.255.0"
iface_eth1="192.168.0.2 broadcast 192.168.0.255 netmask 255.255.255.0"

# For DHCP set iface_eth? to "dhcp"
# For passing options to dhcpcd use dhcpcd_eth?
#
iface_eth0="dhcp"
iface_eth1="dhcp"
#dhcpcd_eth0="..."

# For adding aliases to a interface
#
#alias_eth0="192.168.0.3 192.168.0.4"

# NB: The next is only used for aliases.
#
# To add a custom netmask/broadcast address to created aliases,
# uncomment and change accordingly. Leave commented to assign
# defaults for that interface.
#
#broadcast_eth0="192.168.0.255 192.168.0.255"
#netmask_eth0="255.255.255.0 255.255.255.0"


# For setting the default gateway
#
#gateway="eth0/192.168.0.1"

Note: I do have a built in ethernet card so I have an eth0 your pcmcia card is likely to be eth1, but it could be different. The easiest way to find out is compare the output of ifconfig with the pcmcia card in and with it out.

The line iface_eth1="192.168.0.2 broadcast 192.168.0.255 netmask 255.255.255.0"
seems to define an static IP for the ethernet card, but it didn't seem to work without it. It really didn't seem to use the IP specified.

The line iface_eth1="dhcp" basically states that you want to use dhcpcd.

In the /etc/init.d directory there exists a file net.eth0. I had to make a symbolic link to it with the name net.eth1. I imagine this gives a name to reference to pcmcia card that the system refers to as eth1.

Good luck
Back to top
View user's profile Send private message
rutski89
Guru
Guru


Joined: 14 Mar 2005
Posts: 468
Location: United States N.Y.

PostPosted: Mon May 30, 2005 5:34 am    Post subject: Reply with quote

I've not read your how-to yet. This is a much needed guide :D . Personally, I've found WiFi on gentoo not worth the toil and trouble 8O . Thank you so much for making this post, I'm sure it will benefit a good deal of people; I'll be sure to check back if I ever set up WiFi as well. You might want to move it to the "Documentation, Tips, and Trick" forum here https://forums.gentoo.org/viewforum-f-12.html before a moderator does :roll:
_________________
<< ^ | ~ >>
Back to top
View user's profile Send private message
Maedhros
Bodhisattva
Bodhisattva


Joined: 14 Apr 2004
Posts: 5511
Location: Durham, UK

PostPosted: Mon May 30, 2005 9:38 am    Post subject: Reply with quote

rutski89 wrote:
You might want to move it to the "Documentation, Tips, and Trick" forum here https://forums.gentoo.org/viewforum-f-12.html before a moderator does :roll:
Too late. :P Besides, only moderators can move posts, and starting a new one in a different place isn't recommended. :wink:

Moved from Networking & Security to Documentation, Tips & Tricks.
_________________
No-one's more important than the earthworm.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum