Unable to connect by wireless

Hi at all,

I have installed OpenSuse 11.4 64bit also on my laptop.
The problem is that I don’t know how to connect it by wireless.

In YaST2 → Network Setting there is only the following:
RTL8111/8168B PCI Express Gigabit Ethernet controller

Thanks,

Fabio

Hi at all,

I have installed OpenSuse 11.4 64bit also on my laptop.
The problem is that I don’t know how to connect it by wireless.

In YaST2 → Network Setting there is only the following:
RTL8111/8168B PCI Express Gigabit Ethernet controller

Thanks,

Fabio

Sorry to hear of your problem. Some how, we need to know just what wireless hardware that you have. If you can specify the computer, brand and model that can help. If you know the exact wireless chipset and manufacture, that is even better. I do have a bash script that can help dig out the information. Specifically, each item has a manufacturer number and a device number which can help lock in the exact device to make work. Here is the bash script I called netinfo in message #11:

netinfo - Read Network & PC Information into a Local Text File - Page 2

Unfortunately, not every wireless device works with Linux, but a whole lot of them do, but with what device can we start helping you with?

Thank You,

Very thanks jdmcdaniel3,

Here is the netinfo file generated by your bash script:

netinfo - file

Fabio

So this is the info about your wireless adapter:

23: PCI 300.0: 0280 Network controller
  [Created at pci.318]
  Unique ID: svHJ.3dzvUmOhw4D
  Parent ID: z8Q3.T5LTIjM07o2
  SysFS ID: /devices/pci0000:00/0000:00:1c.0/0000:03:00.0
  SysFS BusID: 0000:03:00.0
  Hardware Class: network
  Model: "Broadcom Network controller"
  Vendor: pci 0x14e4 "Broadcom"
  Device: pci 0x4727 
  SubVendor: pci 0x185f "Wistron NeWeb Corp."
  SubDevice: pci 0x051a 
  Revision: 0x01
  Memory Range: 0xfc500000-0xfc503fff (rw,non-prefetchable)
  IRQ: 16 (97 events)
  Module Alias: "pci:v000014E4d00004727sv0000185Fsd0000051Abc02sc80i00"
  Driver Info #0:
    Driver Status: brcm80211 is active
    Driver Activation Cmd: "modprobe brcm80211"
  Config Status: cfg=no, avail=yes, need=no, active=unknown
  Attached to: #13 (PCI bridge)

It appears that your openSUSE install has not loaded anything else to make it work. One web site identified the Broadcom number 14e4:4727 as being part of the BCM4313 Line. You can actually find proprietary drivers for this located here:

Broadcom.com - 802.11 Linux STA driver

I wrote a bash script designed to install the 64 bit driver listed on that page. If you download the 64 bit driver, the patch file and the readme file to your ~/Downloads folder, you can use my script to install it:

#!/bin/bash

#: Title       : install_wireless
#: Date Created: Sat Jun 4 08:55:09 CDT 2011
#: Last Edit   : Sun Jun 5 14:09:09 CDT 2011
#: Author      : J. McDaniel
#: Version     : 1.01
#: Description : 
#: Options     : 

if  $UID -ne 0 ]]; then
  cd ~/Downloads
  rm -rf hybrid_wl
  mkdir hybrid_wl
  cd hybrid_wl
  tar xzf ~/Downloads/hybrid-portsrc_x86_64-v5_100_82_38.tar.gz
  make clean
  patch -p0 < ~/Downloads/5_100_82_38.patch
  make
  echo "Root User Permissions are required, Please Enter the ..."
  echo
  sudo $0 $HOME
  exit 0
fi

cd $1/Downloads/hybrid_wl

/sbin/modprobe lib80211
/sbin/insmod wl.ko
cp wl.ko /lib/modules/`uname -r`/kernel/drivers/net/wireless
/sbin/depmod -a

cat /etc/rc.local | grep "modeprobe wl"
Exit_Code=$?

if  $(( Exit_Code )) -ge 1 ] ; then
  echo modeprobe wl >> /etc/rc.local
fi

exit 0
# End Of Script

Copy and past the above script into a text editor and save it into the ~/bin folder (/home/username/bin/install_wireless) as the text file install_wireless. Then open up a terminal session and enter the following command:

chmod +x ~/bin/install_wireless

If you then do use 64 bit, created the script and made it executable and downloaded the 64 bit source file and the patch file then open up another terminal session and type the following command:


