john pfeiffer
  • Home
  • Categories
  • Tags
  • Archives

Linux wifi with pci linksys wpc54g v3

linux-wifi-with-pci-linksys-wpc54g-v3

The Linux Kernel (at least 2.6.26) has a driver for the Linksys pc54g pci card.

I have used a minimal debian installation (not even "Standard" or base...)

ifconfig -a //shows wlan0 - the kernel detects the linksys pci wifi card!

I will need to use wpa_supplicant (because my wifi is WPA, not WEP) dpkg --install wpasupplicant_0.6.

BUT that depends on

libnl1_1.1-5_i386.deb libdbus-1-3_1.2.14-3_i386.deb libpcsclite1_1.5.3-1_i386.deb

cd /etc wpa_passphrase ssid > wpa_supplicant.conf //prompts for passkey, after you type it in press enter

wpa_supplicant A tool for enabling WPA and full IEEE 802.11i/RSN/WPA2 WPA-PSK and WPA2-PSK (pre-shared key) ("WPA-Personal") WPA with EAP. wpa_supplicant may have a 'broadcom' driver that is used with the proprietary Broadcom driver. The bcm43xx, b43 and b43legacy drivers use the linux wireless extensions properly and so need the wext driver, set using the -D option, and the -B option runs it in the background...

wpa_supplicant -iwlan0 -B -Dwext -c/etc/wpa_supplicant/wpa_supplicant.conf


ERRORS! ...

b43-phy0 ERROR: firmware file "b43/ucode5.fw" http://linuxwireless.org/en/users/Drivers/b43#devicefirmware


The above site kindly shows me that my chip IS supported... to verify the chipset

to use lspci I need: pciutils_3....deb which depends on libpci3...deb

sudo lspci -vnn | grep 14e4 //shows whether "legacy" for wifi b

0001:01:01.0 Network controller [0280]: Broadcom Corporation BCM4318 [AirForce One 54g] 802.11g Wireless LAN Controller [14e4:4318] (rev 02)

BUT you have to update the firmware code in the kernel... So, download the firmware cutter (b43-fwcutter.deb) and the source code we'll add... BUT ensure you have the right tools for your kernel:

broadcom firmware version: 4.80.53.0 or 4.150.10.5, b43-fwcutter v.12

wget http://packages.debian.org/sid/b43-fwcutter dpkg --install b43-fwcutter_012...deb

Use version 4.80.53.0 of Broadcom's proprietary driver, Download and extract the firmware from this driver tarball:

FIRST: to run tar bzip you need to install dpkg --install bzip2_...deb

http://downloads.openwrt.org/sources/broadcom-wl-4.80.53.0.tar.bz2

cd /home/username/broadcom.bz2-file tar -xjf broadcom-wl-4.80.53.0.tar.bz2 cd /home/username/broadcom-wl-4.80.53.0/kmod

Now run the following commands to put it all together...

export FIRMWARE_INSTALL_DIR="/lib/firmware"

sudo b43-fwcutter -w "$FIRMWARE_INSTALL_DIR" /home/username/broadcom-wl-4.80.53.0/kmod/wl_apsta.o

alternatively, first change directory, then... cd /home/username/broadcom-wl-4.80.53.0/kmod/ sudo b43-fwcutter -w "$FIRMWARE_INSTALL_DIR" wl_apsta.o

AND if, as is often the case, the "export" command doesn't quite work... cd /lib ... if necessary, mkdir /lib/firmware sudo b43-fwcutter -w /lib/firmware/ wl_apsta.o

The desired result:

ID : FW11 filename: wlapsta.o

Extracting b43/ucode5.fw ... etc.


wpa_supplicant -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf Control+z bg dhclient wlan0

nano /etc/resolv.conf //dhclient will fill this out //but i prefer simply name-server 10.0.0.138

ip addr show //should show you your new ip address and gateway ping 10.0.0.138

route add default gw 10.0.0.138 //ensure that the gateway is saved

ping www.google.com //should now work


ALSO, FOR SPEED just use a static ip address...

Don't make wlan0 auto! otherwise it won't use wpa_supplicant...

nano /etc/network/interfaces

auto wlan0

iface wlan0 inet static address 10.0.0.10 netmask 255.255.255.0 network 10.0.0.0 broadcast 10.0.0.255 gateway 10.0.0.138 dns-nameservers 10.0.0.138


test that it's working manually...

/etc/init.d/networking force-reload ifup wlan0 ip addr show


Whenever I have problems I just have to run the script below:

!/bin/bash

wpa_supplicant -B -Dwext -c/etc/wpa_supplicant/wpa_supplicant.conf

Then type ifup wlan0

then ping 10.0.0.138


Call a script from the last thing to run at boot time:

nano /etc/rc.d/rc.local /home/username/bin/MY-WIFI-STARTUP.sh

nano MY-WIFI-STARTUP.sh

!/bin/bash

wpa_supplicant -B -Dwext -c/etc/wpa_supplicant/wpa_supplicant.conf ifup wlan0



OLD NOTES - INIT.D METHOD DOES NOT SEEM TO WORK

425.423903] ADDRCONF(NETDEV_UP): wlan0: link is not ready

APPARENTLY the startup using rc.d was too early in the boot process...

dhclient wlan0 is apparently unnecessary if it's in the startup

mv MY-wpa-startup.sh /etc/init.d/

update-rc.d -n MY-wpa-startup.sh defaults // -n shows us a preview

K = Kill, S = Start, so run level 1 would kill the script, but run level 2 will Start the script (which is what we want)...

TO REMOVE:

update-rc.d -f MY-wifi-start-wpa.sh remove Removing any system startup links for /etc/init.d/MY-wifi-start-wpa.sh ...



  • « Full backup.sh
  • Win CE from file update window get file line »

Published

Feb 28, 2010

Category

linux

~590 words

Tags

  • linksys 3
  • linux 249
  • pci 2
  • v3 1
  • wifi 10
  • with 29
  • wpc54g 1