LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Linux Answers > Networking
User Name
Password

Notices


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.

by celticX on Wed, 2004-09-01 15:45
im getting ready to follow this script but i have a couple of questions first with my wep key. I have that disabled so would i still add that code of line to my system?

by ssimontis on Wed, 2004-09-01 19:41
I don't think you would need to include the WEP line. Also, just to make sure, this is for a WMP11 v4, right?

by JayCnrs on Wed, 2004-09-01 22:11
You would use iwconfig wlan0 key off.

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:
Code:
#!/bin/bash
# Wireless configuration settings
/sbin/iwconfig wlan0 essid name_you_broadcast
/sbin/iwconfig wlan0 key off
#Pull down IP address from Linksys Router
/usr/local/sbin/dhcpcd wlan0
HTH

by scottbowden on Tue, 2005-11-29 23:38
I've been working at it a while and I finally got it! I got a linksys WPC54G wireless card working on suse 10

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 out
Adding "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
  • /usr/sbin/ifconfig wlan0 up
  • /usr/sbin/iwlist wlan0 scan

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 ESSID
I 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.

by vault0 on Tue, 2006-06-13 09:52
Thanks for this extremely helpful thread!

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!

by vault0 on Fri, 2006-10-06 09:01
After my last post it has taken me some time to get back to this and solve the problem. Since I last looked at it I have upgraded to SuSE 10.1 so there will be some differences for those of you running older versions; none that cause any problems I hope.
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

by f2read on Wed, 2007-01-24 22:27
If I could get on the Internet what would I need the program for. What is the fix for this problem with the software that came with SUSE 10.1? I am having the exact problem that this therad is about but I can not get my linux machine on the Internet.

by vault0 on Thu, 2007-01-25 05:11
Quote:
Originally Posted by f2read
If I could get on the Internet what would I need the program for. What is the fix for this problem with the software that came with SUSE 10.1? I am having the exact problem that this therad is about but I can not get my linux machine on the Internet.
My first piece of advice is to get OpenSuSE 10.2 rather than the 10.1 release, which had, and possibly still does, a very unpleasant problem with the software online updater.

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

by f2read on Fri, 2007-01-26 11:45
Thanks for advice, the card worked on the machine before, and being from windows world I thought the drivers would not be an issue. Is Linux for programmers? This all started from wanting to hack my Tivo. Then my hard drive went out on one of my laptops and I thought why not have a Linux machine, and my thoughts were am I going to cut my self off from the rest of the world on this machine by doing this, and now sure enough that is what has happened.

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.

by vault0 on Sat, 2007-01-27 05:25
No problem. We've all been there. It's not just with Open Source but also with MS products this occurs. In fact, in my experience (and I have very many years in the IT industry) it is usually MS products or related issues in other Windows products, that cause more stress, frustration and general agony. Only the other day a relative of mine was so angry with a piece of MS software that he destroyed his hard disk during the "lesson" he was giving his laptop as a result. Needless to say, the outcome was not happy and took lots of money, time and phone calls to fix.

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.


  



All times are GMT -5. The time now is 05:44 PM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration