VectorLinux

Getting you started => How to's => Topic started by: easuter on December 21, 2006, 01:58:45 pm

Title: HowTo: Configure your Wireless Network
Post by: easuter on December 21, 2006, 01:58:45 pm
Wireless Networking with VectorLinux 5 and above

Introduction:

In light of the growing demand for help with wireless hardware and networking, this HowTo should cover the basics that anyone can follow to get "on the air".
This HowTo will cover wireless networking using VectorLinux 5 and above.

It includes using wireless 802.11A/B/G standards and will also included help for the usage of WEP and WPA protocols.
It will be updated when necessary with new information about wireless networking and new tools that may make it easier to use wireless networks.

I suggest you read through the HowTo first before getting started. There are a few sections that assume you have Internet access to look up names or download drivers, but this may not be your case, so it will be better to read first and find which sections cover your specific needs better.


Lets get started!

 - Step 1: Know if your hardware works

The very first thing you should do is to find out if a certain card is known to work with Linux before you buy it. Even if a native driver is not availible, then NdisWrapper is usually the next best thing, but it is not 100% fail-safe either!
I suggest that you visit this website, for information on wireless cards:

http://linux-wless.passys.nl/

You can select a brand, bus type (USB, PCMCIA, PCI, etc) or chip type as a filter, but the easiest is probably to find a card in a store, write down the name and model, and then search for it on that site.
So, select the brand name and then press the "Show" button.
A list will be presented to you, and is self-explanatory.

Should you have purchased a card before consulting the compatibility list, chances are still good that it will work, but you might need to keep your fingers crossed for luck. ;)

- Step 2: Making sure your card is detected

Before getting worked up about modules, VASM,NdisWrapper, configuration files and the like, take a deep breath...think clearly and work calmly. Rushing things inevitably leads to screw-ups and even more work.

Now open a terminal, logon as root and issue the following commands (as root):

If you have a PCI or CardBus/PCMCIA wireless card:

Code: [Select]
lspci
If you have a USB card/dongle:

Code: [Select]
lsusb
You will be presented with a list of all the devices connected to that bus type, and you must try and locate the entry that belongs to your card.
For example, the output of lsusb on my computer is:

Code: [Select]
Bus 1 Device 1: ID 0000:0000
Bus 1 Device 2: ID 0409:0058 NEC Corp. HighSpeed Hub
Bus 1 Device 4: ID 0000:0000
Bus 1 Device 3: ID 083a:4505 Accton Technology Corp.
Bus 2 Device 1: ID 0000:0000
Bus 3 Device 1: ID 0000:0000
Bus 4 Device 1: ID 0000:0000
Bus 5 Device 1: ID 0000:0000

So, analyzing the output I got from lsusb, i can see my USB hub connected on Bus1-Device2. Since i have nothing else connected to my USB ports, the next entry has to be my wireless card.
The brand name presented for my card by lsusb is not consistent with the brand name on the box the card came in (I have an SMC USB dongle), but that can be explained because the chip inside the card was probably not manufactured by SMC Corp.
So, once you find out which entry is most likely your card's, the really important piece of information is the ID number.
In my case, it is 083a:4505
Write down the ID number for your card, and then if possible, use Google to search for the web for it.
After "Googling" my card's ID number, surely enough websites popped  up leading to SMC's website, and other indicating that that number refers to a Zydas ZD1211 wireless chip. Perfect!
After knowing what chip your card carries, things get a lot easier.

- Step 3: Get your card and computer talking

a ) With a native Linux module

To try to get your card communicating with VectorLinux, the first thing you should try is VASM's hardware auto-detect utility.
Still using your terminal and logged on as root, type: (save anything you were working on before doing this, because X server will shut down)

Code: [Select]
init 2
You will be dumped into text-mode, where VASM can analyze things properly :)
Login as root once again, and then simply type:

Code: [Select]
vasm
And hit enter. The familiar VASM interface will appear. Navigate through the menu to HARDWARE ---> HWCONF and press enter.
Your harware will be probed, and you should see whether your new card has been detected.
Once it has finished you can exit VASM and start X again by giving this command:

Code: [Select]
init 4
As soon as you have logged in again,open a terminal and type:

Code: [Select]
cat /etc/modprobe.conf
You should see text being displayed in your terminal window, that looks something like this:

Code: [Select]
# /etc/modprobe.conf (old location for Linux 2.6+ config)
#
# The use of this config file is deprecated if you are using a
# 2.6.x or newer kernel.  Instead, create files in the
# /etc/modprobe.d/ directory containing modprobe options.
#
# For more information, see "man modprobe.conf".

alias eth0 ne2k-pci
alias wlan0 zd1211b

The actual contents of the file may vary, but i'm giving mine as an example.
If you have an ethernet card, then there should be a line called "alias eth0 xxxxx", where xxxxx stands for the network card's module name.
If your wireless card was detected by VASM, then another entry should appear called "alias wlan0 xxxxxx", or maybe "alias eth1 xxxxxx".
If that is the case, then your network interface has been properly created.

It might also happen that VASM failed to find a module for your card and thus, did not create a new alias.
In that case, please refer back to your cards ID number you got earlier on, and search Google for it again, combining the ID number with terms like "linux" and "module". Example, place this in the search bar:

083a:4505 module

Once you find a suitable module name, you can try inserting the module.
In your root terminal, type these commands:

Code: [Select]
depmod -aq
modprobe xxxxxxxxx

Where xxxxxxx is the name of the module you looked up.
In my case, the module name was zd1211b, so I typed:

Code: [Select]
modprobe zd1211b
If after you typed those commands and got no errors, then you know that you have the right module in place to get your card going. So next, you can add the alias manualy to /etc/modprobe.conf. Run this:

Code: [Select]
mcedit /etc/modprobe.conf

At the end of the file, create a new alias that will look like this:

Code: [Select]
alias wlan0 xxxxxxxxx
Replace xxxxxxx with the name you used in the modprobe command.
Aliases are necessary to tell the kernel to "link" a module or driver to a word. This way you can use the alias to set up a hardware interface that you can work with, and to be able to interact with the module.

If you are using VectorLinux 5.8 or above, if your card does have native support then the module will be loaded automaticaly.
VectorLinux 5.8 uses ifplugd to monitor network interfaces and try and connect to the ones it was assigned to.

You may want to add wlan0 (or whatever network interface you assigned to your card) to ifplugd.
Open /etc/ifplug.d/ifplugd.conf with you editor and find the line that looks like this:

INTERFACES="eth0"

Add your network interface to that line, so it should look like this:

INTERFACES="eth0 wlan0"

When a new interface has been added to ifplugd then it must be restarted.
You can restart ifplugd with the following command:

Code: [Select]
service ifplugd restart

But I have found that sometimes I need to reboot to get the interface up and running with ifplugd, although simply restarting it is fine most of the times.

On the other hand, you may also have run into an error when trying to modprobe the module name you found with Google. If so, then you have two options: You can visit the website of the company that manufactured your card's chip or you can use NdisWrapper to try and use a Windows XP driver as a substitute.

If you decide to go with the first option, then you might need to compile the module for your card by yourself, since all the manufacturers don't provide a read-made module for you. This might be the toughest path if you are not familiar with compiling software from source because you might also need additional libraries and the source code for your kernel too. Read the information provided with the source code carefully and think where its worth your time going to that effort.

b ) Using NdisWrapper

The next best option is to use NdisWrapper. NdisWrapper is a module that "wraps arround" a Windows network driver, allowing the Linux kernel to work with it. NdisWrapper is known to work exceptionally well and can replace the native Linux module for your card should it not exist or be to hard to obtain.
However, it is not 100% fail-safe so don't expect miracles!

You might find NdisWrapper to be your only recourse if you don't have any internet connection to search for information regarding the native Linux kernel modules for your card or download the appropriate module source code. NdisWrapper allows you to do (nearly) everything offline.
NdisWrapper is very easy to use, even though its a command-line tool (at least for now).
Your wireless card was certainly accompanied by an installation CD that contains the Windows XP drivers for your card, but it is recomended that you first visit the following website to know if there are any Windows drivers for your card recommended by the NdisWrapper team:

http://ndiswrapper.sourceforge.net/mediawiki/index.php/List

Get the right driver from the manufacturer's website, and unzip it into a folder on your hard-drive.

If you don't have any way to access the website, then you will have to use the Windows XP drivers provided on the CD that was supplied with the card.
Windows XP drivers are files that end with a .inf extension. So, when looking for the Windows driver for your card, you must find a file that ends in .inf.

As soon as you locate the driver, then open up a terminal as root and navigate to the directory where the driver is:

cd /xxx/xxx/xxx

Replace /xxx/xxx/xxx with the path to the folder.

Type:

Code: [Select]
ls
that will list the contents of the folder.
Next, you must insert the driver into NdisWrapper, using the following command:

Code: [Select]
ndiswrapper -i drivername.inf
Replace drivername with the name of the Windows driver you want to use (and don't forget to included the .inf extension at the end!)
When you hit enter no errors should occur.
There should also be a file that has a .sys extension, and it must be in the same folder as your .inf driver.

Now, check to see if NdisWrapper is able to make that driver find your card using:

Code: [Select]
ndiswrapper -l
You will be given a list of currently installed drivers, and their status:

Code: [Select]
2802w           driver installed
airplus         driver installed
bcmwl5          driver installed
gplus           driver installed
mrv8ka51                driver installed, hardware present
net8180         driver installed
netadm11                driver installed
netdlwl         driver installed
ntpr11ab                driver installed
w70n51          driver installed

If all goes well, the line that corresponds to the driver you just installed will say "driver installed, hardware present".
If it doesn't have "hardware present" on that line, then your card is not being detected.
Now, you need to create an alias for your card that links to the ndiswrapper module, as you would do with a native module.
You can do this by typing:

Code: [Select]
ndiswrapper -m
However, you should make sure that it was actually created before proceeding, so type:

Code: [Select]
cat /etc/modprobe.conf
Some text will be displayed in your terminal, and make sure that there is an entry called

alias wlan0 ndiswrapper

If there isn't then add it yourself to the end of modprobe.conf:

Code: [Select]
mcedit /etc/modprobe.conf
You are finally ready to try out NdisWrapper and see if it works!
Enter these commands to get NdisWrapper's module running:

Code: [Select]
depmod -aq
modprobe ndiswrapper

If there were no errors, then you have NdisWrapper up and running!

Follow the same procedure as mentioned above for adding wlan0 to ifplugd, if you are using VectorLinux 5.8 or higher.

Note for VectorLinux 5.8 Standard users:
Use GSlapt or slapt-get to update NdisWrapper to the version provided in the repository.


Step 4 - Getting connected

I) Doing it Old-School

a ) Open Network (without WEP or WPA/WPA2)

Now that your card and computer are not ignoring each other, you can proceed to connect to your router or access point.

If you are connecting to an open network (no keys, no encryption), then this part is for you.
Otherwise if you're using WEP or WPA, skip to the next section.

Connecting to an open network is probably the easiest and requires very little effort and configuration.
However, if you are using an open network at work, it might not be a very wise idea if you have valuable data to protect.

If you are a casual home user without a care in the world, you don't mind having war-drivers camped out in front of your house 24/7, follow this section and you should have your wireless network up-and-running in no time.

Open a terminal as root and type

Code: [Select]
ifconfig
If you have VectorLinux 5.8 and you have added your wireless interface to ifplugd, then you should see something like this:

Code: [Select]
eth0      Link encap:Ethernet  HWaddr 00:40:33:91:C0:F5
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:2 dropped:0 overruns:0 carrier:4
          collisions:34 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:1180 (1.1 KiB)
          Interrupt:10 Base address:0xdf20

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:5648 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5648 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:282400 (275.7 KiB)  TX bytes:282400 (275.7 KiB)

