LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Linux Answers > Networking
User Name
Password

Notices

By farslayer at 2007-03-26 22:06
HOW-TO install the Broadcom bcm43xx Driver in Debian Linux and enable WPA Encryption

this HOW-TO was made using Debian etch with kernel 2.6.18-4-686

My network card is a Belkin Wireless G Plus
Part Number F5D7011 ver. 2000

Wireless Access Point: Linksys WRT54GL

Code:
inspiron:~# lspci

0d:00.0 Network controller: Broadcom Corporation BCM4318 [AirForce One 54g] 802.11g Wireless LAN Controller (rev 02)
You may want to ensure you have the wireless tools and wpa security tools installed before you begin
Code:
aptitude install wireless-tools wpasupplicant network-manager network-manager-gnome
Go to http://bcm43xx.berlios.de/ and download the bcm43xx-fwcutter tool

bcm43xx-fwcutter-006.tar.bz2

Extract the Source

Code:
default@inspiron:~/bcmwireless$ tar -xjvf bcm43xx-fwcutter-006.tar.bz2
bcm43xx-fwcutter-006/
bcm43xx-fwcutter-006/bcm43xx-fwcutter.1
bcm43xx-fwcutter-006/Makefile
bcm43xx-fwcutter-006/md5.c
bcm43xx-fwcutter-006/md5.h
bcm43xx-fwcutter-006/README
bcm43xx-fwcutter-006/fwcutter_list.h
bcm43xx-fwcutter-006/fwcutter.c
bcm43xx-fwcutter-006/fwcutter.h
bcm43xx-fwcutter-006/COPYING
In order to have everything in one place I copied the Driver folder from the CD that came with my wireless card to the Laptop.

so my directory structure now looks like this

Code:
bcmwireless/
|-- Driver
|-- bcm43xx-fwcutter-006
Change into the directory the source was extracted to

Code:
default@inspiron:~/bcmwireless$ cd bcm43xx-fwcutter-006/
Compile the bcm43xx-fwcutter tool

Code:
default@inspiron:~/bcmwireless/bcm43xx-fwcutter-006$ make
cc -O2 -fomit-frame-pointer -std=c99 -Wall -pedantic -D_BSD_SOURCE -DFWCUTTER_VERSION_=006   -c -o fwcutter.o fwcutter.c
cc -O2 -fomit-frame-pointer -std=c99 -Wall -pedantic -D_BSD_SOURCE -DFWCUTTER_VERSION_=006   -c -o md5.o md5.c
cc -O2 -fomit-frame-pointer -std=c99 -Wall -pedantic -D_BSD_SOURCE -DFWCUTTER_VERSION_=006 -o bcm43xx-fwcutter fwcutter.o md5.o
At this point you may issue the list command for the bcm43xx-fwcutter tool ( bcm43xx-fwcutter -l ) to see what file in the driver I was looking for.
According to the list command and the files I have in the Driver directory the file I want is called bcmwl5.sys


You should now use the Firmware Cutter tool to extract the wireless card firmware from the windows driver

Code:
default@inspiron:~/bcmwireless/bcm43xx-fwcutter-006$ ./bcm43xx-fwcutter /home/default/bcmwireless/Driver/bcmwl5.sys

  filename   :  bcmwl5.sys
  version    :  3.100.64.0
  MD5        :  e7debb46b9ef1f28932e533be4a3d1a9
  microcodes :  2 4 5
  pcms       :  4 5

  microcode  :  2
  revision   :  0x0123
  patchlevel :  0x0021
  date       :  2005-01-22
  time       :  19:48:06

  microcode  :  4
  revision   :  0x0123
  patchlevel :  0x0021
  date       :  2005-01-22
  time       :  19:48:06

  microcode  :  5
  revision   :  0x0123
  patchlevel :  0x0021
  date       :  2005-01-22
  time       :  19:48:06

extracting bcm43xx_microcode2.fw ...
extracting bcm43xx_microcode4.fw ...
extracting bcm43xx_microcode5.fw ...
extracting bcm43xx_pcm4.fw ...
extracting bcm43xx_pcm5.fw ...
extracting bcm43xx_initval01.fw ...
extracting bcm43xx_initval02.fw ...
extracting bcm43xx_initval03.fw ...
extracting bcm43xx_initval04.fw ...
extracting bcm43xx_initval05.fw ...
extracting bcm43xx_initval06.fw ...
extracting bcm43xx_initval07.fw ...
extracting bcm43xx_initval08.fw ...
extracting bcm43xx_initval09.fw ...
extracting bcm43xx_initval10.fw ...
you will need to be root in order to install the firmware into the directory it belong in
Code:
inspiron:~# cd /home/default/bcmwireless/bcm43xx-fwcutter-006

inspiron:/home/default/bcmwireless/bcm43xx-fwcutter-006#  make installfw
if ! [ -d /lib/firmware ]; then mkdir -p /lib/firmware; fi
install -o 0 -g 0 -m 600 bcm43xx_*.fw /lib/firmware
the firmware should now be located in /lib/firmware

Code:
inspiron:/home/default/bcmwireless/bcm43xx-fwcutter-006#  ls /lib/firmware/
bcm43xx_initval01.fw  
bcm43xx_initval04.fw  
bcm43xx_initval07.fw  
bcm43xx_initval10.fw   
bcm43xx_microcode5.fw
bcm43xx_initval02.fw  
bcm43xx_initval05.fw 
 bcm43xx_initval08.fw  
