-   Linux - Wireless Networking (
-   -   iwconfig ( wireless lan ) questions (

Belize 11-30-2003 01:51 PM

iwconfig ( wireless lan ) questions
Today I installed slackware 9.1 on my laptop. I have pcmcia wireless Lucern Cabletron 802.11 card.
I want to make my wireless lan work ( which connects me to the internet ) and in IRC a guy told me to use iwconfig to set it up.
I used iwconfig eth0 --help and got aware of the options, but they dont work :)
Only two worked - to change the SSID and the Nickname of the wireless network. The command for the network key ( which I should enter, so my wireless lan work ) is nic. The options if I remember right are {NNNN|off} and I tried iwconfig -eth0 nic *key* or iwconfig -eth0 nic on but they wouldnt work. Can you please help with this - how to enter those iwconfig settings and explain if I have to edit some other settings.
Thanks in advance! I will really appreciate any help. Peace

2Gnu 11-30-2003 02:46 PM

The syntax for setting up WEP for your card is:
iwconfig eth0 key 1234567890abcde ... (26 hex digits in all for 128 bit WEP)
I see what you mean about iwconfig -h and the options listed. I've never used those and I'm at a loss to explain the discrepancy, but try man iwconfig. The options there work fine for me.

FYI, to store the values (iwconfig settings are transient), edit /etc/pcmcia/wireless.opts. Use the generic settings at the bottom of the file.

Belize 11-30-2003 03:22 PM

hi, I booted and tried iwconfig eth0 key *KEY* and wouldnt work
also ( I am trying examples from man iwconfig ) I tried iwconfig eth0 mode auto which wouldnt work as well.

I copied wireless.opts before editing and there I deleted all those drivers for the other pcmcia wireless cards I dont need. But this configuration file is poorly commented, at least I cant understand it. Should I edit the driver for my Lucern(sp?) Cabletron card, or should I enter the generic options ?

Also, I cant understand this HEX key thing. In wireless.opts, should I edit my key ( the normal word ) or if the only way is to write it in HEX, how can I transform it in HEX ? and in the comments to the key section there is something like "s:key", should I write an s: before the key ???


bbeers 11-30-2003 03:54 PM

Did you post this same question in two forums??

Which chipset is this card? cardctl ident
Which driver is loaded for this card? lsmod

What does iwconfig eth0 return?

Are you trying to associate to an access point or connect via peer-to-peer?
Mode argument for access point is managed, for peer-to-peer is adhoc,
to _be_ the access point is master. (there are even more modes btw)

To convert ascii to hex check the ascii table at ...
or you can put the s: prefix in front of the plain text key word, but
some access points don't convert exactly the same way, plus hex
values are harder to guess.

I recommend you delay worrying about the WEP keying until you are sure
you are even connecting wirelessly.

2Gnu 11-30-2003 04:25 PM

Don't know what you're using as a key, but for 128 bit WEP you need 26 hexadecimal characters. There are lots of utilities that hash an alphanumeric word or phrase into a hex key, but that leaves you open to dictionary attacks. I use a spreadsheet to generate keys, but there are lots of pseudo-random generators around (with their own issues).

Here is my wireless.opts file for reference (the WEP key is obviously bogus) Removing the comments and unused functions, I could have three lines - ESSID, WEP and mode :
# Generic example (decribe all possible settings)
INFO="Fill with your own settings..."
# ESSID (extended network name) : My Network, any
# NWID/Domain (cell identifier) : 89AB, 100, off
# Operation mode : Ad-Hoc, Managed, Master, Repeater, Secondary, auto
# Frequency or channel : 1, 2, 3 (channel) ; 2.422G, 2.46G (frequency)
# Sensitivity (cell size + roaming speed) : 1, 2, 3 ; -70 (dBm)
# Bit rate : auto, 1M, 11M
# Encryption key : 4567, sassword
# RTS threshold : off, 500
# Fragmentation threshold : off, 1000
# Other iwconfig parameters : power off, ap 01:23:45:67:89:AB
# iwspy parameters : + 01:23:45:67:89:AB
# iwpriv parameters : set_port 2, set_histo 50 60

Belize 12-01-2003 04:02 AM

bbeers : yeah I posted this thread also in the slackware forum. Crossposting is bad, I know, but I want to have as much help as I can ( moderators can close the one in slackware )

Im not really sure for the mode, but in winXP it is "Auto", and not "Managed". I just had to enter the SSID and WEP key and voila! - it worked.

I will post the output of cardctl ident, lsmod amd iwconfig later as I am now in the library and not in my room.

And I will have to read again what you guys wrote about the hex key thing to understand it :)

