Tips Linux Explorers   All Things Linux Forum   Great Linux Links   LinuxClues.com   Hometown   Email 



CONFIGURING WIRELESS USB
( When All Else Fails )


Here is another trick from Julia ( aka teacher ). If you can not get your regular wifi card configured get a cheap $10 USB wireless adapter and configure that one. ( The next tip will show you what brands are best for this )

QUOTE (Julia @ Forum 2005)

If everything else has failed you will want to take a look at this
script and adapt it to fit your installation.  It just might be the answer to your wireless woes.  This wlan script will run through the various settings to make sure everything is correct.  If it stops after a specific step, then go back and look at how you have that step configured.  Keep in mind that if you are running encrypted you will set your wep attributes to true and false if you are not. 

Remember that the default SSID is "Default".  I use a different one so must change it to what I use.  You do not use quotation marks when putting in your ssid or authtype.  Managed means you do not use WEP and Open means you do.


The wep key is given in two character increments with each two characters followed by a colon.  This took me a long time to figure out.  If you are not running wep then you can simply put a # in front of the lines that set the wep key.  This will comment out those lines. The bottom lines with the ifconfig wlan0 followed by 192.etc. will need to be filled in with what you find when you look at your router's configuration.  You may also correctly find the numbers by looking at another distro on your given computer.  The gw took me a while to figure out as well.  In this case gw is not gross weight but instead stands for "gateway". biggrin.gif 

On your router you will have a number of options for encryption keys.  Mine numbers them from 1 to 4.  These numbers do not match in Linux.  Linux would number these same keys as being 0 to 3.  Be sure to subtract one from what your router specfies as the WEP encryption key.

Wlan Script:

CODE
#! /bin/sh
#
#Wireless USB setup
#
#step 1 - enable wireless USB for wlan0
wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable
# step 2 - set SSID for network SSID requires OpenSystem while a system
without encryption would be Managed Authtype will be opensystem or
managed.
wlanctl-ng wlan0 lnxreq_autojoin ssid=**** authtype=****
# step 3 - set wep attributes  True for Encrypted and False for Not.
wlanctl-ng wlan0 lnxreq_hostwep encrypt=true decrypt=true
#step 4 set wep key if running encrypted.  Key 1 in windows is Key 0 in
Linux.  Key 2 in Windows is Key 1 and so on.  
wlanctl-ng wlan0 dot11req_mibset mibattribute=dot11WEPDefaultKeyID=*
wlanctl-ng wlan0 dot11req_mibset
mibattribute=dot11WEPDefaultKey1=**:**:**:**:**:**:**:**:**:**:**:**:**
#step 5 - set IP configuration  Sample IP, Netmask and Gateway shown:
Replace with what you use.
ifconfig wlan0 192.168.0.103 netmask 255.255.255.0 broadcast
127.255.255.255 route add default gw 192.168.0.102


When you are finished configuring this to your situation, save it as
wlanscript.

CODE

# chmod 755 wlanscript
# ./wlanscript


 Notes: If you use a SSID name other than default you will find a file
called /etc/wlancfg/wlancfg-*****.  (Replace ***** with the name of your
network).  If that does not automatically happen when you insert your
SSID then go in and edit /etc/wlancfg/wlancfg-DEFAULT and save
as /etc/wlancfg/wlancfg-(your name).

If all else fails, run
 
CODE

# ifup wlan0

to try to bring up your network manually.

Good Luck!

* If you asked for patience, you will know now that you have been tested to see if you need more patience.



In the next issue Julia will list a number of resources to find a suitable card or USB adapter.

Thanks Julia !



Bruno


-- Mar 8 2005 ( Revised Dec 13 2005 ) --


Tips Linux Explorers   All Things Linux Forum   Great Linux Links   LinuxClues.com   Hometown   Email