install_wireless

Anytime you update the Linux kernel, you would need to run this same script again, to reinstall the wireless driver. To get the driver working, make a visit to:

YaST / Network Devices / Network Settings to configure your card. Once the wireless hardware is recognized, you may be asked to install additional software, that is normal. I use KDE and normally configure the program Network Manager to load and I must load the application KWallet to keep my network Pass Phrase and you must enter the SSID as well. Several things will come alive and require configuration once the hardware is working. If you should run the netinfo script, more things will show up about this new hardware.

Thank You,

Hi jdmcdaniel3,

I did this following step:

1- Downloaded the 64 bit driver, the patch file and the readme file into ~/Downloads folder

2- Copied your bash script named it install_wireless, then copied and past the code in the terminal:


chmod +x ~/bin/install_wireless

3- I reopened the terminal and type the command:


install_wireless

The result after step 3 is:

 
fabio@linux-shrv:~> install_wireless
KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd` clean
make[1]: Entering directory `/usr/src/linux-2.6.37.6-0.5-obj/x86_64/desktop'
make -C ../../../linux-2.6.37.6-0.5 O=/usr/src/linux-2.6.37.6-0.5-obj/x86_64/desktop/. clean
make[1]: Leaving directory `/usr/src/linux-2.6.37.6-0.5-obj/x86_64/desktop'
/home/fabio/bin/install_wireless: line 18: patch: command not found
KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`
make[1]: Entering directory `/usr/src/linux-2.6.37.6-0.5-obj/x86_64/desktop'
make -C ../../../linux-2.6.37.6-0.5 O=/usr/src/linux-2.6.37.6-0.5-obj/x86_64/desktop/. 
  LD      /home/fabio/Downloads/hybrid_wl/built-in.o
  CC [M]  /home/fabio/Downloads/hybrid_wl/src/shared/linux_osl.o
  CC [M]  /home/fabio/Downloads/hybrid_wl/src/wl/sys/wl_linux.o
/home/fabio/Downloads/hybrid_wl/src/wl/sys/wl_linux.c: In function ‘wl_attach’:
/home/fabio/Downloads/hybrid_wl/src/wl/sys/wl_linux.c:485:3: error: implicit declaration of function ‘init_MUTEX’
make[4]: *** [/home/fabio/Downloads/hybrid_wl/src/wl/sys/wl_linux.o] Error 1
make[3]: *** [_module_/home/fabio/Downloads/hybrid_wl] Error 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.37.6-0.5-obj/x86_64/desktop'
make: *** [all] Error 2
Root User Permissions are required, Please Enter the ...

root's password:
insmod: can't read 'wl.ko': No such file or directory
cp: cannot stat `wl.ko': No such file or directory
modeprobe wl

Is it correct?

Thanks,

Fabio