wlan0       Link encap:Ethernet  HWaddr 00:13:F7:1E:D5:58
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:15235 errors:0 dropped:0 overruns:0 frame:0
          TX packets:94505 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1949939 (1.8 MiB)  TX bytes:0 (0.0 b)
          Interrupt:11


If you can't see your interface because you did not add it to ifplugd or you aren't using VL 5.8, then issue this command to get it going:

Code: [Select]
ifconfig wlan0 up
Replace wlan0 with whatever your network interface is.
The next step is to see you are within range of your access-point or router, and to see what details it broadcasts:

Code: [Select]
iwlist wlan0 scan
You should get something like this:

Code: [Select]
wlan0          Scan completed :
                    Cell 01 - Address: 00:13:F7:33:86:F9
                    ESSID:"SMC"
                    Mode:Managed
                    Channel:13
                    Encryption key:off
                    Bit Rates:132 Mb/s

I've noticed that when using NdisWrapper, the output of that command is normaly more detailed than when using native Linux kernel modules.

As you can see, my router broadcasts its SSID as well as other data.
Sometimes routers or accesspoints won't broadcast their SSID as a "safety measure".

Now to see what data your wireless interface has ready before connecting:

Code: [Select]
iwconfig wlan0
You should see what details are already there.
To configure your interface with the information required, issue these commands (preferably in this order as well):

Code: [Select]
iwconfig wlan0 essid xxxxx
Replace xxxxx with your router's SSID, if it does not broadcast it automaticaly. If you SSID is comprised of several words, then you will need to wrap it with quotes:

Code: [Select]
iwconfig wlan0 essid "xxxx xxxx xxx"
Set your card's mode to Managed (Ad-Hoc is applicable in some cases, but normaly the Managed mode is the most common. You may also use the Auto mode, but this sometimes leads to miss-configurations):

Code: [Select]
iwconfig wlan0 mode Managed
Set you card to receive on any channel:

Code: [Select]
iwconfig wlan0 channel Auto
If your router is not set to auto-configure the channels and is set on a particular one, then replace Auto with the channel number.

Lastly, you must let your card know it can associate to any available access-point:

Code: [Select]
iwconfig wlan0 ap any
Now run iwconfig wlan0 again, and the data you just entered should appear in the output.
After you finished the above instructions, you can use DHCP to connect to establish a connection with your router (only if your router or access-point is configured to hand out DHCP connections, which they normaly are by default). This can take less than a second or up to a minute, depending on your drivers and your card, the router, and the signal strength/quality.

Normaly 25 seconds is enough, so you can start the network using dhcp with this command:

Code: [Select]
dhcpcd -t 25 -d wlan0
Your MAC address will appear in the terminal window, and as soon as a connection is established your IP address will appear as well.


b ) With WEP

So you want some extra protection eh? WEP is ok for preventing people form "accidentaly" connecting to your wireless network.
I say this because the WEP protocol has proved to be a VERY weak means on encrypting wireless networks. Programs such as aircrack and collect data from a WEP encrypted network and decipher the keys in no time.
At least someone who does manage to use a WEP connection without authorization can't say it was by mistake, because they do need to go out of their way to get in...

Configuring your interface to use WEP is nearly as easy as when using an open network.

Scan for your network details with iwlist, as done above, and you should get a similar output:

Code: [Select]
wlan0          Scan completed :
                    Cell 01 - Address: 00:13:F7:33:86:F9
                    ESSID:"SMC"
                    Mode:Managed
                    Channel:13
                    Encryption key:on
                    Bit Rates:132 Mb/s

Notice that the scan reveals that the network requires an encryption key.

The first iwconfig command to issue to your interface if the key command.
You can use either HEX keys  or ASCII keys, depending on what you put into your router.
To use a HEX key, simply type:

Code: [Select]
iwconfig wlan0 key xxxxxxxxxx
Replace xxxxxxxxx with your HEX key. A HEX key is a mix of numbers and letters from A to F.

If you have ASCII version of you key, then use:

Code: [Select]
iwconfig wlan0 key s:xxxxxx
Replace xxxxxx with your ASCII key. Note that the ASCII keys are always shorter than HEX ones, so they are more practical to remember.

Now run iwconfig wlan0 again, and you should see your key in the output, under HEX form.

After this is done, you can use the rest of the instructions of the Open Network configuration to get your connection up and running.

To those who use VectorLinux 5.8 Standard:
You will notice that the WaveLan applet on the XFCE taskbar only starts indicating the presence of a signal once the WEP key has been entered.



c ) With WPA/WPA2

The only way to really connect to a WPA protected network with Linux is using wpa_supplicant.
Supposedly, the iwpriv command should also enable you to configure your interface for WPA connections, but so far I haven't had much luck with that.

wpa_supplicant works by reading data from a configuration file, usually called wpa_suppplicant.conf and placed in the /etc directory.

The configuration file can sometimes be very complex, depending on the router's or access-point's configurations.
You can find a file with exaples of what the configuration file should look like by looking at the wpa_supplicant documentation, buried in /usr/doc/wpa_supplicant-version/doc/docbook/wpa_supplicant.conf.5. Its a pitty no man-page was offered, but then the wpa_supplicant --help command does have a few tips on how it should be used.

This is what a simple wpa_supplicant.conf file looks like:


Code: [Select]
ctrl_interface=/var/run/wpa_supplicant

network={
ssid="xxxxx"
key_mgmt=WPA-PSK
proto=WPA
#pairwise=TKIP CCMP
#group=TKIP
psk="xxxxxxx"
}

Replace xxxxxx with the correct values. The psk parameter is where you put your key or passphrase.
The pairwise and group settings depend on what type of encryption you have set for WPA/WPA2 on your router, but aren't always necessary.
Save the settings to /etc/wpa_supplicant.conf and then type this command to make sure the file can't be read by normal users:

Code: [Select]
chmod 600 /etc/wpa_supplicant.conf
That will keep your encryption key safe from regular users.

Make sure your wireless interface is up.
Now, to connect to the network, use this command:

Code: [Select]
wpa_supplicant -B -Dwext -iwlan0 -c/etc/wpa_supplicant.conf
If you are using ndiswrapper, then the command should look like:

Code: [Select]
wpa_supplicant -B -Dndiswrapper -iwlan0 -c/etc/wpa_supplicant.conf
You should see wpa_supplicant giving output about its status. When its done, you are connected to the network!


II ) Connect using James Bond gadgets:

Luckily the GNU/Linux world is not totally void of tools with graphical interfaces.

However, since VectorLinux aims to be a lightweight and calorie-free distro, such tools are normaly hard to come by, that fit in with VL's design philosophy.
One example of this is NetworkManager. It is hailed for its great automatic network detection and setup features, and improving wireless network usability. That is all fine and good if you have a 1.4GHz Pentium 4 to make sure that all the core GNOME components run smoothly in the background.

Fortunately, a tool called WiFi-Radar emerged from the ether of the vast OpenSource world, to give users a graphical tool to easily manage their wireless connection, without hogging too many system resources.

WiFi-Radar is included by default in VectorLinux 5.8 Standard.
Before you can start using it, you must set its configuration file to use your wireless insterface.

In a terminal as root, edit wifi-radar.conf:

Code: [Select]
mcedit /etc/wifi-radar/wifi-radar.conf
The second line refers to the interface to use, and looks like this:

interface = eth1

Replace eth1 with your wireless network interface.
Now, select WiFi-Radar from the "Network" section of the launch menu.

You will be presented with a simple interface. If you wait for a few seconds, WiFi-Radar will automatically scan for networks, and list them.
When one appers, then press the "Edit" button.

You will be able to enter all the information needed to connect to your wireless network. After you've entered the necessary details, press "Save" and you will be returned to the main window.
Now simply click on the profile you created/modified and the press "Connect".

Simple, eh? WiFi-Radar is very handy if you use a laptop and need to access different networks. This way, you keep your configurations saved in each network's profile, and connecting is only a click away.

Another good tool for connecting to WPA/WPA2 protected networks is wpa_gui. This tool simply acts as a front-end to the wpa_supplicant command, so you still need the wpa_supplicant.conf file in /etc for it to work.

To use it, simply run wpa_gui from a terminal as root, or select the "Run Program" from the launch menu and enter:

Code: [Select]
gksu wpa_gui
It is also very straightforward and easy to use.

If you are using one of the SOHO versions of VectorLinux, you should also be able to use KWifi-Manager to configure your network.

Ralink also provides a QT based tool for its RT2500 series chips called RaConfig. It is very complete and easy to use.
 


Extra Notes:

a ) Third-party kernel modules and stability:

Most manufacturers don't make Linux kernel modules to provide Linux support for their cards. So there are usually many different teams working on creating modules without these companies' help.
If these open-source modules end up being included in the Linux kernel its because they have passed the strict quality control of the kernel developers, and are considered good to use.

Some companies chose to provide Linux support, but do it like crap.
One example of this is Ralink. I must say that it is good to see a company that does support Linux by providing GPL'd drivers, but they are of inferior quality.

If you do chose to use a Ralink based card, then you can compile the drivers provided at Ralink's website, but you can't use them with kernel that have Symetric Multi-Processing (or SMP) support enabled.
SMP is quite important nowadays, since all (or nearly all) new PC's and some high-end laptops ship with multi-core processors. SMP allows the kernel to take optimal advantage of this architecture.

Since Ralink's drivers don't have SMP support, they will crash a kernel that has SMP enabled.

There are two ways arround this:

1 - Use a SMP-disable kernel (one should be availible in the repo soon)

2- Don't buy a Ralink based card in the first place (remember in the beggining of the HowTo: make sure it works properly before buying it. And don't hesitate to ask at the forums first if you are in doubt!).



Update - 27/03/2007:

The rt2x00 project (coordinated by "serialmonkey") has made some improvements over the drivers release by Ralink.
However, these drivers (like the ones release by Ralink) do not support SMP enabled kernels.

The team is now also working on the rt2x00 project drivers which are based on chip specifications from Ralink, but aim to support SMP and follow kernel programming guide-lines, so as to one day be merged into the mainline Linux kernel releases.
If you want to test the rt2x00 drivers, then download the CVS tarball release from this page:

http://rt2x00.serialmonkey.com/wiki/index.php?title=Downloads

Or just click on this link to download the tarball directly:

http://rt2x00.serialmonkey.com/rt2x00-cvs-daily.tar.gz

Read the "INSTALL" file for details on compiling the right module for your card.
This is still VERY experimental stuff, so I strongly advise you not to use these drivers in an environment where stability is of utmost importance.
If you feel like a challenge and don't mind helping with the bug-squashing, then the rt2x00 release is for you.
You can post any of your debugging info at the serialmonkey forum, under the "rt2x00 BETA testing" section:

http://rt2x00.serialmonkey.com/phpBB2/




b ) NdisWrapper stuff:

NdisWrapper is a great tool to have, in case there are no native Linux modules for the chip in your card.
However, since NdisWrapper provides a means for untested and proprietary code to enter the kernel, your kernel gets marked as "tainted", or in other words, untrusworthy. Big deal.....well, maybe it is. Remember all the problems in Windows caused by bad drivers? The last thing you want is having your Linux box crash randomly like Windows.
Also, because NdisWrapper can't do miracles, sometimes it can't provide all the functions the card may have.


c ) Wireless is great, but use it with caution. Make sure to take the necessary measures to protect your data.
Monitor your router logs and use tools like Ethereal and aircrack to audit your network security.


I hope this covers nearly all problems encountered on the forum. Enjoy!  ;)
Title: Re: HowTo: Configure your Wireless Network
Post by: wahmd on January 08, 2007, 06:02:53 am
Excellent How To... thank you!  All distros should come with something like this.  There was a small typo... where it speaks about "/etc/ifplug.d/ifplug.conf" it should read "/etc/ifplugd/ifplugd.conf".

Thanks for a great distro.

