# HELP!! ndiswrapper seems to work but then... no.

## hilbertAx

Hello!

I'm a newbie, trying to make a wireless connection work on a HP zd7229 laptop with integrated broadcom 802.11g, running Gentoo 2.6.9-r1.

I know I have to use ndiswrapper with driver bcmwl5a.

ndiswrapper -l gives:

```

bcmwl5a hardware present

```

then

```

ash-2.05b# iwconfig wlan0

wlan0     IEEE 802.11g  ESSID:off/any

          Mode:Managed  Frequency:2.462 GHz  Access Point: 00:00:00:00:00:00

          Bit Rate:54 Mb/s   Tx-Power:16 dBm

          RTS thr:2347 B   Fragment thr:2346 B

          Encryption key:off

          Power Management:off

          Link Quality:100/100  Signal level:-10 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

```

and

```

bash-2.05b# ifconfig wlan0 up

bash-2.05b# ifconfig -a

eth0      Link encap:Ethernet  HWaddr 00:C0:9F:42:19:A1

          inet addr:192.168.2.6  Bcast:192.168.2.255  Mask:255.255.255.0

          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:1955 errors:0 dropped:0 overruns:0 frame:0

          TX packets:1918 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:2454231 (2.3 Mb)  TX bytes:175797 (171.6 Kb)

          Interrupt:20 Base address:0x3000

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:28 errors:0 dropped:0 overruns:0 frame:0

          TX packets:28 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:1808 (1.7 Kb)  TX bytes:1808 (1.7 Kb)

wlan0     Link encap:Ethernet  HWaddr 00:90:4B:5D:7C:8F

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:3 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:0 (0.0 b)  TX bytes:1770 (1.7 Kb)

          Interrupt:21 Memory:d2004000-d2005fff

```

Where's the problem then?

That when I dhcpcd wlan0, it doesn't find the network and I can't surf.

I know I might miss something simple, please help me...

Ah, my AP router has no WEP, no encryption, nothing. It is a Belkin.[/code]

----------

## stikboy

using the same driver (but different router)  here are the steps (thrown into a cheap bash script) I use to bring up my wireless card:

```

#!/bin/bash

iwconfig wlan0 mode Managed

iwconfig wlan0 rate auto

#iwconfig wlan0 key "wepkeycgoeshere"

iwconfig wlan0 essid olympus [color=red] <--change to your router name [/color]

ifconfig wlan0 up

dhcpcd wlan0

```

I really don't know what the mode Managed does, but these steps work, so I don't feel any urge to break it more  :Smile:   also, if you do enable WEP security, you can use the key line with your key.

I have this script in root's home directory and run it whenever I am using my wireless, but if you only use wireless you could probably put it in an init script somehow to start on boot

----------

## hilbertAx

Hi Stikboy,

it seems I found the problem (but I didn't solved it).

I cannot set my ESSID: when I issue the command:

iwconfig wlan0 essid "belkin54g"

and then:

iwconfig wlan0

it stillt reports in the essid section "off/any"

Why is this happening? It seems to ignore the set-essid command.

----------

## stikboy

hmmm.    What is the out put of:

```
cat /proc/pci | grep -i broadcom
```

Also, are there any errors in dmesg when trying to set essid? or perhaps /var/log/messages?

I have the BCM94306 chipset, and this link:

http://ndiswrapper.sourceforge.net/supported_chipsets.html

has 4 different drivers for that card.  I believe I had a similar issue when first setting mine up (sorry it's been a long time so don't remember exactly) but I ended up having to install all 4 a few times (was trying to get the commands right at the same time too  :Smile:   )

I also recall that these sets included  bcmwl5 and bcmwl5a drivers for each file. I ended up using bcmwl5

```

sunger@versuvius ~ $ ndiswrapper -l

Installed ndis drivers:

bcmwl5  driver present, hardware present

```

it may a matter of trial and error on which driver actually works for your card.  You will have to unistall old driver, then install new driver, restart ndis and check again (and maybe again and again  :Rolling Eyes:  )

And if you haven't seen it, here is a nice how-to on setting up the ndiswrapper:

https://forums.gentoo.org/viewtopic.php?t=125627&highlight=ndis

Let me know if any of this works or if we're still in the same boat.

----------

## hilbertAx

Hi Stikboy.

I would really like to see that wireless card working.

It is integrated in my hp laptop, it is new and I only have wireless internet access at the moment.

So I'm working on it.

First, let's answer your questions.

1-the output of the command you gave me is:

Network controller:Broadcom Corporation BCM4306 802.11/g Wireless LAN Controller (rev3)

2-I don't get any error message when trying to change essid, it simply wouldn't do it.

Curiously, it changes essid if I set mode AUTO, and it finds my AP/router belkin54g, but then it sets the mode ad-hoc (that's probably why it shows a different MAC) and when I try to dhcpcd it, it just waits until time expires and brings wlan0 down.

3-I read in some post in a hp zd7000 (my laptop) forum that I should be using bcmwl5a.

Now my questions:

a)Just to avoid messing things up, could you give me a detailed list of what to do (all the commands) to uninstall a driver and install another one? I'm afraid I don't know how to avoid ndiswrapper auto loading at boot. [I can get this info around here so if you are in a hurry just ignore this point]

b)Should I use managed mode? This AP/Belkin router I have is completely autoconfiguring, I just now (via the router html configure) the essid and that WEP is disabled, maybe there could be some other issues I should check?

c)I have also another connection (eth0). How can I stop gentoo dhcping/loading every time at boot? Could that be my problem?

I'm so glad there is so much support in gentoo, I think it helps a lot. Some big problems become so easy if someone helps you! Thank you then.

----------

## hilbertAx

SKITBOY!!

I MADE IT!!!

Guess what? It was a driver problem. Exactly like you said.

I passed the night trying and trying and finally I found a driver, the bcmwl5a.inf, actually a DELL driver for my HP notebook wchich works perfectly.

I'm HAPPY!!!

Thank you so much for the links.

I hope I could help someone else like you did with me.

(yes, that means the previous post is obsolete!)

----------

## stikboy

cool, glad you got it working  :Smile:   it sucks that broadcom has so many choices, and if they would pull there head out of their rears and give as a notive supported driver we wouldn't have this issue  :Rolling Eyes: 

And since I was typing this long reply about the time you were posting, I'm going to post it anyway  :Very Happy: 

OK, I'm guessing, but with the 4306 in the number, I believe you need to try the Broadcom94306 drivers (which there are multiple of )

so here goes the most I've typed in a long time  :Smile: 

a)  quickie ndiswrapper install

as root for all:

1.  emerge ndiswrapper

2.  emerge wireless tools

3.  lspci

4.  disable smp support in kernel <-- if you end up recompiling a kernel, reboot, then re-emerge ndiswrapper

5.  download drivers from http://ndiswrapper.sourceforge.net/supported_chipsets.html

         all drivers for Broadcom 94306

			keep multiple drivers in different directories in case you need to try a different ones drivers

         and because I try everything possible, I would try both bcmwl5a and bcmwl5 from each set

6.  ndiswrapper -i /path/to/<driver>.inf      <-- This installs the driver

7.  ndiswrapper -l   <-- Verify the driver was installed

8.  edit  /etc/modules.d/ndiswrapper to have the line:

				alias wlan0 ndiswrapper

9.  modprobe ndiswrapper  <--  only needs done once

10. iwconfig wlan0 essid <essid>

11. iwconfig wlan0 mode Managed     <-- optional to keep away from Ad-hoc.  don't use this if you have an ad-hoc network

12. iwconfig wlan0 rate auto  <-- optional, but let's the card/router select the rate transmission

13. ifconfig wlan0 up

14. dhcpcd wlan0

if the above does not work,

15. ndiswrapper -e <driver>

16. go back to step 6 and try with another driver

to get the ndismodule to load at boot

echo "ndiswrapper" >> /etc/modules.autoload.d/kernel-<version>

if you don't want it load at boot, edit /etc/modules.autoload.d/kernel-<version> and remove "ndiswrapper"

     Leaving this in just affects loading the module, not starting wlan0.  It will hurt nothing to keep this loading at boot

     but adds an extra step if you don't (have to modprobe ndiswrapper before starting it

b)

from man iwconfig:

mode   Set the operating mode of the device, which depends on the  net-

              work  topology. The mode can be Ad-Hoc (network composed of only

              one cell and without Access Point), Managed (node connects to  a

              network  composed  of  many Access Points, with roaming), Master

              (the node is the synchronisation master or  acts  as  an  Access

              Point),  Repeater (the node forwards packets between other wire-

              less  nodes),  Secondary  (the  node  acts  as  a  backup   mas-

              ter/repeater),  Monitor  (the node acts as a passive monitor and

              only receives packets) or Auto.

              Example :

                   iwconfig eth0 mode Managed

                   iwconfig eth0 mode Ad-Hoc

so choose which mode works for your network

c)

to stop eth0 from running at boot,

rc-update del eth0 default

and I agree, this forum is one of the main reasons I switched to gentoo - ran into too many RTFM's in other forums  :Smile: 

although, it feels like I'm writing a manual here =D

----------

## hilbertAx

Thank you     :Very Happy:  , that cleared out why and how things worked out.

I'm a Gentoo enthusiast too now, I used Debian for some time but I feel I'm learning much more things about linux in Gentoo.

And support, as you said, helps really a lot. I wouldn't have do it without support, after a few times that I try and have no luck I usually give up.

