Configure Ndiswrapper for Broadcom Driver on Linux Slackware

Jun 22, 2010 1:28 PM

Configuring wifi card drivers for linux are complex, but it's not confused as you thought. Configure all drivers on linux need more skills and more understanding. For the example, configure wifi card which has atheros chipset, you must have a madwifi-ng driver and skill to modify some configurations and to compile madwifi-ng source files. Same as you will configure broadcom driver, you must have a broadcom windows driver and it contains .inf file. In this article, i will give a tutorial to configure broadcom driver here.




First of all, provide windows broadcom driver. Don't forget the .inf file must be exist at the driver folder. Login into your slackware linux box, you have to login with root priviledge. Copy the driver's files to the root directory, so the directory contains this files:

war49@darkstar# ls driver
bcm43xx.cat bcm43xx64.cat bcmwl5.inf bcmwl5.sys bcmwl564.sys

Don't forget, we just need the .inf file, so from those files, we have a bcmwl5.inf file. But, if you don't have those driver files, you can download it from dj.r4iden.googlepages.com. We can use wget to download source driver files and unpack it to the destination directory.

war49@darkstar# wget http://dj.r4iden.googlepages.com/driver.tar.gz

Extract driver.tar.gz:

war49@darkstar# tar xzvf driver.tar.gz
war49@darkstar# ls driver
bcm43xx.cat bcm43xx64.cat bcmwl5.inf bcmwl5.sys bcmwl564.sys

You need a tool named ndiswrapper. Ndiswrapper ables to insert driver file inf file into the kernel. You must install ndiswrapper, if you don't have it, you can download to source forge.

war49@darkstar# tar xzvf ndiswrapper-1.54.tar.gz
war49@darkstar# cd ndiswrapper-1.54
war49@darkstar# make uninstall
war49@darkstar# make distclean
war49@darkstar# make
war49@darkstar# make install
war49@darkstar# ndiswrapper -v
utils version: ’1.9′, utils version needed by module: ’1.9′

module details:

filename: /lib/modules/2.6.27.7-smp/misc/ndiswrapper.ko
version: 1.54
vermagic: 2.6.27.7-smp SMP mod_unload 686

Then, install the driver.

war49@darkstar# cd driver && ls
bcm43xx.cat bcm43xx64.cat bcmwl5.inf bcmwl5.sys bcmwl564.sys
war49@darkstar# ndiswrapper -i bcmwl5.inf
war49@darkstar# ndiswrapper -l
bcmwl5 : driver installed
device (14E4:4320) present (alternate driver: ssb)
war49@darkstar# ndiswrapper -m

adding “alias wlan0 ndiswrapper” to /etc/modprobe.d/ndiswrapper …

war49@darkstar# ndiswrapper -ma
war49@darkstar# ndiswrapper -mi

And then, probe your ndiswrapper:

war49@darkstar# modprobe ndiswrapper
war49@darkstar# lspci | grep Broadcom
02:0c.0 Network controller: Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller (rev 03)

Did your linux kernel detects the device?, check the detected device using dmesg:

war49@darkstar# dmesg | grep ndis
ndiswrapper version 1.54 loaded (smp=yes, preempt=no)
ndiswrapper: driver bcmwl5 (Broadcom,02/10/2005, 3.100.35.1) loaded
ndiswrapper 0000:02:0c.0: power state changed by ACPI to D0
ndiswrapper 0000:02:0c.0: PCI INT A -> Link[LNKC] -> GSI 11 (level, low) -> IRQ 11
ndiswrapper 0000:02:0c.0: power state changed by ACPI to D0
ndiswrapper: using IRQ 11
usbcore: registered new interface driver ndiswrapper

And now, lets configure the wireless LAN adapter. First, scanning the wireless network arround the area. We can use iwlist, a wireless tool for scanning wifi.

war49@darkstar# iwlist wlan0 scanning
wlan0 Scan completed :
Cell 01 – Address: 00:18:F8:B6:C5:7F
ESSID:”pptik-01″
Protocol:IEEE 802.11g
Mode:Managed
Frequency:2.437 GHz (Channel 6)
Quality:79/100 Signal level:-45 dBm Noise level:-96 dBm
Encryption key:off
Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 6 Mb/s; 9 Mb/s
11 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
48 Mb/s; 54 Mb/s
Extra:bcn_int=100
Extra:atim=0

With the output which appears on above, use "pptik-01" as a our essid. Then we can connect with dhclient.

war49@darkstar# iwconfig wlan0 essid pptik-01
war49@darkstar# iwconfig wlan0 mode managed
war49@darkstar# iwconfig wlan0 channel 6
war49@darkstar# dhclient

You can also edit the rc.inet1.conf file in /etc/rc.d directory. In the wireless network configuration section, you can edit so like this,

## Example config information for wlan0. Uncomment the lines you need and fill
## in your info. (You may not need all of these for your wireless network)
IFNAME[4]=”wlan0″
#IPADDR[4]=”192.168.100.201″
NETMASK[4]=”255.255.255.0″
USE_DHCP[4]=”yes”
#DHCP_KEEPRESOLV[4]=”yes”
#DHCP_KEEPNTP[4]=”yes”
#DHCP_KEEPGW[4]=”yes”
DHCP_IPADDR[4]=”192.168.100.201″
WLAN_ESSID[4]=pptik-01
WLAN_MODE[4]=Managed
WLAN_CHANNEL[4]=”6″
...

Run the rc.inet1 script file, with "/etc/rc.d/rc.inet1 start" command without double-quotes. Then, add route the default gateway, default gateway is the wireless accesspoint.

war49@darkstar# route add 192.168.1.201 gw 192.168.1.1
war49@darkstar# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.201 192.168.1.1 255.255.255.255 UGH 0 0 0 wlan0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0

Finally, we can connect to the internet, test connection with ping to google.

war49@darkstar# ping google.com
PING google.com (74.125.67.100) 56(84) bytes of data.
64 bytes from gw-in-f100.google.com (74.125.67.100): icmp_seq=1 ttl=238 time=288 ms
64 bytes from gw-in-f100.google.com (74.125.67.100): icmp_seq=2 ttl=233 time=279 ms
64 bytes from gw-in-f100.google.com (74.125.67.100): icmp_seq=3 ttl=238 time=285 ms
^C
— google.com ping statistics —
3 packets transmitted, 3 received, 0% packet loss, time 2009ms
rtt min/avg/max/mdev = 279.889/284.733/288.939/3.722 ms

0 comments:

Article list :