# [Solved] Not detecting my wireless card on boot :(

## willie_wang

Hi, my first gentoo install so please help, I know very little about gentoo networking.

I have an acer laptop. I've installed acer_acpi and ndiswrapper with the corresponding broadcom drivers.

/etc/conf.d/net:

```

config_wlan0=( "chmod 777 /proc/acpi/acer/wireless" )

config_wlan0=( "echo 1 > /proc/acpi/acer/wireless" )

essid_wlan0="VIRGIN"

config_wlan0=( "dhcp" )

dhcpcd_wlan0="-t 30" # Timeout after 30 seconds

```

lsmod shows that both acer_acpi and ndiswrapper are installed correctly.

I have a /etc/init.d/net.wlan0 file.

What more do I need? I have no idea.

I boot up and it detects my ethernet, but not my wireless card. Are there any steps I'm missing? Please forgive my newbness.

 :Sad: Last edited by willie_wang on Tue Apr 08, 2008 10:32 pm; edited 1 time in total

----------

## casso

can you please run ifconfig -a and tell me if you see anything beyond eth0 and lo in the list. I expect you to only see those two, but should you be lucky enough to see more, that would help. I also assume that you have added net.wlan0 to the default runlevel. Some very simple things are easy to overlook when troubleshooting, so please check, just to be sure.

----------

## willie_wang

yep, nothing but eth0 and lo.

i've added net.wlan0 to the default runlevel... that's where I did this?

```
rc-update add net.wlan0 default
```

 isn't it?

 hang on, i'll just grab my dmesg.

Can you think of anything else?

----------

## sera

 *willie_w wrote:*   

> Can you think of anything else?

 

Just some ideas:

- You have to install the firmware.

- You have to enable the network stack in the kernel.

- You have to enable firmware loading in the kernel.

----------

## willie_wang

 *sera wrote:*   

> 
> 
> - You have to enable the network stack in the kernel.
> 
> 

 

I've installed the firmware, enabled firmware loading but I can't find where to enable network stacking in the kernel menuconfig options.

 :Confused: 

Can you give me a pointer?

----------

## willie_wang

Ah, I have it. Just recompiling. I'll let you know in about 30 mins.  :Smile: 

----------

## sera

Networking --> Wireless --> Stack (mac80211)

Edit: too slow

----------

## willie_wang

 *sera wrote:*   

> 
> 
> Edit: too slow

 

Hehe, are you slating my pc? Hmm? Well yeah, it's a hunk of junk, but I love it, hehee!

Thanks for your help, sera!

----------

## pappy_mcfae

Suggestion 1: choose either ndiswrapper OR the native kernel driver, not both!

Suggestion 2: If you choose to use ndiswrapper, stick with a .22 version kernel. This is to insure the most consistent wireless connection possible.

IMO, ndiswrapper is a superior choice. It has better connect speed, maintains a cleaner connection, and isn't prone to stalling out for long periods of time. Ndiswrapper is also more configurable. Finally, it is much easier to setup than the kernel drivers, and requires less messing with to get functional.

Blessed be!

Pappy

----------

## sera

 *willie_w wrote:*   

>  *sera wrote:*   
> 
> Edit: too slow 
> 
> Hehe, are you slating my pc? Hmm? Well yeah, it's a hunk of junk, but I love it, hehee!
> ...

 

Actually I was referring to my post but it happen to be true for your pc as well  :Smile: 

Does the wlan work now, btw?

----------

## willie_wang

 *sera wrote:*   

> 
> 
> Does the wlan work now, btw?

 

Hey sera!

Woohoo! Wow! After ONE WHOLE WEEK messing around with Gentoo, I have FINALLY got my wireless working! I haven't spent this long getting my wireless working since I first tried OpenSuse, 3 years ago! But I'm on my laptop, using a Broadcom 4318 card and WPA encrypted network on the forums right now! Yay!  :Smile: 

Ok. Firstly, I'm not a complete retard. The steps I followed at first were completely reasonable. The first problem was that my wireless just wasn't being detected. Sera's earlier pointers were right. I had to enable the network stack, firmware loading and acpi hotplugging in the kernel. So I did, recompiled, and copied the new kernel image to my /boot partition.

But that wasn't half of the problem. In kernel 2.6.24-r4, there seems to be a conflict with the ndiswrapper module and other bits in the kernel (sorry for being vague, I can't definitively say what these are). To get ndiswrapper working at all, I had to follow these instructions from the ubuntu forum: http://ubuntuforums.org/showthread.php?t=734003.

It seems that loading the ssb module before the ndiswrapper module causes the ndiswrapper module to fail. The script they have merely unloads the ssb module and the ndiswrapper module, then reloads them in reverse order. Ok! So I now had a detected card through ndiswrapper. I went through the whole rigmarole of setting up wpa_supplicant and the /etc/conf.d/net file, only to find that ndiswrapper couldn't attain a dhcp address from my router. This could possibly be something to do with this article, http://slackblogs.blogspot.com/2008/03/ndiswrapper-might-be-broken-on-2624.html. I tried both the gentoo dhcpcd and the dhclient options for a while, but to no avail.

But I've finally got it working. I've used b43-fcutter with the b43 kernel module - works perfectly once you figure how to configure the /etc/conf.d/net file. It's a little slower than ndiswrapper, but I'd rather have working internet than it not working. I'm going to write a howto and post it up on here so that other people don't have to go through what I did.

 :Smile: 