On 07/29/2011 10:16 AM, fabio g wrote:
>
> Hi jdmcdaniel3,
>
> I did this following step:
>
> 1- Downloaded the 64 bit driver, the patch file and the readme file
> into ~/Downloads folder
>
> 2- Copied your bash script named it install_wireless, then copied and
> past the code in the terminal:
>
>
> Code:
> --------------------
>
> chmod +x ~/bin/install_wireless
>
> --------------------
>
>
> 3- I reopened the terminal and type the command:
>
>
> Code:
> --------------------
>
> install_wireless
>
> --------------------
>
>
> The result after step 3 is:
>
>
> Code:
> --------------------
>
> fabio@linux-shrv:~> install_wireless
> KBUILD_NOPEDANTIC=1 make -C /lib/modules/uname -r/build M=pwd clean
> make[1]: Entering directory `/usr/src/linux-2.6.37.6-0.5-obj/x86_64/desktop’

make -C …/…/…/linux-2.6.37.6-0.5 O=/usr/src/linux-2.6.37.6-0.5-obj/x86_64/desktop/. clean
make[1]: Leaving directory /usr/src/linux-2.6.37.6-0.5-obj/x86_64/desktop' &gt; /home/fabio/bin/install_wireless: line 18: patch: command not found &gt; KBUILD_NOPEDANTIC=1 make -C /lib/modules/uname -r/build M=pwd&gt; make[1]: Entering directory/usr/src/linux-2.6.37.6-0.5-obj/x86_64/desktop’
make -C …/…/…/linux-2.6.37.6-0.5 O=/usr/src/linux-2.6.37.6-0.5-obj/x86_64/desktop/.
LD /home/fabio/Downloads/hybrid_wl/built-in.o
CC [M] /home/fabio/Downloads/hybrid_wl/src/shared/linux_osl.o
CC [M] /home/fabio/Downloads/hybrid_wl/src/wl/sys/wl_linux.o
/home/fabio/Downloads/hybrid_wl/src/wl/sys/wl_linux.c: In function ‘wl_attach’:
/home/fabio/Downloads/hybrid_wl/src/wl/sys/wl_linux.c:485:3: error: implicit declaration of function ‘init_MUTEX’
make[4]: *** [/home/fabio/Downloads/hybrid_wl/src/wl/sys/wl_linux.o] Error 1
make[3]: *** [module/home/fabio/Downloads/hybrid_wl] Error 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory /usr/src/linux-2.6.37.6-0.5-obj/x86_64/desktop' &gt; make: *** [all] Error 2 &gt; Root User Permissions are required, Please Enter the ... &gt; &gt; root's password: &gt; insmod: can't read 'wl.ko': No such file or directory &gt; cp: cannot stat wl.ko’: No such file or directory
> modeprobe wl
>
> --------------------
>
>
> Is it correct?
>
> Thanks,

With all those “error” outputs, what do you think.

You need to install patch and rerun.

Thanks for teaching me to read.

My problem was if the three steps were incorrect or incomplete and
if I do some other action that I don’t know.

On 07/29/2011 12:16 PM, Larry Finger wrote:
> On 07/29/2011 10:16 AM, fabio g wrote:
>>
>> Hi jdmcdaniel3,
>>
>> I did this following step:
>>
>> 1- Downloaded the 64 bit driver, the patch file and the readme file
>> into ~/Downloads folder
>>
>> 2- Copied your bash script named it install_wireless, then copied and
>> past the code in the terminal:
>>
>>
>> Code:
>> --------------------
>>
>> chmod +x ~/bin/install_wireless
>>
>> --------------------
>>
>>
>> 3- I reopened the terminal and type the command:
>>
>>
>> Code:
>> --------------------
>>
>> install_wireless
>>
>> --------------------
>>
>>
>> The result after step 3 is:
>>
>>
>> Code:
>> --------------------
>>
>> fabio@linux-shrv:~> install_wireless
>> KBUILD_NOPEDANTIC=1 make -C /lib/modules/uname -r/build M=pwd clean
>> make[1]: Entering directory `/usr/src/linux-2.6.37.6-0.5-obj/x86_64/desktop’