wahmd
Title: Re: HowTo: Configure your Wireless Network
Post by: easuter on January 08, 2007, 09:30:57 am
There was a small typo... where it speaks about "/etc/ifplug.d/ifplug.conf" it should read "/etc/ifplugd/ifplugd.conf".

Corrected :)
Title: Re: HowTo: Configure your Wireless Network
Post by: gksoccer on January 12, 2007, 06:03:43 am
I hope you can make these additions to this How To.

First I download Vector Linux before the Holidays. So I don't have
Version 5.8. So ifplugd does not exist on my system. You should be
clear about that this directory only pertains to this Version. I figured that
out but some newbies are going to think they have a corrupt install if they
can't find this directory.

Also with a out of box install Vector comes with serveral wireless modules
such as the Realteck 8180 driver support. So it's possible to load a driver
but it won't show hardware present because another module may be showing
the hardware present but not supporting the card. That was my case. I looked
through the /etc directory and found the command loadndiswrapper. With this
command I was able to change which module was associated with my hardware.
Otherwise even though the driver was installed with no errors it would not work.
And everything else looked OK.

BTW: Is the wifi-radar.conf new with only VL 5.8?? It's another file I don't have. For
that matter I don't have the directory eiher.

Howard
Title: Re: HowTo: Configure your Wireless Network
Post by: easuter on January 12, 2007, 10:10:32 am
From the HowTo:

Quote
VectorLinux 5.8 uses ifplugd to monitor network interfaces and try and connect to the ones it was assigned to.

So in other words, if you are not using VL5.8, then ifplugd is not there...

Yes, WiFi-Radar is a new addition to VL5.8.
However, anyone who wishes to install WiFi-Radar for an older version of VL may do so, and the procedure for configuring it is the same.
Title: Re: HowTo: Configure your Wireless Network
Post by: Diabolic Preacher on June 07, 2007, 03:16:35 pm
i have got to the point where if i give the command iwlist eth1 scan it returns the details of the AP of my university but they have a condition that they allow only machines that are registered...that is they authenticate by MAC address. so i now have to clear a doubt whether it's an error on my end and if not i'll go n recheck if they've added my MAC to the allow list.

after this point when i try to run either wlassistant or wifi-radar, i cannot acquire an IP, as it says "DHCP client is not running". where should it run and how to run it?

i am using vector linux 5.8 soho rc2
Title: Re: HowTo: Configure your Wireless Network
Post by: lagagnon on June 07, 2007, 07:10:38 pm
after this point when i try to run either wlassistant or wifi-radar, i cannot acquire an IP, as it says "DHCP client is not running". where should it run and how to run it?
Issue the command as root: dhcpcd
Title: Re: HowTo: Configure your Wireless Network
Post by: Diabolic Preacher on June 08, 2007, 04:07:15 am
i ran both the wlassistant and wifi-radar commands as root from the command line to see if they output any messages to the terminal.
wlassistant issues the dhcpd command with the necessary switches by itself and it shows so in the terminal.

despite this, the terminal outputs that the "dhcp client is not running"

what else can i do?
Title: Re: HowTo: Configure your Wireless Network
Post by: uelsk8s on June 08, 2007, 05:44:58 am
Diabolic Preacher,
the output " dhcp client is not running"  is shown because the command dhcpcd -k is ran to cleanup anything leftover before dhcpcd is ran.
so seeing that does not mean your not connected try running ifconfig after and see if you have an address.

HTH,
Uelsk8s
Title: Re: HowTo: Configure your Wireless Network
Post by: Diabolic Preacher on June 08, 2007, 11:42:02 am
here's an update with some wonderful discovery. my installation doesn't seem to have the dhcpd binary except a dummy inside /etc/rc.d/init.d/sample/.

dhcpd is not an inbuilt command .... is it?

and what are the other dhcp commands like dhclient for? when do they come into play?
Title: Re: HowTo: Configure your Wireless Network
Post by: Joe1962 on June 08, 2007, 11:53:20 am
It's dhcpcd, not dhcpd. It's missing a "c".
Title: Re: HowTo: Configure your Wireless Network
Post by: Diabolic Preacher on June 08, 2007, 12:27:40 pm
ugh right!...will get back tomorrow with the findings....

Title: Re: HowTo: Configure your Wireless Network
Post by: bobbear43 on September 15, 2007, 11:56:56 am
For dummies (like me), please add where you say unzip the manufacturers driver file. If it is a self-extracting .exe, in Windows, rename the self-extracting .exe to .zip and then unzip the file to a folder.

I had forgetten this little trick because I haven't been so deep in system stuff for years.
Title: Re: HowTo: Configure your Wireless Network
Post by: bobbear43 on September 15, 2007, 12:49:24 pm
I have followed all instuctions for ndiswrapper, and everything worked. EXCEPT ifconfig does not report wlan0 and "ifconfig wlan0 up" says no such device. modprobe.conf and ifplugd.conf are correct.

One always looks for what is different.

ndiswrapper -l:
blkwgn : driver installed device (168C:001A) present (alternate driver: ath_pci)

lspci:
02:00.0 Ethernet Controller: Atheros Communications, Inc. AR5005G 802.11abg NIC (rev 01)

Title: Re: HowTo: Configure your Wireless Network
Post by: easuter on September 15, 2007, 01:19:33 pm
I have followed all instuctions for ndiswrapper, and everything worked. EXCEPT ifconfig does not report wlan0 and "ifconfig wlan0 up" says no such device. modprobe.conf and ifplugd.conf are correct.

One always looks for what is different.

ndiswrapper -l:
blkwgn : driver installed device (168C:001A) present (alternate driver: ath_pci)

lspci:
02:00.0 Ethernet Controller: Atheros Communications, Inc. AR5005G 802.11abg NIC (rev 01)


bobbear43,  the howtos section of the forum has been through some turmoil lately, and not many updates have been made here.
I plan to update this particular howto as soon as I can because a lot has changed since it was written, and because there are some useful details missing.

