0.023
thk thk Thu. 8 May. 2008 14:17 tags linux , old kaotonik 1 views

I am reposting most important content from old kaotonik
by thk
last modified 2007-11-26 15:40

How to set up the Broadcom BCM4318 wireless card that comes with Amilo 1655g laptop on SuSE Linux 10.1 and linx mint Daryna 4.0 (ubuntu gutsy based)

I recently bought a Fujitsu Siemens Amilo 1655g laptop with an AMD Turion(tm) 64 Mobile Technology ML-32 processor and 1GB of Ram.The laptop comes with a broadcom wireless card

( Broadcom BCM4318 [AirForce One 54g] 802.11g Wireless LAN Controller ) .


The card was said not to work with linux on various forums I 've read.
Here are the steps I took in order to make it work on SuSE 10.1 x86_64.

1. Install ndiswrapper from Yast.
Go Yast->Software Management , Search for ndiswrapper , tick , and press Accept to Install.

More Details here  http://www.tuxmagazine.com/node/1000167


2. Download the windows driver from here http://www.linuxant.com/driverloader/drivers.php

It's the "Airforce One" Broadcom devices with PCI ID 14E4:4318 ( ftp://ftp.support.acer-euro.com/notebook/ferrari_4​​​​​​​​​​​​​​​​​00​0/d​riv​er/​win​xp6​4bi​t/8​021​1g​.​zi​p ).


3. Extract the zip and run as root

ndiswrapper -i bcmwl5.inf

from where the .inf file is located.

next

ndiswrapper -l

you should see something like that:

Installed drivers:
bcmwl5 driver installed, hardware present

please read http://www.tuxmagazine.com/node/1000167

for more details.

4. On Yast -> Network Devices -> Network Card , I have selected

Traditional method with ifup.

But I suppose network manager will be ok too.


5. Add a wireless network interface if you dont already have.

Set the module name to ndiswrapper. This should load the ndiswrapper kernel module at boot.



6. Set the other details of your wireless card like Ip (static or via DHCP if you use it) , Gateway (routing).

These are on the Address tab.On general tab I have Device Activation On hotplug and User Controlled checked.
I dont think other setups would make any trouble .
The key points of this setup are :
  • first to load the ndiswrapper on kernel,
  • set up the address , ssid ,encryption of your wireless card,
  • and finally install a second kernel module that I ll refer later as ndiswrapper can't start/stop the hardware.


7. press next and Set the details of your wlan

press next and finish.


8. Now something Important.

Download the fsaa1655g source from http://www.marvec.org/amilo/

Everything is ok but the wireless card is not started!

This module can start/stop the card.

Extract the fsaa1655g source and run make && make install

Update 20071109

on linux mint celena (or ubuntu feisty)
I had to comment out this line (line 32) on fsaa1655g.c
before running make :

/*#include <linux/config.h>*/

there is no config.h nowadays, I think it's deprecated.


9. Reboot .


10. Check if ndiswrapper module is loaded.

To see if the ndiswrapper kernel module is loaded after boot� , issue as root :

lsmod

this command lists the loaded modules of the kernel and you should see somewhere ndiswrapper.