make -C …/…/…/linux-2.6.37.6-0.5
O=/usr/src/linux-2.6.37.6-0.5-obj/x86_64/desktop/. clean
make[1]: Leaving directory `/usr/src/linux-2.6.37.6-0.5-obj/x86_64/desktop’
>> /home/fabio/bin/install_wireless: line 18: patch: command not found

The above line is the first one that goes wrong. You still need to look
carefully at the output. If the script cannot patch the stupid Broadcom code to
work with modern kernels, you will get exactly the kind of compilation errors
that you see below. To get patch, you need to do the following:

sudo zypper install patch

After you complete that step WITHOUT ERROR, then repeat the ‘install_wireless’.

The line “patch -p0 < ~/Downloads/5_100_82_38.patch” is supposed to install the patch file. I think the problem is when you select the patch from the Web Site, it just loads up the text on screen. You need to copy the text into a text editor and save it as the file 5_100_82_38.patch in your ~/Downloads folder. I think that this file is simply not saved there.

Here is a copy of that patch file again:


#
# Patch for Broadcom 80211 (STA) driver 5.100.82.38
# Fixes the 'init_MUTEX' compile problem seen on newer (> 2.6.37) kernels.
# If you were able to compile, you don't need this patch.
# To apply:
#    cd to the top level of the driver source. ('ls' should show at least src, lib, Makefile)
#    patch -p0 < this_file
#    make
#

--- src/wl/sys/wl_linux.c    2011-05-20 12:07:25.303356739 -0700
+++ src/wl/sys/wl_linux.c.new    2011-05-20 12:07:13.663356735 -0700
@@ -481,9 +481,9 @@
     if (WL_ALL_PASSIVE_ENAB(wl)) {
 #ifdef WL_ALL_PASSIVE
         spin_lock_init(&wl->txq_lock);
 #endif 
-        init_MUTEX(&wl->sem);
+        sema_init(&wl->sem, 1);
     }
 
     if (!(wl->wlc = wlc_attach((void *) wl, vendor, device, unit, wl->piomode,
         osh, wl->regsva, wl->bcm_bustype, btparam, &err))) {

Thank You,

On 07/29/2011 05:36 PM, jdmcdaniel3 wrote:
>
> The line “patch -p0< ~/Downloads/5_100_82_38.patch” is supposed to
> install the patch file. I think the problem is when you select the
> patch from the Web Site, it just loads up the text on screen. You need
> to copy the text into a text editor and save it as the file
> 5_100_82_38.patch in your ~/Downloads folder. I think that this file is
> simply not saved there.

No. The error message is "/home/fabio/bin/install_wireless: line 18: patch:
command not found ". He does not have patch installed.

Your script should check that /usr/bin/patch exists. If it does not, then report
that package patch needs to be installed.

No. The error message is "/home/fabio/bin/install_wireless: line 18: patch:
command not found ". He does not have patch installed.

Your script should check that /usr/bin/patch exists. If it does not, then report
that package patch needs to be installed.

Of course you are correct Larry and I shall make the required changes. I did not remember how the web site had served up this patch and that you could not actually “download” it. This script file was just something I whipped up a while back to install this driver and I was not really thinking of who all might be using it. It is surely worth ever penny it has cost them so far, but I shall try to do better in the future. I am also aware you abhor such wireless drivers, but I am only trying to help here if possible.

Thank You,

Very Very Very Thanks jdmcdaniel3 and Iwfinger,

I’m sending this message from my laptop through the wireless network!! :-))

I did the following steps:


fabio@linux-shrv:~> sudo zypper install patch
root's password:
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following NEW package is going to be installed:
  patch 

1 new package to install.
Overall download size: 79.0 KiB. After the operation, additional 151.0 KiB will 
be used.
Continue? [y/n/?] (y): y
Retrieving package patch-2.6.1.81-5.1.x86_64 (1/1), 79.0 KiB (151.0 KiB unpacked)
Retrieving: patch-2.6.1.81-5.1.x86_64.rpm [done (58.8 KiB/s)]
Installing: patch-2.6.1.81-5.1 [done]


fabio@linux-shrv:~> install_wireless
KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd` clean
make[1]: Entering directory `/usr/src/linux-2.6.37.6-0.5-obj/x86_64/desktop'
make -C ../../../linux-2.6.37.6-0.5 O=/usr/src/linux-2.6.37.6-0.5-obj/x86_64/desktop/. clean
make[1]: Leaving directory `/usr/src/linux-2.6.37.6-0.5-obj/x86_64/desktop'
patching file src/wl/sys/wl_linux.c
KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`
make[1]: Entering directory `/usr/src/linux-2.6.37.6-0.5-obj/x86_64/desktop'
make -C ../../../linux-2.6.37.6-0.5 O=/usr/src/linux-2.6.37.6-0.5-obj/x86_64/desktop/. 
  LD      /home/fabio/Downloads/hybrid_wl/built-in.o
  CC [M]  /home/fabio/Downloads/hybrid_wl/src/shared/linux_osl.o
  CC [M]  /home/fabio/Downloads/hybrid_wl/src/wl/sys/wl_linux.o
  CC [M]  /home/fabio/Downloads/hybrid_wl/src/wl/sys/wl_iw.o
  LD [M]  /home/fabio/Downloads/hybrid_wl/wl.o
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: modpost: missing MODULE_LICENSE() in /home/fabio/Downloads/hybrid_wl/wl.o
see include/linux/module.h for more information
  CC      /home/fabio/Downloads/hybrid_wl/wl.mod.o
  LD [M]  /home/fabio/Downloads/hybrid_wl/wl.ko
make[1]: Leaving directory `/usr/src/linux-2.6.37.6-0.5-obj/x86_64/desktop'
Root User Permissions are required, Please Enter the ...

insmod: error inserting 'wl.ko': -1 File exists
modeprobe wl

*** Thanks!!! ***

Fabio

Here is a much more comprehensive version of the bash script file install_wireless. Copy the following text into a text editor and save it as the file install_wireless into your ~/bin folder. (/home/username/bin/install_wireless):

#!/bin/bash

#: Title       : install_wireless
#: Date Created: Sat Jun 4 08:55:09 CDT 2011
#: Last Edit   : Sat Jul 30 09:35:00 CDT 2011
#: Author      : J. McDaniel
#: Version     : 1.20
#: Description : Install Broadcom Wireless Driver
#: Options     : none


#
# Broadcom file and site names at present time - Must update if file names change
#
bcwebsite="http://www.broadcom.com/docs/linux_sta"
sf32bit="hybrid-portsrc_x86_32-v5_100_82_38.tar.gz"
sf64bit="hybrid-portsrc_x86_64-v5_100_82_38.tar.gz"
patchfile="5_100_82_38.patch"

#
# Set files for 32 or 64 bit
#
bits=$(uname -m)
if  $bits == "x86_64" ]] ; then
  sourcefile=$sf64bit
else
  sourcefile=$sf32bit
fi

#
# Where do you download your files?
#
download=~/Downloads

tput clear
echo "This script file must find the files:"
echo
echo " $sourcefile"
echo 
echo " <and>"
echo
echo " $patchfile"
echo
echo "in the $download folder."
echo
echo "These files will be downloaded from the Broadcom Web Site if they do not exist"
echo "and you have a Wired network connection now.  If you do not have these files"
echo "and no network connection, this installation script file will fail to work."
echo
echo -n "Do you wish to proceed with the install on your $bits system now (y/N)? "

read CHOICE

if  $CHOICE != [Yy] ]] ; then
  exit 0
fi

#
# Determine if the ~/Downloads folder exists and switch to it
#
if  -d "$download" ]] ; then
  cd $download
else
  echo "The File Downloads Folder: $download, does not exist!"
  echo "Please create or change this folder name and start $(basename $0) again."
  echo
  exit 1
fi

#
# Download Driver file from Broadcom
#
if  ! -e "$sourcefile" ] ; then
  wget -nc "$bcwebsite/$sourcefile"
  if  ! -e "$sourcefile" ] ; then
    echo "The Driver Source File: $sourcefile, was not found!"
    exit 1
  fi
fi

#
# Download Patch file from Broadcom
#
if  ! -e "$patchfile" ] ; then
  wget -nc "$bcwebsite/$patchfile"
  if  ! -e "$patchfile" ] ; then
    echo "The Driver Patch File: $patchfile, was not found!"
    exit 1
  fi
fi

#
# Main Program Starts here
#
tput clear
echo
echo "Are your ready to install: " 
echo
echo " $sourcefile"
echo 
echo " <and>"
echo
echo " $patchfile"
echo
echo -n "on to your computer now (y/N)?"

read CHOICE

if  $CHOICE != [Yy] ]] ; then
  exit 0
fi

if  $UID -ne 0 ]]; then
  rm -rf hybrid_wl
  mkdir hybrid_wl
  cd hybrid_wl
  tar xzf "$download/$sourcefile"
  make clean
  patch -p0 < "$download/$patchfile"
  make
  Exit_Code=$?
  if  $(( Exit_Code )) -ge 1 ] ; then
    echo
    echo "The Compile Process Failed with exit code $Exit_Code."
    exit 1
  fi
else
  echo "Please do not start $(basename $0) as a root user!"
  exit 1
fi

#
# Install Device Driver Here
#

sudo /sbin/modprobe lib80211
sudo /sbin/insmod wl.ko
sudo cp wl.ko /lib/modules/`uname -r`/kernel/drivers/net/wireless
sudo /sbin/depmod -a

sudo cat /etc/rc.local | grep "modeprobe wl"
Exit_Code=$?

if  $(( Exit_Code )) -ge 1 ] ; then
  sudo echo modeprobe wl >> /etc/rc.local
fi

echo
echo "Your Broadcom $sourcefile and $patchfile files have been installed"
echo

exit 0
# End Of Script

Then, open up a terminal session and mark this script as executable with the command:

chmod +x ~/bin/install_wireless

To use the script, open a terminal session and type the command:

install_wireless

In you have not already downloaded the correct files and you have an active wired network connection, the correct files will be downloaded for you with this script. This was tested on a Dell Latitude E6410 Laptop with an active wired connection. I was using KDE and I had activated NetworkManager and KWallet. I was not using a hidden SSID and KWallet was used to keep the Network Pass Phrase and I had to log into KWallet on each session startup.

Thank You,

fabio_g, happy to hear of your success. I have updated the script and so you should keep a copy to use if you update your kernel. You must reinstall this driver for any kernel upgrade. The script will make it easy to do every time.

Thank You,

Thanks a lot jdmcdaniel3 that script will be very useful for me!!!

Fabio