Because you have an Atheros based card, you should try using ath0 as your network interface, not wlan0.
I'm also interested to see how well ndiswrapper works with an Atheros card (normally the two don't mix well from what I've read).
Hope it works for you though, if it doesn't we can help you get your card going with the Mad-WIFI drivers :)
Title: Re: HowTo: Configure your Wireless Network
Post by: martinwprior on October 21, 2007, 10:33:46 pm
When I read the Howto. I was pleased to note that your USB stick is the same as I have, so I thought install would be pretty easy using the zd1211b driver. Not so.

Using the installed ndiswrapper did not work. So I downloaded the latest version and everything worked OK.

Which method did you use to install the SMC USB stick?

I am using VL5.8



Regards

Martin Prior
Title: Re: HowTo: Configure your Wireless Network
Post by: easuter on October 24, 2007, 12:08:28 am
Hi martin,

At the time this howto was written, the zd1211b module still used to be included in the kernel. But it was later removed by the kernel developers because of problems with the code in the driver.

I'm currently using ndiswrapper with my card and it works ok. I used the windows XP driver provided in the installation CD from SMC.
If you are still having trouble, please open another thread in the Hardware or Networking section of the forum, and we can help you out  ;)
Title: Re: HowTo: Configure your Wireless Network
Post by: martinwprior on October 25, 2007, 06:57:26 am
I got it working with the latest ndiswrapper, without problem. Under recently installed 5.9 I used the installed ndiswrapper with no problem.

My problem was searching for a driver that had been removed. I was hoping to use the linux driver, but the Windows one works fine. Thanks to the guys at ndiswrapper.

Regards

Martin
Title: Re: HowTo: Configure your Wireless Network
Post by: trippfan on November 18, 2007, 06:44:52 am
ok i followed allthe instrustions and it can find my mac address but it will not pull up an ip address. i  have tried everything i can think of also but am getting nowhere. Can someone help me. I am running Vector Linux 5.8.
Title: Re: HowTo: Configure your Wireless Network
Post by: mithion on December 05, 2007, 02:28:51 pm
I would like to know how to start the connection automatically at boot.  Using wifi-radar requires root privileges but I have other users using my computer who need internet access I do not wish to give them the root password.  How do I do that?
Title: Re: HowTo: Configure your Wireless Network
Post by: easuter on December 06, 2007, 04:59:20 am
mithion,

You can add the commands needed to connect to your network to the en of /etc/rc.d/rc.local
Title: Re: HowTo: Configure your Wireless Network
Post by: mithion on December 06, 2007, 01:47:58 pm
Thanks for the pointers easuter.  I feel kinda retarded.  I just learned that wifi-radar can be run in daemon mode as a background application.  It is simply a matter of adding the following command

Code: [Select]
wifi-radar -d
in the /etc/rc.d/rc.local file.  Et voila, a working internet connection at boot.  I'm so happy :)) !!
Title: Re: HowTo: Configure your Wireless Network
Post by: easuter on December 06, 2007, 02:06:49 pm
Bah! didn't remember that one either! Glad you got it sorted out. :)
However, using the wifi-radar daemon on a laptop might not be a very good idea if you are concerned about battery life, since it polls for new networks every 5 seconds (by default) and generates a bit of overhead (especially on old machines...).
Title: Re: HowTo: Configure your Wireless Network
Post by: LeeDB on December 30, 2007, 06:07:04 pm
With 5.9 Std Final, I found with two different computers that even when the wireless device is supported out of the box, I still had to start Wifi-Radar, select Preferences, and check the box that says Ifup Required (and also check auto-detect if it was not already checked).  Alternatively, the command-line savy person can use commands to start the interface.  Once that is done, if your hardware is already supported, you should see wireless networks (yours at a minimum) in Wifi-Radar.  From there you can set up any required encryption, etc. to get connected. 

Not knowing the Ifup checkbox trick in Wifi-Radar, when wireless didn't work after the first boot following installation, I ended up going thru several steps in the HowTo that I really didn't need to do.  5.9 appears to support quite a lot of drivers out of the box, so this is a heads-up that your interface may be supported right out of the gate, and it's only a few check boxes away to verify that it works.

After re-booting, everything entered via Wifi-Radar is saved (WEP key, etc.), but you still have to start Wifi-radar and click "connect" to re-connect to your wireless network.  Here are some ways to get around that.

a) if you are using WEP, edit /etc/rc.d/rc.local and add the following at the end:
  iwconfig eth0 essid yourssid key yourWEPkey
  dhcpcd eth0
(substitute eth1, eth2, or whatever applies to your connection for eth0 above)

I did the above on the desktop since it will always connect to my home wireless network.

On the laptop, I got a little fancier - a shell script with the following lines:
  #!/bin/bash
  sudo /sbin/iwconfig ath0 essid myssid key myWEPkey
  sudo /sbin/dhcpdc ath0
(substitute ath0 with eth0, eth1, etc. as applicable and use your ssid and WEP key as needed)

Then I created a desktop file that executes the script.  The key line in the desktop file is as follows:
  Exec=/home/username/location/shell-script.sh

In order to first test the script, I executed it with ./shell-script.sh at the command line.  I'm a relative newbie to Linux, and I don't quite understand why the dot-slash is needed to execute it at the command line but not in the launcher.  Now when the laptop first boots, I have a desktop icon that I just double-click in order to connect to the network.  The idea is to create more scripts for other networks I connect to, so that I can choose depending on where I am when I fire up the laptop.  Besides, it's cool to double-click the icon and see the light on the network card come on immediately.   :)
 
Here are some other 5.9 observations relative to the HowTo on wireless setup.  Both my desktop and laptop are using wireless devices that worked right out of the box (after enabling them in WiFi-Radar via the Ifup checkbox)

1) Editing /etc/modprobe.conf to add alias statements/commands appeared to have no effect.
     Both laptop and desktop work fine with only the original alias statement for the unused
     wired ethernet port.
2)  I am relatively certain that editing /etc/ifplugd/ifplugd.conf had no effect, either.  My memory is
     fuzzier on this, but I believe that everything worked fine with the original INTERFACES="eth0"
     statement even when the wireless card in the desktop initially came up as eth1 and was detected
     as such by Wifi-Radar.
3) There was no existing /etc/udev/rules.d/network-devices.rules file in 5.9, but it was easy to create.
     The eth0/eth1 swapping issue that I read that people had issues with in 5.8 happened to me in 5.9
     on the desktop.  I locked the wireless interface to eth0 using this file.  (the laptop came up using
     ath0 for wireless evidently due to the atheros? chip on the D-Link PCMCIA card)  I put the statement
     in network-devices.rules for associating ath0 with the MAC address of the card, but everything was
     fine without it.
Title: Re: HowTo: Configure your Wireless Network
Post by: GrannyGeek on January 03, 2008, 06:41:21 pm
LeeDB,

Have you tried VLwifi instead of Wifi-Radar? I used to have some difficulty getting my WPA wireless going, but with VLwifi it's an absolute piece of cake. In RC3 I had to add something to a file in /etc (don't remember the details), but in 5.9 Standard Gold I set it up once with VLwifi and it has started automatically along with XFce ever since.
--GrannyGeek
Title: Re: HowTo: Configure your Wireless Network
Post by: LeeDB on January 05, 2008, 07:15:28 pm
Hi GrannyGeek,

When I tried VLWiFi on the desktop box, it detected a device and prompted me for some information, but I couldn't get it to connect.  Then I went on to use WiFi-Radar and edit rc.local, etc.  On my laptop, I initially used the same process with Wifi Radar, but later I was playing around and tried VLwifi, and it worked.  I salvaged a larger hard drive for the old laptop, so I think I may install VL 5.9 from scratch on it and go directly to VLwifi and see how it goes.

Thanks.
Lee
Title: Re: HowTo: Configure your Wireless Network
Post by: GrannyGeek on January 09, 2008, 07:57:16 pm
I found that I did have to add a line to the end of /etc/rc.d/rc.inet3:
modprobe ndiswrapper

Now my wireless is ready to use as soon as XFce starts.
--GrannyGeek
Title: Re: HowTo: Configure your Wireless Network
Post by: topgrey on February 10, 2008, 11:38:14 am
Folks, I'd like to just say THANKS for the most comprehensive help forum for any Linux distro ever.  30 minutes with this particular subject and my wireless is up.  Never got it running in less than 4 days with other distros.  Thanks again for everything.
Title: Re: HowTo: Configure your Wireless Network
Post by: maurolust on February 21, 2008, 08:40:13 pm
ndiswrapper did'nt work for me  :(

I searched around the web and it seems like I'm not the only dell owner with this problem. My board is a BCM4306, and although I did get to install bcmwl5 it did not detect hardware. Is it recommendable to buy a new wlan card? I would hate to do that, maybe not as much as I would hate to compile a module for it (actually, I don't even know what this means).

Great How-to, though. I think I've learnt a lot.
Title: Re: HowTo: Configure your Wireless Network
Post by: uelsk8s on February 21, 2008, 08:55:23 pm
ndiswrapper did'nt work for me  :(

I searched around the web and it seems like I'm not the only dell owner with this problem. My board is a BCM4306, and although I did get to install bcmwl5 it did not detect hardware. Is it recommendable to buy a new wlan card? I would hate to do that, maybe not as much as I would hate to compile a module for it (actually, I don't even know what this means).

Great How-to, though. I think I've learnt a lot.
there are a lot of different BCM cards out there.
I have one that i have to use an alternate bcmwl5.inf with(the ones that came with the card dont work with ndiswrapper)
you can get it here: http://vectorlinux.osuosl.org/Uelsk8s/bcmwl5-1.tar.lzma
extract it to /etc/ndiswrapper
then run "ndiswrapper -l" to see if it works with your card
Title: Re: HowTo: Configure your Wireless Network
Post by: sysman on March 05, 2008, 12:07:23 pm
Hi,
I am running VL5.9/gold on a toshiba satellite L40-14H. It has a usb-wifi modem, which is detected when I run:
                                 lsusb
The id is 0bda:8197. Googling gives only one other reference to someone trying to get the device running.
vasm->hardware->hwconf doesnt detect it & since I dont know what the module name should be, i cant manually add the alias.

Anyone got any ideas????
Title: Re: HowTo: Configure your Wireless Network
Post by: gamfa on March 07, 2008, 05:51:24 pm
That is the Realtek Rtl8187B card. I have the same card in my A215-S7428. You have 4 options for it. Two worked for me and two didn't.


1. http://wiki.archlinux.org/index.php/Rtl8187_wireless (http://wiki.archlinux.org/index.php/Rtl8187_wireless) worked

2. http://www.datanorth.net/~cuervo/blog/2007/09/26/no-more-vista/#comments (http://www.datanorth.net/~cuervo/blog/2007/09/26/no-more-vista/#comments) worked

3. Ndiswrapper  didn't work

4. Load VL's 2.6.24 kernel which has the driver native in it to 5.9.  didn't work


Pick your posion....
Title: Re: HowTo: Configure your Wireless Network
Post by: kc600 on April 07, 2008, 11:56:01 pm
This is a great how-to! It was all i needed to get wireless working on my Sitecom WL-168 USB wlan adapter (with rtl8187L chipset, via ndiswrapper).

A small hint from the Gentoo forum that solved my problem with WPA (I got an error saying "driver does not support wpa") was this:
Code: [Select]
wpa_supplicant -B -Dwext -iwlan0 -c/etc/wpa_supplicant.confinstead of
Code: [Select]
wpa_supplicant -B -Dndiswrapper -iwlan0 -c/etc/wpa_supplicant.conf
So now I have wireless on my ancient Pentium III, 250M Ram laptop, cool!
Title: Re: HowTo: Configure your Wireless Network with Ndiswrapper 5.9.1 SOHO
Post by: majisterludi on October 06, 2008, 12:18:51 pm
Most excellent HowTo.