Yay for me!

----------

## boaglio

Hi willie_w,

I'm trying to do the same thing here...   :Very Happy: 

Can you please post :

 :Arrow:  your /etc/conf.d/net ?

 :Arrow:  lsmod output?

 :Arrow:  ifconfig output?

 :Arrow:  where did you installed the firmware?

 :Arrow:  /etc/init.d/net.wlan0 is just a symbolic link to /etc/init.d/net.lo ?

Thanks!

----------

## willie_wang

Ah! Ok. My computer's just compiling gnome at the moment.  :Smile:  I'll post all those things up in a couple of hours when it's all done!

Edit: -- pah, fluff it. I'll just tell you what I did on here. Note: These instructions are a work-in-process and may be a little rusty as I'm doing it from memory. I'll put up a howto in the next few hours with a foolproof guide.

Compile the kernel with the b43 wireless networking driver as a module. To do that, you need to enable the MAC80211 network stack, acpi hotplugging and ssb.

Once that's done and you've copied the bzimage to your boot folder, you then need to extract and install the firmware. The easiest way is to use wget to get the packages:

```

emerge wget

```

B43 Firmware

Fetch the b43-fwcutter and the firmware and extract them to /usr/src:

```

cd /usr/src

wget http://bu3sch.de/b43/fwcutter/b43-fwcutter-011.tar.bz2

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

tar xvjf b43-fwcutter-011.tar.bz2

tar xvjf broadcom-wl-4.80.53.0.tar.bz2

```

Compile the b43-fwcutter module:

```

cd b43-fwcutter-011

make && make install

```

Then you can use the firmware cutter to extract the firmware to /lib/firmware. To do that, the directory must exist, so create it, then extract the firmware.

```

mkdir /lib/firmware

b43-fwcutter -w /lib/firmware ../broadcom-wl-4.80.53.0/kmod/apsta.o

```

There you go, you now have the firmware in the correct place. If you compilied the kernel correctly, the kernel will look for the firmware where you just put it.

Wireless tools

You need to emerge a few packages to make your firmware operate correctly: dchpcd - for dhcp; wireless tools; wpa_supplicant for WPA protected networks.

```

emerge dhcpcd

emerge wireless-tools

emerge wpa_supplicant

```

Configuring wlan0

you need to create a symlink from from net.lo to net.wlan0 in the init.d folder and then add it to the default run-level so it will start on boot.

```

ln -s /etc/init.d/net.lo /etc/init.d/net.wlan0

rc-update add net.wlan0 default

```

Configuring wpa_supplicant and /etc/conf.d/net

Configure the network to recognise the wpa_supplicant module, and then configure the driver for wpa_supplicant. This is done by editing the /etc/conf.d/net file.

```

nano /etc/conf.d/net

```

Then add the following to the file:

```

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf"

```

** My other pc is busy at the moment, you may not need to have the -iwlan0 there. I'll check once my other pc is free **

Next you need to edit your wpa_supplicant file to recognise your wireless network.

```

nano /etc/wpa_supplicant/wpa_supplicant.conf

```

My wpa_supplicant.conf file looks remarkably similar to this:

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

ap_scan=1

network={

  ssid="HOME"

  proto=WPA

  key_mgmt=WPA-PSK

  pairwise=TKIP

  psk="This is my secret WPA password"

  priority=2

}

```

Acer laptop configuration - acer_acpi

If you have an acer laptop, (because they're great! mine's a 5020 series) then you need to install acer_acpi for all kernels before 2.6.25.

```

echo "app-laptop/acer_acpi ~amd64" >> /etc/portage/package.keywords

emerge acer_acpi

modprobe acer_acpi

echo "acer_acpi" >> /etc/modules.autoload.d/kernel-2.6

```

Obviously, substitute the "~amd64" for your architecture, ie. "x86" or whatever.

Just a few things to note

Depending on your specific wireless card, you may need the b43 legacy drivers. Full details can be found at:

http://linuxwireless.org/en/users/Drivers/b43

I encountered the most problems while configuring my kernel. Please make sure you have enabled the b43 module here and compiled it correctly  :Smile: Last edited by willie_wang on Sat Apr 12, 2008 3:05 am; edited 1 time in total

----------

## willie_wang

 *boaglio wrote:*   

> Hi willie_w,
> 
> Can you please post :
> 
> ...
> ...

 

Hey boaglio!

I'll post these when my pc becomes free.

I hope the quick howto above helps.

----------

## boaglio

 *willie_w wrote:*   

> 
> 
> Hey boaglio!
> 
> I'll post these when my pc becomes free.
> ...

 

Thanks for your help, my laptop is an HP Pavillion NX6105 and I'm still networkless   :Sad: 

However, following your guide make realize SSB should be a module, not built-in; after recompile my kernel the net device seams to be working, but now is a config issue.

If I put at my /etc/conf.d/net any oh these 2 lines:

 :Arrow:  modules=("wpa_supplicant")

 :Arrow:  modules=("ifwconfig")

I get:

" does not exist ("ifwconfig")

Or:

" does not exist ("wpa_supplicant")

Both are installed on my system, so I'm pretty lost   :Very Happy: 

----------