Thank you very much for helping me

Belize 12-01-2003 02:53 PM

As long as I dont have internet, or a FAT partition where to copy the output of the commands, I am writing them in a notebook and after that copying them here.

root@Belize:~#cardctl ident
Socket 0:
  product info: "Cabletron", "RoamAbout 802.11 DS", "Version 01.01", ""
  manfid: 0x0156, 0x0002
function: 6 (network)

Module            Size          Used by
orinoco_cs      4276          0 (unused)
orinoco          33324        0 [orinoco_cs]
hermes          5732          0 [orinoco_cs orinoco]
ds                  6568          1 [orinoco_cs]
yenta_socket 10368        1
pcmcia_core  40032        0 [orinoco_cs cs yenta_socket]

lo no wireless extensions

eth0 IEEE 802.11-DS    ESSID:""    Nickname:"HERMES I"
    Mode: Managed  Frequency: 2.422GHz  Access Point:00:00:00:00:00:00
    Bit Rate: 11MB/s    Tx-Power=15dBm    Sensetivity:1/3
    Retry Limit:4 RTS thr: off Fragment thr: off
    Encryption key: off
    Power managment: off
    Link Quality 0/92  Signal Level:134/153    Noise Level:134/153
    Rx invalid nwid:0    Rx invalid crypt:0 Rx invalid frag:0
    Tx excessive retreies:0  Invalid misc:0    Missed beacon:0

eth1 no wireless extensions

If you have other questions, please ask.
Thanks for helping!

bbeers 12-01-2003 04:08 PM

Ok, looks reasonable so far. No ESSID name and Access Point:00...
means you are not associated to an access point yet.

Which access point are you using? Do you know the ESSID?
Like linksys, or whatever you may have changed it to.
You should be able to issue a command like:
#iwconfig eth0 essid linksys
(the # at the beginning of the line is the prompt when you are root,
you don't type it.)
then check
#iwconfig eth0
your Access Point:xx:xx:xx: should now match the access point's MAC addr.

Then if you _need_ WEP key, verify from the access point which of 4 keys
is active, set same key active on linux, maybe something like this:
#iwconfig eth0 key s:CoDe [1] key s:BIGsecret [3] key [3]

And then finally, try this to get an IP address:
#dhcpcd eth0

or if you prefer just set a static IP with ifconfig eth0 whatever, but then
you have to add a default route and set domain name servers in /etc/resolv.conf

Lot's to do/learn, but it does work. :grin:

Belize 12-02-2003 11:32 AM

dude, THIS WORKS !

Thank you ppl so much for helping, now I write this post with Konqueror :) rox

Now, to make those commands be started automatically when I boot, should I add them to rc.local ?

Any other additional information/help will be great too.

Again thanks for helping ! :)

Belize 12-02-2003 11:47 AM

yeah I added to rc.local

ifconfig eth0 essid *ESSID*
ifconfig eth0 key s:*KEY*
dhcpcd eth0

and it works

bbeers 12-02-2003 02:28 PM


You should be able to set those iwconfig params in the /etc/pcmcia/wireless.opts file
and the dhcpcd in the /etc/pcmcia/network.opts file and have it work automatically
when you boot or remove/replace the pcmcia card.

But it's okay to put it in rc.local if you're going to leave the card in all the time.

All times are GMT -5. The time now is 02:33 PM.