Mandriva Ndiswrapper

From DSO Wiki

Jump to: navigation, search

Download the latest version of ndiswrapper from http://ndiswrapper.sourceforge.net/joomla/

urpmi wireless-tools

Find the latest version of the kernel source.

uname -r  
urpmi kernelsource-*
cd /usr/src/linux
cp /boot/config-[yourkernelversion] /usr/src/linux/.config && cd /usr/src/linux && make mrproper && ake          
oldconfig && make
tar zxvf ndiswrapper-[version].tar.gz

Now cd to the directory that ndiswrapper created and uncompressed itself to:

cd ndiswrapper-[version]

Now build ndiswrapper (still in the ndiswrapper directory) by running:

make

Now change to root user (you may then need to cd back to the ndiswrapper directory) and run:

make install

Ndiswrapper should now be built and it is time to install the Windows driver. You need to download the Windows driver for your card. To identify the driver that you need, first identify the card you have by doing this:'

lspci

Then install the windows driver:

ndiswrapper -i INF filename

This should copy all needed files to /etc/ndiswrapper and also creates the config files for your card.

If you should see this, 'basename: too many arguments', it means it may be having trouble due to spaces in the directory names.

After installing the drivers, you can now check the status of your installed drivers:

ndiswrapper -l

If you have installed the correct driver, you should see something like this:

Installed ndis drivers
bcmwl5 hardware present

Where "present" means that you have a card that can be used with the driver installed. In this case, broadcom driver bcmwl5 is used.

If everything has gone well to this point, it is now time to load the module:

modprobe ndiswrapper

If you got no error, then the driver should now be loaded. You can verify this by checking system log (produced by dmesg).

dmesg

If the driver was loaded successfully, you should see something similar to the following message:

ndiswrapper version V loaded

Make sure the version V here matches the version of the ndiswrapper package that you downloaded and installed. If you get a different version, you should uninstall ndiswrapper and go back to the beginning. If you don't get the the above message, check if ndiswrapper is loaded with the lsmod command:

lsmod

If ndiswrapper is not listed with the 'lsmod' command then check dmesg for an error message.

If you have successfully installed windows drivers earlier (with ndiswrapper -i INF filename), the ndiswrapper module will load them all. You should then see the following messages in system log for each of the drivers. ndiswrapper: driver driver1 added

If you don't see these messages, it usually means that there are no (usable) drivers installed in the /etc/ndiswrapper directory. Check if the /etc/ndiswrapper directory has one sub-directory for each driver and if in each driver's directory there are inf, sys and conf files. Otherwise, you may need to repeat:

ndiswrapper -i INF filename and ndiswrapper -l

If the system has a card that works with one of the loaded drivers, you should see the following message in the system log:

lan0: ndiswrapper ethernet device xx:xx:xx:xx:xx:xx

Use iwconfig to configure the wireless network interface. First, see if the interface is available with:

iwconfig

This will print the wireless interface (e.g., wlan0). In the examples below wlan0 is used, replace wlan0 with the interface reported by iwconfig above. The wireless configuration to be used should match what your Access Point (AP) uses. First, find out if you can see your AP with:

iwlist wlan0 scan

If this lists your AP, you can continue. Otherwise, you may have one of two problems: Your AP doesn't broadcast SSID or the radio of the card is turned off. If you see the AP in the scan above, set the operating mode of the interface according to your setup. In most cases this will be mode Managed.

iwconfig wlan0 mode Managed

If you use encryption (WEP), set the key:

iwconfig wlan0 key restricted XXXXXXXX

You can use 6 hex digits for 40-bit encryption or 10 hex digits for 128-bit encryption. You may need to use open security mode instead of restricted depending on the setup of your AP. If you want to write the key in ASCII use s: (e.g. iwconfig wlan0 key restricted s:password).

Set the network name, replace ESSID with the network name used by your AP:

iwconfig wlan0 essid ESSID

If essid is not set, then ndiswrapper itself works and the rest of this section may or may not help you.

Now, setup the network parameters for the interface wlan0. This varies from distribution to distribution. Refer to your distribution's documents on how to do this. Once this is done, you can use network tools to bring up the network:

ifconfig wlan0 up

or

dhclient wlan0

or

dhcpcd wlan0

Once everything works fine, you can write the correct modprobe settings to load ndiswrapper automatically when wlan0 interface is used, by running:

ndiswrapper -m

Note that this doesn't automatically load ndiswrapper module at boot time. If you want the module to be loaded automatically at boot time, you should configure your module setup, which depends on the distribution. Most distributions will load all modules listed in /etc/modules at boot time. For them, you can add a line in /etc/modules:

ndiswrapper
Personal tools