(it's a great possibility that if ndiswrapper module wont load after reboot you should issue ndiswrapper -m and reboot )


11. Now the point is to load fsaa1655g module into the kernel , and restart network

Issue as root

modprobe fsaa1655g

ifdown wlan0

ifup wlan0


This little script I wrote starts / stops wireless card and interface depending on whether it is started or stopped.

I found it useful as I dont like my wireless to start automatically.
I put it on /usr/local/bin.

Update - 20071109
Updated the script for my new installation linux mint celena on my laptop (it is based on ubuntu feisty).
I have the same ip on both interfaces (wireless and ethernet) set static and I noticed problems when having both
interfaces up.
I think I also noticed problems even when having different ips on the interfaces.
So i stop the ethernet interface before bringing up the wireless and vice versa.

I also had to put some sleep delays after stopping each interface in the script.

The whole installation at mint/celena is more or less the same.
Here are the steps I followed :
http://ubuntuforums.org/showthread.php?t=285809

I used wep-encryption on the router and on gnome network I set my wep ascii key .
I remember that using wpa encryption needed the wpa-supplicant script to run
so I went with wep.
I also removed various scripts in /etc/network that delayed the starting / stopping script
and decided I didn't need them
here is my /etc/network listing now:

root@turion:/home/thk# ls -l /etc/network
total 8
drwxr-xr-x 6 root root� 168 2007-11-09 15:52 bak
drwxr-xr-x 2 root root�� 48 2007-11-09 16:01 if-down.d
drwxr-xr-x 2 root root�� 80 2007-11-09 16:01 if-post-down.d
drwxr-xr-x 2 root root� 112 2007-11-09 16:01 if-pre-up.d
drwxr-xr-x 2 root root�� 48 2007-11-09 16:01 if-up.d
-rw-r----- 1 root admin 366 2007-11-09 16:29 interfaces
-rw-r----- 1 root admin 366 2007-11-09 16:19 interfaces~
root@turion:/home/thk# ls -lR /etc/network
/etc/network:
total 8
drwxr-xr-x 6 root root� 168 2007-11-09 15:52 bak
drwxr-xr-x 2 root root�� 48 2007-11-09 16:01 if-down.d
drwxr-xr-x 2 root root�� 80 2007-11-09 16:01 if-post-down.d
drwxr-xr-x 2 root root� 112 2007-11-09 16:01 if-pre-up.d
drwxr-xr-x 2 root root�� 48 2007-11-09 16:01 if-up.d
-rw-r----- 1 root admin 366 2007-11-09 16:29 interfaces
-rw-r----- 1 root admin 366 2007-11-09 16:19 interfaces~

/etc/network/bak:
total 0
drwxr-xr-x 2 root root 112 2007-04-29 18:27 if-down.d
drwxr-xr-x 2 root root 144 2007-04-29 15:25 if-post-down.d
drwxr-xr-x 2 root root 144 2007-11-09 15:50 if-pre-up.d
drwxr-xr-x 2 root root 192 2007-04-29 18:27 if-up.d

/etc/network/bak/if-down.d:
total 4
-rwxr-xr-x 1 root root 988 2007-03-27 21:40 avahi-autoipd
lrwxrwxrwx 1 root root� 32 2007-11-09 15:52 wpasupplicant -> ../../wpa_supplicant/ifupdown.sh

/etc/network/bak/if-post-down.d:
total 4
lrwxrwxrwx 1 root root� 23 2007-11-09 15:52 avahi-daemon -> ../if-up.d/avahi-daemon
-rwxr-xr-x 1 root root 997 2006-08-23 12:18 wireless-tools
lrwxrwxrwx 1 root root� 32 2007-11-09 15:52 wpasupplicant -> ../../wpa_supplicant/ifupdown.sh

/etc/network/bak/if-pre-up.d:
total 8
-rwxr-xr-x 1 root root 2391 2007-11-09 15:50 wireless-tools
-rw-r--r-- 1 root root 2358 2006-12-21 07:57 wireless-tools~
lrwxrwxrwx 1 root root�� 32 2007-11-09 15:52 wpasupplicant -> ../../wpa_supplicant/ifupdown.sh

/etc/network/bak/if-up.d:
total 16
-rwxr-xr-x 1 root root� 894 2007-03-27 21:40 avahi-autoipd
-rwxr-xr-x 1 root root 2005 2007-03-27 21:40 avahi-daemon
-rwxr-xr-x 1 root root 3190 2006-10-06 14:34 mountnfs
-rwxr-xr-x 1 root root� 462 2007-03-07 22:43 ntpdate
lrwxrwxrwx 1 root root�� 32 2007-11-09 15:52 wpasupplicant -> ../../wpa_supplicant/ifupdown.sh

/etc/network/if-down.d:
total 0

/etc/network/if-post-down.d:
total 4
-rwxr-xr-x 1 root root 997 2006-08-23 12:18 wireless-tools

/etc/network/if-pre-up.d:
total 8
-rwxr-xr-x 1 root root 2391 2007-11-09 15:50 wireless-tools
-rw-r--r-- 1 root root 2358 2006-12-21 07:57 wireless-tools~

/etc/network/if-up.d:
total 0


bak directory stores the backups of the if-up.d e.t.c. directories.




Update 20071126

On Linux mint 4.0 that is based on ubuntu 7.10

I was able to use WPA-PSK encryption since it is supported.

On the network tool i chose wpa-psk encryption.

Don't forget to blacklist the bcm module that is loaded in kernel

Blacklist native bcm43xx drivers

Issue: sudo gedit /etc/modprobe.d/blacklist

Add the line: blacklist bcm43xx

After saving type at the terminal: sudo rmmod bcm43xx

See also http://ubuntuforums.org/showthread.php?t=285809


#!/bin/bash
# By Thimios Katsoulis 2006-2007
# email: thk@kaotonik.net
# Feel free to copy , modify distribute.
# Starts wireless network and stops wired
# or vice versa.
# Made for my Fujitsu Siemens Amilo 1655g laptop with
# Broadcom Wireless

ethernet_interface=eth0
wireless_interface=eth1


#-- functions ------
function stop_interface
{
echo "bringing down interface $1"
ifdown --force $1
sleep 1

}

function start_interface
{
echo "starting interface $1"
ifup --force $1
}

function restart_interface
{
stop_interface $1
start_interface $1
}

function turn_off_radio
{
echo "turning off broadcom wireless card"
echo "0" > /proc/fsaa1655g/radio
}

function turn_on_radio
{
echo "turning on broadcom wireless card"
echo "1" > /proc/fsaa1655g/radio
}

function load_module
{
if [ $# -eq 1 ]
then
module=$1
if ! lsmod|grep $module
then
echo "loading module $module"
modprobe $module
else
echo "module $module is already loaded"
fi
else
echo "Usage is: load_module <module name>"
fi
}

function load_necessary_modules
{
#driver for the wireless card
load_module ndiswrapper
#this module turns on and off the wireless hardware
load_module fsaa1655g
}


#---- main ---------------

load_necessary_modules
sleep 1

if grep 0 /proc/fsaa1655g/radio
then
# Wireless is closed. Open it and stop wired
turn_on_radio
stop_interface $ethernet_interface
start_interface $wireless_interface
xmessage -center "Wireless started"
else
# Wireless is open. Close it and start wired
turn_off_radio
stop_interface $wireless_interface
start_interface $ethernet_interface
xmessage -center "Wireless stopped"
fi


You can add it to your kde or gnome menu , and set it to run as root.

Don't forget after you copy paste the above code to a text file , to make this text file executable:

Right click on the file and change it's permissions or in the console type: chmod +x <script's file name>



12. Now you should have wireless if everything went Ok.

Check with the ifconfig and iwconfig commands .

Disconnect your wired ethernet adapter and ping an ip on your local Lan.

Does it pong?

Good luck..

Update 20080628
On linux mint elyssaa which is based on ubuntu hardy.
Every time the installation of this card becomes different.
This time :
sudo apt-get install bc43-fwcutter
if it doesn't find it google a little bit to find the correct repository for this
 package.  bc43-fwcutter will install the correct driver during installation. Run above command from console.
Follow the steps (number 8) described above to install fsaa1655g .
Uninstall ndiswrapper if you had installed it .
the script is modified this way with just deletion of the loading of ndiswrapper in load_necessary_modules.



#!/bin/bash
# By Thimios Katsoulis 2006-2007
# thk@kaotonik.net
# Feel free to copy , modify destribute.
# Starts wireless network and stops wired
# or vice versa
# Made for my Fujitsu Siemens Amilo 1655g laptop with
# Broadcom Wireless
 
ethernet_interface=eth0
wireless_interface=wlan0


#-- functions ------
function stop_interface
{
echo "bringing down interface $1"
ifdown --force  $1
sleep 1

}

function start_interface
{
echo "starting interface $1"
ifup --force  $1
}

function restart_interface
{
stop_interface $1
start_interface $1
}

function turn_off_radio
{
echo "turning off broadcom wireless card"
echo "0" > /proc/fsaa1655g/radio
}

function turn_on_radio
{
echo "turning on broadcom wireless card"
echo "1" > /proc/fsaa1655g/radio   
}

function load_module
{
if [ $# -eq 1 ]
then
    module=$1
    if ! lsmod|grep $module
    then
        echo "loading module $module"
        modprobe $module
    else
        echo "module $module is already loaded"
    fi
else
    echo "Usage is: load_module <module name>"
fi
}

function load_necessary_modules
{

#this module turns on and off the wireless hardware
load_module fsaa1655g
}


#---- main ---------------

    load_necessary_modules
    sleep 1

    if  grep 0 /proc/fsaa1655g/radio
    then
    # Wireless is closed. Open it and stop wired
    turn_on_radio
    stop_interface $ethernet_interface       
        start_interface $wireless_interface           
        xmessage -center "Wireless started"
    else
    # Wireless is open. Close it and start wired
    turn_off_radio
        stop_interface $wireless_interface     ​​​​​​​​​​​  
    start_interface  $ethernet_interface
        xmessage -center "Wireless stopped"
    fi




Links I found useful :

http://www.tuxmagazine.com/node/1000167

http://www.linuxant.com/driverloader/drivers.php

http://www.marvec.org/amilo/

http://www-net.cs.umass.edu/uprm/uprm_wireless-too​​​​​​​​​​​​​​​​​ls​.pp​t