I had grief trying to get ndiswrapper to work with SoHo 5.9.1. I was surprised as it had worked fine with the Wifi card on this rig with both 5.9 Standard Gold and 5.9 Lite Final. [This Nic is based on the Texas instruments ACX111 chip. It is a Netgear WG311v2. pci card]

ndiswrapper -i would round up and  load the usual  suspect, modprobe could not find ndiswrapper! Hmmm. Tried 2 different cds trying to rule out a bad Iso burn- no joy.

Googleing led me to download latest ndiswrapper from sourceforge and install per ndiswrapper's recipe in the readme file. Suddenly, modprobe can now find ndiswrapper and the wifi card can find the network!

Discussions in various places raised the specter of kernel changes, modprobe requiring usbcore and other esoterica. This worked for me. Hope it helps someone else.

magoo
Title: Re: HowTo: Configure your Wireless Network
Post by: gamfa on October 31, 2008, 05:15:47 am
When setting up a router to authenticate by MAC address, are the addresses case sensitive? I see in /var/log messages the address given uses lower case alpha characters but ifconfig reports them in upper case.
Title: Re: HowTo: Configure your Wireless Network
Post by: Joe1962 on October 31, 2008, 06:18:06 am
When setting up a router to authenticate by MAC address, are the addresses case sensitive?

No.

They are actually hexadecimal numbers, so from 0 to 9 and a to f.
Title: Re: HowTo: Configure your Wireless Network
Post by: gamfa on October 31, 2008, 12:34:35 pm
Thanks
Title: Re: HowTo: Configure your Wireless Network
Post by: Hiero2 on August 06, 2009, 11:55:52 am
I believe the how-to needs to be clarified/corrected right at the start. I'm stepping thru it, and I get to doing
Quote
lspci
. I get this:
root:# lspci
00:00.0 Host bridge: VIA Technologies, Inc. P4M266 Host Bridge
00:01.0 PCI bridge: VIA Technologies, Inc. VT8633 [Apollo Pro266 AGP]
00:0a.0 Network controller: Texas Instruments ACX 100 22Mbps Wireless Interface
00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80)
00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80)
00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80)
00:10.3 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 82)
00:11.0 ISA bridge: VIA Technologies, Inc. VT8235 ISA Bridge
00:11.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)
00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 50)
00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 74)
01:00.0 VGA compatible controller: S3 Inc. VT8375 [ProSavage8 KM266/KL266]

The first set of digits do NOT look like your USB "ID" numbers, and they get me garbage on Google. Therefore, I'm guessing they arent the ID mentioned, and that, for this purpose, they are garbage. Fortunately, I also get
Quote
Network controller: Texas Instruments ACX 100 22Mbps Wireless Interface
This may indeed be the info I need - or it may not, Idk, but I will find out, soon enuff.

Title: Re: HowTo: Configure your Wireless Network
Post by: Daniel on August 06, 2009, 12:14:27 pm
The first set of digits do NOT look like your USB "ID" numbers,

that's because they aren't USB ID numbers, they are (I believe) PCI ID numbers. The command lspci shows your PCI devices. To see your USB devices, use lsusb .
Title: Re: HowTo: Configure your Wireless Network
Post by: Hiero2 on August 16, 2009, 01:53:58 pm
lsusb - quite correct. But I still say the instruction sets should cover that to clarify that point for newbs like me. The instructions are very good, and have been helpful for other points. For instance, I was having trouble getting ndiswrapper to take my card driver - until I read in the directions to use the inf file. Then that worked!

Title: Re: HowTo: Configure your Wireless Network
Post by: sledgehammer on August 16, 2009, 11:25:13 pm
Hiero2

I'm not a newbe, I suppose, but still feel like one most of the time. 

I want to thank for your post as it, somewhat indirectly, solved a wireless problem for me.  I use VL 6.0 on an old IBM T42, which I just love.  But it has an older wireless chip and won't do the new wireless G.  That is becoming more and more of a problem.  The other day, I was at a seminar and all that was offered was G. Then tonight I saw your post, reviving easuter's great, but somewhat dated, wireless "How to."  I have had a Broadcom G PCMCIA card sitting around for a couple of years, I believe.  Whenever I bought it, I was unable to make it work. Decided to try again, this time on VL 6.  Looked at easuter's post, which gave me BCM4306, and then decided that following those instructions would take a while, so got on the forums and searched for BCM4306.  That took me to Bigpaw's 12/27/08 post to Scottmc9

Quote

Re: WLAN0 Device Not Recognized, Wireless AP Invalid and Other Unexplainables
« Reply #1 on: December 27, 2008, 05:07:12 pm »
   Reply with quoteQuote
iirc ndiswrapper should not be needed since it is a broadcom
chipset. The firmware for the kernel should already be installed
so all you should have to do is run vlwifi.

So, I put in the card, tried wicd (guessed it was wlan2) and it worked great!  Had to run the firestarter wizard again, but now I have G and, if I ever need it or the card breaks, B.

So thanks to all.

John
Title: Re: HowTo: Configure your Wireless Network
Post by: millyjohn on January 12, 2010, 02:36:18 am
There are basically 4 steps to set up home wireless network...
1. Choose your wireless equipment
2. Connect your wireless router
3. Configure your wireless router
4. Connect your computers to the wireless network
You can get more detail about it by searching on net. :)
Title: Re: HowTo: Configure your Wireless Network
Post by: agustinvega on May 14, 2013, 06:24:10 pm
I think my driver is installed correctly
agus:$ ndiswrapper -l
bcmwl5 : driver installed
   device (14E4:4315) present (alternate driver: ssb)
root:# ndiswrapper -m
adding "alias wlan0 ndiswrapper" to /etc/modules.conf ...

But the problem is setting the alias I think because the changes or multiples .conf files

root:# mcedit /etc/modprobe.conf
root:# modprobe ndiswrapper
WARNING: Deprecated config file /etc/modprobe.conf, all config files belong into /etc/modprobe.d/.
wlan0: unknown interface: No such device

I am on Vector 7 on HP Pavilion dv2000 and the wirless card is bradcom 4312

Need help to get my wirless up