bcm43xx_microcode2.fw  
bcm43xx_pcm4.fw
bcm43xx_initval03.fw  
bcm43xx_initval06.fw  
bcm43xx_initval09.fw  
bcm43xx_microcode4.fw  
bcm43xx_pcm5.fw
At this point you need to ensure the Wireless card is listed in your /etc/network/interfaces file

Code:
inspiron:/# vim /etc/network/interfaces


# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth1
iface eth1 inet dhcp

# The primary network interface
allow-hotplug eth2
iface eth2 inet dhcp
eth1 is my Wired network interface
eth2 is the Wireless network interface

check to ensure the Module for your wireless card is loaded

Code:
lsmod | grep bcm43xx 
bcm43xx               405920  0
ieee80211softmac       26304  1 bcm43xx
ieee80211              29416  2 bcm43xx,ieee80211softmac
firmware_class          9600  2 bcm43xx,pcmcia
if the module isn't loaded load it now
Code:
modprobe  bcm43xx 
At this point you can check if the network card can see your Wireless access point. your access point should be configured without security at this point for testing.

Code:
inspiron:/# iwlist eth2 scan
eth2      Scan completed :
          Cell 01 - Address: 00:16:B6:1C:78:D4
                    ESSID:"linksys"
                    Protocol:IEEE 802.11bg
                    Mode:Master
                    Channel:6
                    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
                    Quality=100/100  Signal level=-174 dBm
                    Extra: Last beacon: 68ms ago
If the Wireless card can see your access point you are in good shape at this point
Bring up the interface to see if you can connect and get an IP address.

Code:
inspiron:/# ifup eth2
Internet Systems Consortium DHCP Client V3.0.4
Listening on LPF/eth2/00:11:50:f4:90:e2
Sending on   LPF/eth2/00:11:50:f4:90:e2
Sending on   Socket/fallback
DHCPDISCOVER on eth2 to 255.255.255.255 port 67 interval 5
DHCPOFFER from 192.168.1.1
DHCPREQUEST on eth2 to 255.255.255.255 port 67
DHCPACK from 192.168.1.1
bound to 192.168.1.101 -- renewal in 83055 seconds.
Code:
default@inspiron:~/$ /sbin/ifconfig eth2

eth2      Link encap:Ethernet  HWaddr 00:11:50:F4:90:E2
          inet addr:192.168.1.101  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::211:50ff:fef4:90e2/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:21 errors:0 dropped:4 overruns:0 frame:0
          TX packets:155 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2994 (2.9 KiB)  TX bytes:9572 (9.3 KiB)
          Interrupt:10
From the response it shows the card came up and was able to get an IP address from the Wireless Access Point successfully


WPA ENCRYPTION CONFIGURATION


Configure your Access Point so that it uses encryption: WPA with Pre-Shared Key authentication (also called WPA-Personal) and AES encryption .

Make note of your SSID in the Basic Wireless Settings.

For the Wireless Security, I made up a secret key (64 characters 1-9, a-f), but you should use 32 bytes of secret that are really random.

One method to generate the secret on Linux is: dd if=/dev/random bs=32 count=1 2>/dev/null | od -An -tx1 then remove all spaces and newlines...

Make sure "Wireless SSID Broadcast" is set to "Enable", because that will be required later.

Disabling the SSID broadcast or filtering on MAC addresses only provide weak bandwidth/privacy protection anyway, and you are setting up the stronger WPA encryption which guarantees that only somebody who knows the secret can interact with your Access Point.


Configuration of WPA

wpa_supplicant is installed by default, if not, install the package "wpasupplicant".

Create the file /etc/wpa_supplicant.conf and insert the following:


Code:
network={
        ssid="myssid"
        key_mgmt=WPA-PSK
        pairwise=CCMP
        group=CCMP
        psk=1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
}
Make this file readable only for root

Code:
 chmod go-rwx /etc/wpa_supplicant.conf
Edit /etc/network/interfaces and add the lines for the wireless and WPA encryption
Code:
auto ethX
iface ethX inet dhcp
wireless-essid <your accesspoints essid>
wpa-driver wext
wpa-conf /etc/wpa_supplicant.conf
Test the WPA configuration by restarting the wireless interface

Code:
ifdown ethX
ifup ethX

Verrify the connection is up and encryption is enabled
Code:
inspiron:~# iwlist eth2 scan
eth2      Scan completed :
          Cell 01 - Address: 00:16:B6:1C:78:D4
                    ESSID:"myssid"
                    Protocol:IEEE 802.11bg
                    Mode:Master
                    Channel:6
                    Encryption key:on
                    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
                    Quality=100/100  Signal level=-135 dBm
                    IE: WPA Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
                    Extra: Last beacon: 28ms ago
The SSID Mathches my configuration
Encryptionh Key is ON
WPA is enabled

You are DONE !!

by gudneo on Sun, 2007-08-26 14:50
Hi

A little help, if you are trying install BCM43XX /BCM4318 using ndiswrapper. Please visit the following link


http://www.tecpages.com/installing-a...g-ndiswrapper/

Thank you

by lszyba1 on Sat, 2008-03-29 12:43
I would follow these instruction for a wireless broadcom card.
http://lucasmanual.com/mywiki/bcm43xx
Then to enable wpa I would read this short configuration:
http://lucasmanual.com/mywiki/FrontP...a2244a4236e25f

I got my broadcom setup in few minutes and my wireless in 30 sec.
Have fun.
Lucas


  



All times are GMT -5. The time now is 09:32 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration