LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   how to use ndiswrapper for BCM4328 (https://www.linuxquestions.org/questions/linux-networking-3/how-to-use-ndiswrapper-for-bcm4328-785333/)

casualzone 01-28-2010 06:55 AM

how to use ndiswrapper for BCM4328
 
I followed the internet threat to install ndiswrapper

1. downloaded ndiswrapper.tar & untar it
2. type: make KBUILD=/usr/src/kernels/2.6.18-164.11.1.el5-x86_64/

it prompted me:



[root@circuit ndiswrapper-1.55]# make KBUILD=/usr/src/kernels/2.6.18-164.11.1.el5-x86_64/
make -C driver
make[1]: Entering directory `/usr/src/ndiswrapper-1.55/driver'
make -C /usr/src/kernels/2.6.18-164.11.1.el5-x86_64/ M=/usr/src/ndiswrapper-1.55/driver
make[2]: Entering directory `/usr/src/kernels/2.6.18-164.11.1.el5-x86_64'
Building modules, stage 2.
MODPOST
make[2]: Leaving directory `/usr/src/kernels/2.6.18-164.11.1.el5-x86_64'
make[1]: Leaving directory `/usr/src/ndiswrapper-1.55/driver'
make -C utils
make[1]: Entering directory `/usr/src/ndiswrapper-1.55/utils'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/src/ndiswrapper-1.55/utils'



3. after that I try to "make install" or ndiswrapper -i *.inf
it gave me:
bash: ndiswrapper: command not found

GrapefruiTgirl 01-28-2010 11:55 PM

http://fedoramobile.org/fc-wireless/...nux-sta-driver

According to this link above, the Linux Broadcom STA driver, direct from Broadcom, will (hopefully) work for your wireless device.
Here's the info and download page on the Broadcom website: http://www.broadcom.com/support/802.11/linux_sta.php

And if this works for your device, you won't need NDISwrapper.

So, if you either need help implementing the STA driver, or determine that it will not actually work for your device, let us know, and we'll continue helping either way.
Also, next time you post, please tell us what Linux OS and version you are using, if it's 64bit or 32bit, and whether your wireless gadget is a USB thing, or built into the machine.

EDIT: I see now, it's 64bit RHEL

Cheers!
Sasha

casualzone 01-31-2010 08:09 PM

sorry for late reply..

here are my laptop info:
#/sbin/lspci

06:00.0 Network controller: Broadcom Corporation BCM4328 802.11a/b/g/n (rev 03)

#uname -a
Linux circuit 2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux


The wireless hardware is BCM4328.
The link given to me is only for "BCM4311-, BCM4312-, BCM4321-, and BCM4322-based hardware." according to the http://www.broadcom.com/support/802.11/linux_sta.php

I just wonder I could use the driver in the link or I have to use ndiswrapper? I nvm use ndiswrapper before. I just want to use wireless bcos i only have wireless connection at home. Could someone advise me how to use ndiswrapper or where can I get BCM4328 linux driver?


Thank you

casualzone 01-31-2010 08:50 PM

I tried to install the broadcom linux driver from the link:

1. untar it to /usr/src/hybrid_wl
2. make clean
3. make
it prompted me:

KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`
make[1]: Entering directory `/usr/src/kernels/2.6.18-164.11.1.el5-x86_64'
LD /usr/src/hybrid_wl/built-in.o
CC [M] /usr/src/hybrid_wl/src/wl/sys/wl_linux.o
In file included from /usr/src/hybrid_wl/src/wl/sys/wl_linux.c:20:
/usr/src/hybrid_wl/src/include/typedefs.h:70: error: conflicting types for ‘bool’
include/linux/types.h:36: error: previous declaration of ‘bool’ was here
make[2]: *** [/usr/src/hybrid_wl/src/wl/sys/wl_linux.o] Error 1
make[1]: *** [_module_/usr/src/hybrid_wl] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.18-164.11.1.el5-x86_64'
make: *** [all] Error 2

Here is the /lib/modules/2.6.18-164.e15
I have edit the soft link because the path is invalid (old file is build_old)

lrwxrwxrwx 1 root root 52 Feb 1 10:31 build -> ../../../usr/src/kernels/2.6.18-164.11.1.el5-x86_64/
lrwxrwxrwx 1 root root 46 Jan 27 11:51 build_old -> ../../../usr/src/kernels/2.6.18-164.el5-x86_64
drwxr-xr-x 2 root root 4096 Sep 3 15:54 extra
drwxr-xr-x 9 root root 4096 Jan 27 11:51 kernel
-rw-r--r-- 1 root root 271322 Jan 27 11:51 modules.alias
-rw-r--r-- 1 root root 69 Jan 27 11:51 modules.ccwmap
-rw-r--r-- 1 root root 208636 Jan 27 11:51 modules.dep
-rw-r--r-- 1 root root 147 Jan 27 11:51 modules.ieee1394map
-rw-r--r-- 1 root root 375 Jan 27 11:51 modules.inputmap
-rw-r--r-- 1 root root 2314 Jan 27 11:51 modules.isapnpmap
-rw-r--r-- 1 root root 74 Jan 27 11:51 modules.ofmap
-rw-r--r-- 1 root root 207488 Jan 27 11:51 modules.pcimap
-rw-r--r-- 1 root root 4033 Jan 27 11:51 modules.seriomap
-rw-r--r-- 1 root root 135856 Jan 27 11:51 modules.symbols
-rw-r--r-- 1 root root 356940 Jan 27 11:51 modules.usbmap
lrwxrwxrwx 1 root root 5 Jan 27 11:51 source -> build
drwxr-xr-x 2 root root 4096 Sep 3 15:54 updates
drwxr-xr-x 2 root root 4096 Sep 3 15:54 weak-updates

casualzone 01-31-2010 09:05 PM

I resolved the problem by:

Open file include/typedefs.h and add there the line below at header
#define TYPEDEF_BOOL

recommended by > http://centos.org/modules/newbb/prin...er=ASC&start=0

#make

KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`
make[1]: Entering directory `/usr/src/kernels/2.6.18-164.11.1.el5-x86_64'
CC [M] /usr/src/hybrid_wl/src/wl/sys/wl_linux.o
CC [M] /usr/src/hybrid_wl/src/wl/sys/wl_iw.o
CC [M] /usr/src/hybrid_wl/src/shared/linux_osl.o
LD [M] /usr/src/hybrid_wl/wl.o
Building modules, stage 2.
MODPOST
CC /usr/src/hybrid_wl/wl.mod.o
LD [M] /usr/src/hybrid_wl/wl.ko
make[1]: Leaving directory `/usr/src/kernels/2.6.18-164.11.1.el5-x86_64'

casualzone 01-31-2010 09:34 PM

I have copied the compile wl.ko to /lib/modules/2.6.18-164.el5/kernel/net/wireless

# depmod
# modprobe wl

# modprobe lib80211
# insmod wl.ko

I got this:
FATAL: Module lib80211 not found.

so how???

GrapefruiTgirl 01-31-2010 10:15 PM

Hey, looks like you are doing great here! Just a missing 80211 module, but looks like you have so far had good success getting the STA driver compiled, and it modprobes which is a good sign.

The 80211 module would be, as you likely are aware, a kernel module built when your kernel was compiled. It should be located in the /lib/modules/$(uname -r)/kernel/ folder somewhere, IF it is on your system. Have a look in there to see if it's there; something tells me you have the name wrong (it is not lib80211) but I could be wrong about this.

I do not have any wireless modules built on my own machine currently, otherwise I would have a look and verify the name. It *might* be "mac80211" but again, I am not sure.

Note that the `modprobe` command does not return any feedback messages, when it works. Therefore, you do not need to do `modprobe` and then `insmod` of the same module, as you seem to have indicated above.

So, have a peek into your modules folder, perhaps in the /net subfolder, and make sure you have the 80211 module in there.
If you do not have it anywhere, you'd need a kernel-rebuild, or a kernel upgrade via your package manager, to get a version with the wireless module(s) available.

Sasha

casualzone 01-31-2010 10:33 PM

Thanks for your swift response!

in the folder of /lib/modules/2.6.18-164.el5/kernel/net
It got ieee80211 mac80211 .... which one should I use?

PS: If i know how to compile kernel, i wish to since it is so troublesome on drivers especially in new laptop. however I bought my laptop just 2 year back, not the new one :p
Spending time on drivers really wasting time and not productive...

casualzone 01-31-2010 10:44 PM

# /sbin/modprobe mac80211
FATAL: Error inserting mac80211 (/lib/modules/2.6.18-164.el5/kernel/net/mac80211/mac80211.ko): Unknown symbol in module, or unknown parameter (see dmesg)

# /sbin/modprobe ieee80211
nothing..

in folder: /lib/modules/2.6.18-164.el5/kernel/net
# /sbin/insmod wl.ko
insmod: can't read 'wl.ko': No such file or directory

&
in folder: /lib/modules/2.6.18-164.el5/kernel/net/wireless
cp /usr/src/hybrid_wl/wl.ko .
/sbin/insmod wl.ko

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


errr... what should I do???

casualzone 01-31-2010 10:47 PM

Did you mean I only need to execute /sbin/modprobe ieee80211
and no need to execute # insmod wl.ko???

The readme from broadcom:

4: Insmod the driver.

If you were already running a previous version of wl, you'll want to provide a
clean transition from the older driver. (The path to previous driver is usually
/lib/modules/<kernel-version>/kernel/net/wireless)

# rmmod wl
# mv <path-to-prev-driver>/wl.ko <path-to-prev-driver>/wl.ko.orig
# cp wl.ko <path-to-prev-driver>/wl.ko
# depmod
# modprobe wl

Otherwise, if you have not previously installed a wl driver do this:

# modprobe lib80211
# insmod wl.ko

wl.ko is now operational. It may take several seconds for the Network Manager
to notice a new network driver has been installed and show the surrounding
wireless networks.

casualzone 01-31-2010 10:49 PM

I think i have installed it?

i checking -->/sbin/iwconfig
lo no wireless extensions.

eth0 no wireless extensions.

sit0 no wireless extensions.

eth1 IEEE 802.11abgn ESSID:""
Mode:Managed Frequency:2.412 GHz Access Point: Not-Associated
Bit Rate=14 Mb/s Tx-Power:32 dBm
Retry min limit:7 RTS thr:off Fragment thr:off
Power Managementmode:All packets received
Link Quality=5/5 Signal level=-256 dBm Noise level=-256 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0



Does it mean it is installed????

GrapefruiTgirl 01-31-2010 10:52 PM

Hmm.. OK, when you did /sbin/modprobe ieee80211 and got no reply from the machine, that means it worked. If you type:

Code:

shell$ lsmod
after inserting a module, you will see the module in the produced list.

When you modprobe a module, it is the same as `insmod`, only it is more recent, and usually better, to use modprobe instead of insmod, because modprobe will automatically insert any other modules that the one you want, depends on. Also, you do not need the .ko extension when inserting a module.

As to why your mac80211 module gave an error, I can think of two reasons (or maybe 3 reasons):
1-- The module does not match your kernel (it is from a different kernel)
2-- There is a configuration parameter being passed to the module, which the module does not like.
3-- No hardware is present on the machine for the module to interact with.


Please show the output now, from `lsmod`

GrapefruiTgirl 01-31-2010 10:54 PM

Right -- modprobe should insert the module, as well as any others that it depends on. But to start fresh, it is best to remove any modules that are already inserted, like the README says.
Also (sort of contrary to what I just said), there are numerous threads around here, where people are having to modprobe one before the other, since doing it the other way around seems to cause issues. You may also find that you will need to blacklist any other module that your kernel thinks is the right one for your device; in this case, an example of something you may need to blacklist, would be the b43 module, so the kernel will not auto-probe it during boot, thereby screwing up your wl.ko and 80211 situation.

GrapefruiTgirl 01-31-2010 10:57 PM

According to your post # 11 it is installed :)

casualzone 01-31-2010 11:00 PM

thank you very much!!


All times are GMT -5. The time now is 08:46 AM.