|
By JayCnrs at 2004-07-04 23:38
|
|
First off I am using Fedora Core 2 running the 2.6.5-1.358 kernel. You will need the source code for the kernel and also development packages.
Before getting started you will have to go download Ndiswrapper 0.8 from here:
http://sourceforge.net/projects/ndiswrapper/
Then go here and download the realtek 8180 driver for Windows 2000:
http://www.realtek.com.tw/downloads/...x?Keyword=8180
And finally dhcpcd from here:
http://www.phystech.com/download/dhcpcd.html
Once you have all these downloaded you will need to untar the ndiswrapper and unzip the Windows 2000 driver, place the 3 files unzipped into the ndiswrapper folder.
Now enter the ndiswrapper folder and run make install this will install ndiswrapper for more info you can read the INSTALL file in the ndiswrapper folder. Once this has been completed you will need to load the windows drivers by running as root ndiswrapper -i /path/to/ndiswrapper-0.8/NET8180.INF then we will check to make sure it loaded the driver by issuing the command ndiswrapper -l and you should see net8180 present. If you see this the driver is loaded and we will install the module modprobe ndiswrapper. Now to see if the module was loaded issue the command dmesg | grep wlan you should see wlan0 come up if so you are ready to continue onto the next part which is configuring the wireless settings.
Before continuing on we will install dhcpcd-1.3, untar the file dhcpcd-1.3 then cd into the directory. Then you will need to run ./configure, make, make install as root. Once this is done run whereis dhcpcd make a note of where the file is mine was located in /usr/local/sbin/dhcpcd.
Once we are this far we are almost home free. Now we will configure the wireless settings, issue the command iwconfig and this should bring up where your wireless connection is set to, there should be a wlan0 in here, now we know our driver uses wlan.
Now you will issue the following commands to bring up your wireless network:
iwconfig wlan0 mode managed
iwconfig wlan0 key restricted (enter your wep key)
iwconfig wlan0 essid (your essid from router)
Now you should see both lights on your network card, then we will have to grab an ip address by running /usr/local/sbin/dhcpcd wlan0 as root
Once we have done this then open up Mozilla and you should be connected to the network or just ping a site. If everything worked alright we now issue the command ndiswrapper -m
After this I wrote a script :
Code:
#!/bin/bash
#Wireless configuration settings
iwconfig wlan0 mode Managed
iwconfig wlan0 key restricted (WEP Key)
iwconfig wlan0 essid (Your wireless router broadcast)
You will have to make the script executable chmod 755 wireless
Then I went to /etc/rc.d/rc5.d and ls, chose a number after network start script and pcmcia start script then issued the command ln -s /path/to/wireless S15Wireless. After this I went to /etc/rc.d/rc.local and added to the end /usr/local/sbin/dhcpcd wlan0 the only reason I put that command here was to ensure my wireless card had already activated and ready to grab an ip address.
After this when you boot up your wireless card will automatically load and connect to the network. I also went into start-->system settings-->network and edited my eth0 not to start at boot to remove the dhcp error at boot up, this isn't necessary but I hated seeing the error come up and stop the graphical boot up screen, this won't affect you if your prefer your hard wired network card to start at boot up.
Another reason I wrote the script was so if I was to insert the card after the PC had been booted up I could run the wireless script then the dhcpcd command and bring up my wireless.
HTH everybody trying to get the Linksys card working with linux.
|
|
|
|
If you want to keep all the commands together you can add the dhcpcd command right in the script you are using at the end, try this:
I used the command
- ndiswrapper -i /media/cdrecorder/lsbcmnds.inf
from the cd provided with my Linksys wireless card to build the driver. The inf file is on the cd.then
- ndiswrapper -l
then- /sbin/modprobe ndiswrapper
Then I ran- /usr/sbin/ndiswrapper -m
which spits outAdding "alias wlan0 ndiswrapper" to /etc/modprobe.d/ndiswrapper
I found the new drivers to be located in /usr/sbin/wlipnds
This is where the pain begins.
I ran
Great! I see my wireless network, now why can't I connect to it
After a whole lot of messing around and hours spent I ended up in YAST. System>/etc/sysconfig Editor>Hardware>wireless
This is where the following command comes in very handy
- /usr/sbin/iwlist wlan0 scan
I added my ESSIDI added my FREQ which for me was 2.437 GHz and came from the command above
I turned off the KEY - for now, I'm turning it back on when I'm done here
I also used YAST to do the following...
System>/etc/sysconfig Editor>Network>DHCP client>
I changed SET_HOSTNAME to yes
I changed KEEP_SEARCHLIST to no
REBOOT and I'm now using my wireless NIC. awsome. Thank you to a lot of people on a lot of forums for the information. I would not have know where to start.
I'm running SuSE 10 with a Linksys WUSB11v4.
After installing the ndiswrapper from the SuSE distro and checking for online updates I was getting nowhere fast with two errors:
1) Cannot find section @mdusb.out
Cause: Offending line in the WUSB11v4.inf file: CopyFiles = @mdusb.out
This is not supported by older versions of ndiswrapper it seems.
Resolution: Upgrade ndiswrapper to the latest stable version.
2) The old loadndiswrapper failed (11) message
Cause: SuSE don't seem to update things much. The SuSE "current" version of ndiswrapper (which actually ships on the distro disks) is 1.2 but (at the time of writing) the most stable release is 1.17 - just a little newer
Resolution: The device comes up fine with the new version (used the command line to 'make uninstall' the existing SuSE installed ndiswrapper as per the INSTALL instructions on the new ndiswrapper).
... now to get the wlan0 actually working ... that seems to present another set of problems!
Here is what I did to make mine work on SuSE 10.1.
Application Versions:-
need latest WUSB11v4 WinXP drivers from Linksys
ndiswrapper=
utils version: 1.8
driver version: 1.23
vermagic: 2.6.13.4-default 586 REGPARM gcc-4.1
Note: I tried version 1.25 (with utils 1.9) and this detected a driver conflict when I installed the wusb11v4 driver later on. If you get troubles then I suggest you use version 1.23 as I have done.
log in as root
untar the ndiswrapper tar file
cd to the new ndiswrapper directory
follow the INSTALL instructions (i.e. make uninstall (note that ndiswrapper is an optional s/w package in the SuSE 10.1 installation so if you haven't installed it this will probably let you know and you can proceed straight to the next command), make, and then make install)
All should be well if you have the right prerequisites, etc
wpa_supplicant=v0.4.8
This is the version that ships with SuSE 10.1 and works so I haven't upgraded it to 0.4.9.
Install the Linksys WUSB11v4 driver with ndiswrapper
unzip/extract the driver files and copy them to your SuSE machine) - all you need is the Drivers directory
using a terminal window log in as root and do the following:
change directory to the place you copied the Driver files
ndiswrapper -i ./WUSB11v4.inf
this should return no errors
ndiswrapper -l
this should return:
installed drivers:
wusb11v4 driver installed, hardware present
ndiswrapper -m
this should return no errors
Create wpa_supplicant.conf file in /etc
contents of wpa_supplicant.conf is:-
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
ap_scan=2
#eapol_version=2
eapol_version=1
fast_reauth=1
network={
ssid="WhateverYourWirelessIDis"
proto=WPA
key_mgmt=WPA-PSK
pairwise=TKIP
group=TKIP
#psk="mydoghasnonose"
psk=0hexbmorehex6d1andmorehex1etcetcetc
}
the value of psk will need to be modified according to the output of:
wpa_passphrase <ssidName> <whateverYourPassphraseis>
The use of a hex psk will speed up association.
Create template network config files using YaST (start YaST, use Network Devices/Network Card) and opt to use 'Traditional Method with ifup'
To simplify the process, I removed any other existing interface config; in my case eth0. Save and Finish.
Restart the Network Devices/Network Card YaST applet again using 'Traditional Method'
'Add' a new interface as follows:
Device Type: Wireless
Module Name: ndiswrapper
USB check box: checked (do this last on this page)
ignore the other settings
click next
I next chose static IP address setup and put in my internal IP and subnet mask (192.168.1.etc 255.255.255.etc)
click the hostname and name server button and put in your nameservers - I use the public ones provided by my ISP.
click OK
click the Routing config button
enter your default gateway IP address. This is most likely your ADSL modem/router IP address if it is on the same network (e.g. 192.168.0.1), otherwise it is the IP address of the device that routes the traffic from your wireless network address to your ADSL network address (e.g. 192.168.1.1 wireless router routing to 192.168.0.1 ADSL router routing to the internet)
the other fields should be unchecked and unconfigured
click OK
click next to go to the Wireless n/w card config page
set it up as follows (this is all going to be redundant in any case as we will point the config at out wpa_supplicant.conf file later on instead):
Operating mode: managed
Network Name (ESSID): WhateverYourWirelessNameIs
Authentication Mode: WPA-PSK
Key Input type: (Hexadecimal)
Encryption Key: Paste your Hex key (generated by wpa_passphrase earlier) into this field
I then turned OFF the power management in the 'Expert Settings' section
click Next
click next to save the new config
Now we will modify by hand the network config files
using a terminal session log in as root and cd to /etc/sysconfig/network
you will see your new file named ifcfg-wlan-bus-usb
edit this file using a text editor (I find vi quick and easy to use but then, perhaps, I am a dinosaur)
modify the file to look like this:
BOOTPROTO='static'
BROADCAST=''
ETHTOOL_OPTIONS=''
IPADDR='put your chosen static IP here for this machine e.g. 192.168.0.2'
MTU=''
NAME='Linksys WUSB11v4 Wireless USB'
NETMASK='255.255.255.0'
NETWORK=''
REMOTE_IPADDR=''
STARTMODE='auto'
USERCONTROL='no'
WIRELESS_AP=''
WIRELESS_AUTH_MODE='psk'
WIRELESS_WPA_PROTO='WPA2'
WIRELESS_SCAN_MODE='2'
WIRELESS_WPA_CONF='/etc/wpa_supplicant.conf'
WIRELESS_BITRATE='auto'
WIRELESS_CHANNEL='9'
WIRELESS_ESSID='Gnome'
WIRELESS_FREQUENCY=''
WIRELESS_KEY_LENGTH='128'
WIRELESS_CIPHER_PAIRWISE='TKIP'
WIRELESS_CIPHER_GROUP='TKIP'
WIRELESS_MODE='Managed'
WIRELESS_POWER='no'
WIRELESS_WPA_IDENTITY=''
WIRELESS_WPA_PSK='0hexbmorehex6d1andmorehex1etcetcetc'
_nm_name='static-0'
(note: each configuration item should be on a new line).
I think many of the above entries are made redundant by the wpa_supplicant.conf file, however I am not going to mess about with it right now.
once you have done this you should be set to start the services.
Firstly I made sure all the services were stopped:
/etc/init.d/network stop
ps -rf | grep wpa
you should see no wpa_supplicant service running but if you do it needs to be stopped - use wpa_cli and issue the terminate command or if all else fails killproc wpa_supplicant
Now start the services:
/etc/init.d/network start
and you should get some good messages like:
Setting up network interfaces:
lo
lo IP address: 127.0.0.1/8 done
eth0 device: Intel Corporation 82801DB PRO/100 VM (LOM) Ethernet Controller (rev 81)
No configuration found for eth0 unused
wlan0
wlan0 configuration: wlan-bus-usb
wlan0 starting wpa_supplicant
wlan0 IP address: 192.168.0.2/24 done
Setting up service network . . . . . . . . . . . . . . done
SuSEfirewall2: Warning: ip6tables does not support state matching. Extended IPv6 support disabled.
SuSEfirewall2: Setting up rules from /etc/sysconfig/SuSEfirewall2 ...
SuSEfirewall2: batch committing...
SuSEfirewall2: Firewall rules successfully set
and you're away!
Hope this 'recipe' works for all you wusb11b4 SuSE frustrated folks.
References:
www thinkwiki org/wiki/Wpa_supplicant
wiki archlinux org/index.php/Wpa_supplicant
www desktoplinux com/news/NS3687730057.html
sourceforge for ndiswrapper
Secondly, if you are using a WUSB11v4 from Linksys, my fix, as detailed above, should work for you. It is going to be a big struggle if you're a network/unix novice and I think it will put you off for life if that is the case. There are other USB wireless LAN cards out there that do work out of the box so it may be wiser just to get one of those instead.
In theory, ndiswrapper should work for pretty much any Ethernet network device you have, since it uses the windows drivers for that card and translates windows mumbo-jumbo into unix.
With wireless, you don't have to use WPA2-PSK/TKIP-AES but it currently is the most secure. WEP is the alternative and for that you won't need to use the wpa_supplicant bit. In other words WEP is easier to set up.
Also check out the Mike Choy's site - it is about MythTV but it has very many useful links, hints and tips. www acaciaclose co uk/129538/118087.html
This is my main question that I can't wrap my head around, Open source. If it is better why is it harder? May be this is not the thread to answer this thread in, but when you go to the doctor and you tell him when I do this it hurts, and he says well then don't do that, well this hurts why am I doing this? May you just have a need to use software that you can modify, and that is what Linux users enjoy and may be when I get to a point where I can use it I will enjoy it as well.
Its okay if I get the dumb down version of the answer this question, or any answer, Thanks.
However, I'm sure any Open Source fan would agree that there are lots frustrations with that also.
There are issues to overcome with open source, 2 of the significant ones are:
1) That it isn't windows (or Mac) and isn't what we are all now used to. In other words there is a degree of learning your way around the new system or application.
2) That, when it comes to hardware, the driver support provided by the product manufacturers is atrocious. Their view, clearly, is that the main market is Windows based and therefore they only write drivers for that platform. Then again, maybe more people would use Linux, Free BSD, etc if only the hardware support was better. The ol' catch 22. I could go on (especially about the games industry) but there is little point.
Linux and Open Source can be great - truly great - for a very great number of things, not least of which is keeping your bank manager happy in s/w licencing terms.
Here is my general rule to using Linux and open source:
Only use hardware that is supported out of the box (now there is a challenge) or where the vendor actually writes linux drivers (yes, there are a few). In other words, typically main brand equipment - things like, nVidia graphics, Creative sound and so on. Take it from me though, easier said than done though. If in doubt, research on the internet is required and this is never foolproof - after all that is why I'm interested in this thread. Most hardware is very well supported these days, however there will always be exceptions.
Such is IT.