Ok, it was a bit off topic but it was just to thank you.

----------

## instauration

Thanks for quick install guide stikboy. I wanted to add that I too have an HP zd7000 laptop with a broadcom wireless card and that with ndiswrapper-0.11 it seems okay with my gentoo-dev-sources-2.6.9-r3 smp enabled kernel and baselayout-1.11.5.

Review:

1) emerge ndiswrapper

2) ndiswrapper -i /path/to/bcmwl5.inf (works for my zd7000)

3) ndiswrapper -l  (to check if it installed driver)

4) edit /etc/modules.d/ndiswrapper (remove '#' in alias line: alias wlan0 ndiswrapper)

5) symbolic link /etc/init.d/net.wlan0 to /etc/init.d/net.lo

6) check configs for /etc/conf.d/net & /etc/conf.d/wireless

7) modprobe ndiswrapper

8) do the iwconfig and ifconfig steps as mentioned by stikboy (handled by /etc/conf.d/wireless)

9) add ndiswrapper to /etc/modules.autoload.d/kernel-2.6

----------

## Travers

hilbertAx,

Could you please point me to the dell driver you used. And, what version of ndiswrapper are you using?

----------

## zeroXten

This is all a little crazy   :Very Happy: 

First my background:

dmesg:

```

ndiswrapper version 0.10 loaded (preempt=yes,smp=no)

PCI: Enabling device 0000:00:0c.0 (0004 -> 0006)

ACPI: PCI interrupt 0000:00:0c.0[A] -> GSI 6 (level, low) -> IRQ 6

ndiswrapper: using irq 6

wlan0: ndiswrapper ethernet device 00:11:50:06:89:ee using driver bcmwl5.sys

ndiswrapper device wlan0 supports WPA with AES/CCMP and TKIP ciphers

ndiswrapper: driver bcmwl5.sys (Broadcom,06/25/2004, 3.40.73.0) added

spurious 8259A interrupt: IRQ7.

```

card (Belkin f5d7000uk):

```

# lspci

0000:00:0c.0 Network controller: Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller (rev 03)

```

module stuff:

```

# lsmod

Module                  Size  Used by

ndiswrapper            94608  0

```

module loaded:

```

media ~ # ndiswrapper -l

Installed ndis drivers:

bcmwl5a hardware present

```

kernel:

```

# uname -r

2.6.9-gentoo-r1

```

driver version is from the Dell exe install file (somewhere in a AR version) and is the 'a' ascii version.

My problem is basically the same as above...with the following observations...

"iwlist scan" picks up random AP mac addresses...which seem to vary with ESSID that i set.

I've tried different drivers from different locations (DELL exe and my CD)

Observations:

```

// Afer a fresh reboot...

media ~ # iwconfig wlan0

wlan0     IEEE 802.11g  ESSID:off/any  

          Mode:Auto  Frequency:2.462 GHz  Access Point: 00:00:00:00:00:00   

          Bit Rate:54 Mb/s   Tx-Power:25 dBm   

          RTS thr:2347 B   Fragment thr:2346 B   

          Encryption key:off

          Power Management:off

          Link Quality:100/100  Signal level:-10 dBm  Noise level:-256 dBm

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:1063   Missed beacon:0

// Set an ESSID

media ~ # iwconfig wlan0 essid "fraser"

// It picks up ESSID - notices Mode:Auto

media ~ # iwconfig wlan0

wlan0     IEEE 802.11g  ESSID:"fraser"  

          Mode:Auto  Frequency:2.462 GHz  Access Point: 62:AE:0B:31:63:7A   

          Bit Rate:54 Mb/s   Tx-Power:25 dBm   

          RTS thr:2347 B   Fragment thr:2346 B   

          Encryption key:off

          Power Management:off

          Link Quality:100/100  Signal level:-57 dBm  Noise level:-256 dBm

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:1398   Missed beacon:0

// Change the ESSID

media ~ # iwconfig wlan0 essid "test"

// And...the AP Mac addy changes

media ~ # iwconfig wlan0

wlan0     IEEE 802.11g  ESSID:"test"  

          Mode:Auto  Frequency:2.462 GHz  Access Point: 9A:40:A1:9A:AD:50   

          Bit Rate:54 Mb/s   Tx-Power:25 dBm   

          RTS thr:2347 B   Fragment thr:2346 B   

          Encryption key:off

          Power Management:off

          Link Quality:100/100  Signal level:-57 dBm  Noise level:-256 dBm

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:1874   Missed beacon:0

// Of course...none are ever actually my AP

// Results of a "# iwlist scan"

wlan0     Scan completed :

          Cell 01 - Address: 9A:40:A1:9A:AD:50

                    ESSID:"test"

                    Protocol:IEEE 802.11b

                    Mode:Ad-Hoc

                    Frequency:2.462 GHz (Channel 11)

                    Quality:0  Signal level:0  Noise level:0

                    Encryption key:off

                    Bit Rate:1 Mb/s

                    Bit Rate:2 Mb/s

                    Bit Rate:5.5 Mb/s

                    Bit Rate:6 Mb/s

                    Bit Rate:9 Mb/s

                    Bit Rate:11 Mb/s

                    Bit Rate:12 Mb/s

                    Bit Rate:18 Mb/s

                    Bit Rate:24 Mb/s

                    Bit Rate:36 Mb/s

                    Bit Rate:48 Mb/s

                    Bit Rate:54 Mb/s

                    Extra:bcn_int=100

// My AP uses Channel 12...also notice the Mode:Auto above.

// Try setting to Manual

media ~ # iwconfig wlan0 mode Manual

media ~ # iwconfig wlan0 essid "testsdsdfasdfasdfasdfaf"

media ~ # iwlist scan

eth0      Interface doesn't support scanning.

lo        Interface doesn't support scanning.

dummy0    Interface doesn't support scanning.

wlan0     No scan results

```

So..i'm running out of ideas. I'm tempted to just try other completely random drivers (say other broadcom ones or find ones from another location).

Might also try another version or so of ndiswrapper (once i work out how / where to get it)

----------

## zeroXten

Travers,

From: http://ndiswrapper.sourceforge.net/wiki/index.php/List

```

Card: Belkin 54g Wireless Desktop Network Card (F5D7000) Rev 03 

Chipset: BCM4306 

pciid: 14e4:4320 

Driver: http://ftp.us.dell.com/network/R81433.EXE (use bcmwl5a.inf in directory AR) 

Other: I tried to use the belkin driver (bcmwl5.inf) but the whole system just locked up as soon as I modprobed ndiswrapper. Apparently the belkin driver works for the older rev 02 cards, but not rev 03. So I'm suggesting this for folks with the Rev 03 card. You can check the revision by doing a "lspci" The Dell driver has been working great for me, for about a day. 

Other: The rev.03 problem is probably not all that sinister. It is caused by the presence of the NetworkType|0 line which ends up in the *.conf files (from the *.inf driver file). Removing this allows the supplied Belkin driver to work, although I'd probably recommend using the Dell R81433.exe driver anyway if only because it's a later version. For non-US users you may wish to edit the Channel parameter to be 13 (Europe) (or 14 in Japan?). Applies to both PCMCIA and PCI versions (F5D7000 and F5D7010). 

```

That is the one i think they're talkin about..and its the one i have tried.

----------

## Travers

I'll give it a shot. I'm curious what makes you think this will work with my HP Broadcom BCM94306 (rev 03), but I'll try it. =) I suppose other people have got theirs up by trying everything under the sun...

Travers

----------

## zeroXten

I don't think it will work with yours...i really am not sure if and why it would. But i do believe you did ask for the Dell drivers...maybe i was just so obsorbed in my own problem that i just assumed iyou were talking about the same set of drivers.

Let me know how it goes anyway..

----------

## Travers

I got my wifi to behave by passing acpi=noirq to my kernel. I would reccommend this for anyone who is trying different things out. My wifi was sporadically crapping out and I had to restart to get it back up.

----------

## zeroXten

something like this?

```

media root # cat /boot/grub/menu.lst 

default 0

timeout 30

splashimage=(hd0,0)/grub/splash.xpm.gz

title=Gentoo Linux 2.6.9 the media edition

root (hd0,0)

kernel /bzImage-2.6.9-gentoo root=/dev/hda3 acpi=noirq

```

Doesn't seem to have done anything for me...  :Sad: 

----------

## Travers

Yeah, but I don't know if that is the right way to do it in GRUB. I'm using LILO and all you do is add this line at the end:

append="acpi=noirq"

that's all. 

*mumbles something unintelligible about GRUB's partitioning scheme*

----------

## zeroXten

yeah..i think its right for grub...just not a fix for me...

back to the drawingboard

----------

## Travers

Well, I sorted through a lot of forms and documentation for ndiswrapper... what is your problem again, zeroXten?

----------

## zeroXten

To sum it up...i just can't get my wireless card to see my AP...a data-link problem (don't care about any network / transport problems at this stage)...

----------

## zeroXten

have tried to set up ad-hoc network between a netgear usb thingy on my win2k laptop and the above wireless card....no luck

scanning with the windows card gives the following two meaningless results (it swiches between the two):

```

SSID   9

Mac   00-00-00-00-2A-00 

Channel

Signal   -15974%

SSID   9

Mac   00-00-00-00-30-00 

Channel

Signal   100738%

```

----------

## aych

ya! and i kno the answer for once! i hope!

get ur sens to about -300.. cuz that was the problem with mine.. my noise is always -240  instead of the default 80 .. way too many things in the house

----------

