LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Netgear WN311B wireless PCI adapter and wireless connection (https://www.linuxquestions.org/questions/linux-hardware-18/netgear-wn311b-wireless-pci-adapter-and-wireless-connection-876693/)

redfox6627 04-23-2011 01:32 PM

Netgear WN311B wireless PCI adapter and wireless connection
 
Hello,
I recently finished building my computer, and Verizon upgraded my TV and internet for more channels and faster speed, so I wanted them to run an Ethernet line for my computer, but the guy told me to just buy a wireless card. I figured I would end up doing that anyway, so I did, and it works great on the Windows side of my hard drive, but not so much on Linux. I am running Linux Mint 10 Julia, and I had the card working fine at one point, but after about an hour, I got kicked off of the connection, and it would not let me back on. So, I reset the router downstairs, and the next day I was able to get on again for about 3 hours, but again, I was kicked off. I've fiddled around and tried to find what is wrong, but now even when I go into the network connections, it does not search for a network, nor will it connect to my network after i input all the information. It works flawlessly on the Windows side, but the only reason I have Windows is to do some school work on Inventor. I have no desire to run Windows primarily, and I love Linux, but I need to get this wireless working. Thank you.

DaneM 04-24-2011 09:57 AM

Hi, redfox6627, and welcome to LQ! (I noticed that this is only your second post.)

It sounds like you're having some kind of driver problem. I'm not sure how familiar you are with how drivers work in Linux, so I'll explain things as if you know very little at the moment. (If you already know this stuff, don't be offended. :-)

Nearly all Linux drivers are already built-into the Linux kernel or created from the kernel as modules, and as such don't require third-party downloads or disks to install your hardware and make it work. Some drivers, however, are not open-source, or are under a software license that prohibits inclusion in the kernel. These still have to be loaded into the kernel as modules, which can be tricky if the hardware vendor isn't very good about maintaining its Linux drivers. Still others are community-supported and kept up-to-date, but because the hardware vendors aren't playing nice about telling folks how to create drivers for their hardware, they can be pretty difficult to make work in some cases.

In order to find out which kind of driver is in play, I'll need you to post the output of the following commands, using the "[.CODE] and [./CODE]" tags, for the beginning and end of your output quotes, respectively. (Remove the "." after the "[" to make it work; if I wrote it exactly as it's used, you wouldn't be able to see it.) Make sure you type these commands as root user (using sudo in front of them on distros like Ubuntu), as in some cases the output may be different otherwise.

lspci

lsmod

dmesg | tail -l 40
Note: the "|" character (pipe) is on the backslash (\) key. Hold SHIFT to access it.

Also, please post the exact make and model of your wireless device. Once you've posted this information, I'll have a much better idea of what needs to be done to make your card work as it should.

Have a good one.

--Dane

redfox6627 04-24-2011 10:38 AM

Dane,
The adapter is a NETGEAR N300 Wireless PCI Adapter WN311B. Here are the outputs from Terminal:

_________________________________________
( Extreme fear can neither fight nor fly. )
( )
( -- William Shakespeare, "The Rape of )
( Lucrece" )
-----------------------------------------
o
o \_\_ _/_/
o \__/
(oo)\_______
(__)\ )\/\
||----w |
|| ||
logan@Logan-Linux ~ $ lspci
00:00.0 RAM memory: nVidia Corporation MCP61 LPC Bridge (rev a1)
00:01.0 ISA bridge: nVidia Corporation MCP61 LPC Bridge (rev a2)
00:01.1 SMBus: nVidia Corporation MCP61 SMBus (rev a2)
00:01.2 RAM memory: nVidia Corporation MCP61 Memory Controller (rev a2)
00:02.0 USB Controller: nVidia Corporation MCP61 USB Controller (rev a3)
00:02.1 USB Controller: nVidia Corporation MCP61 USB Controller (rev a3)
00:04.0 PCI bridge: nVidia Corporation MCP61 PCI bridge (rev a1)
00:05.0 Audio device: nVidia Corporation MCP61 High Definition Audio (rev a2)
00:06.0 IDE interface: nVidia Corporation MCP61 IDE (rev a2)
00:07.0 Bridge: nVidia Corporation MCP61 Ethernet (rev a2)
00:08.0 IDE interface: nVidia Corporation MCP61 SATA Controller (rev a2)
00:08.1 IDE interface: nVidia Corporation MCP61 SATA Controller (rev a2)
00:09.0 PCI bridge: nVidia Corporation MCP61 PCI Express bridge (rev a2)
00:0b.0 PCI bridge: nVidia Corporation MCP61 PCI Express bridge (rev a2)
00:0c.0 PCI bridge: nVidia Corporation MCP61 PCI Express bridge (rev a2)
00:18.0 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor HyperTransport Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Miscellaneous Control
00:18.4 Host bridge: Advanced Micro Devices [AMD] Family 10h Processor Link Control
01:07.0 Network controller: Broadcom Corporation BCM4321 802.11b/g/n (rev 01)
02:00.0 VGA compatible controller: nVidia Corporation GT216 [GeForce GT 220] (rev a2)
02:00.1 Audio device: nVidia Corporation High Definition Audio Controller (rev a1)
logan@Logan-Linux ~ $ lsmod
Module Size Used by
cryptd 8140 0
aes_x86_64 7936 142
aes_generic 27631 1 aes_x86_64
dm_crypt 13381 0
snd_hda_codec_nvhdmi 14587 4
snd_hda_codec_realtek 299533 1
binfmt_misc 7984 1
joydev 11363 0
hid_logitech 10639 0
ff_memless 5485 1 hid_logitech
snd_usb_audio 105727 2
snd_hda_intel 26019 2
snd_hda_codec 100919 3 snd_hda_codec_nvhdmi,snd_hda_codec_realtek,snd_hda_intel
snd_usbmidi_lib 21313 1 snd_usb_audio
snd_hwdep 6660 2 snd_usb_audio,snd_hda_codec
snd_pcm 89104 3 snd_hda_intel,snd_hda_codec,snd_usb_audio
lib80211_crypt_tkip 8732 0
nvidia 10221046 40
snd_seq_midi 5932 0
snd_seq_midi_event 7291 1 snd_seq_midi
snd_seq 57512 2 snd_seq_midi,snd_seq_midi_event
snd_rawmidi 22207 2 snd_usbmidi_lib,snd_seq_midi
usbhid 42062 1 hid_logitech
wl 1965231 0
snd_timer 23850 2 snd_pcm,snd_seq
ppdev 6804 0
uvcvideo 62379 0
videodev 49359 1 uvcvideo
v4l1_compat 15519 2 uvcvideo,videodev
v4l2_compat_ioctl32 12486 1 videodev
hid 84678 2 hid_logitech,usbhid
snd_seq_device 6912 3 snd_seq_midi,snd_seq,snd_rawmidi
parport_pc 30086 1
asus_atk0110 12987 0
psmouse 62080 0
lib80211 6175 2 lib80211_crypt_tkip,wl
snd 64117 19 snd_hda_codec_realtek,snd_hda_intel,snd_usb_audio,snd_hda_codec,snd_usbmidi_lib,snd_hwdep,snd_pcm,sn d_seq,snd_rawmidi,snd_timer,snd_seq_device
i2c_nforce2 6155 0
serio_raw 4910 0
edac_core 46822 0
edac_mce_amd 9387 0
k10temp 3535 0
soundcore 1240 1 snd
snd_page_alloc 8588 2 snd_hda_intel,snd_pcm
lp 10201 0
parport 37032 3 ppdev,parport_pc,lp
dm_raid45 75026 0
xor 4709 1 dm_raid45
btrfs 506518 0
zlib_deflate 21866 1 btrfs
crc32c 3007 1
libcrc32c 1268 1 btrfs
usb_storage 50372 1
pata_amd 12050 0
forcedeth 55649 0
sata_nv 23770 2

logan@Logan-Linux ~ $ dmesg | tail -l 40
tail: cannot open `40' for reading: No such file or directory
logan@Logan-Linux ~ $

DaneM 04-24-2011 12:55 PM

OK. That's the information we need! I guess I could have learned the make/model from the thread subject, though (*facepalm*). For better readability in the future, please use code tags around computer text and refrain from posting signature stuff until after everything else; it's confusing otherwise.

Now that we know the chipset model number from your lspci output (bcm4321), we know what driver it takes. What you need is the wl (STA) driver. You've got wl loaded currently, but by the sound of it, you're using the b43 part of the driver instead of the STA part. (STA is short for STAtion--originally applying to wired LAN clients, but now counter-intuitively applying to WiFi clients, as opposed to base stations/access points. *sigh*) You'll need to reconfigure the driver installation to load the STA component.

I'll be taking my information from this site, reposting it on LQ for easy access: http://forums.linuxmint.com/viewtopi...=57056&start=0

You'll need to have your computer hooked-up to the internet while you do this, so plug it into the router with a wire before continuing. If during this process you are asked to remove any software other than what I'm telling you to remove, then write down all the package names that will be removed and continue with the uninstallation. Install them again using "sudo apt-get install <package> <package> <package>" once you've finished with the commands below. When asked to install additional packages, say yes. Type the following commands into a terminal:

Code:

sudo apt-get remove --purge module-assistant wireless-tools
sudo apt-get install module-assistant wireless-tools

At this point, or perhaps after the next step, it might ask you which driver version to use. Tell it to use the "STA" driver, and NOT the "b43" driver. Now do this:

Code:

sudo m-a a-i broadcom-sta
sudo echo blacklist brcm80211 >> /etc/modprobe.d/broadcom-sta-common.conf
sudo update-initramfs -u -k all
sudo modprobe -r b44 b43 b43legacy ssb brcm80211
sudo modprobe wl

Explanation of commands:
  • The "sudo" command can be put before any other command to indicate that it should be run as root (administrator). You will be asked for your regular user's password, for security reasons, if you haven't used sudo very recently.
  • The "apt-get remove --purge" command removes the old, misconfigured wl package/module/driver and tells it to delete all configuration files associated with that package.
  • The "apt-get install" command re-installs the driver package.
  • The "m-a a-i" command instructs the Module Assistant program to build the appropriate STA driver for your particular kernel version.
  • The "echo" command uses the ">>" output redirector to add brcm80211--a conflicting driver module--to a file containing a list of "outlawed" drivers so that it won't load in the future.
  • The "update-initramfs" command tells your system to rebuild a kernel initialization image with the new driver included if necessary. "-u -k" means to update the existing initramfs image for the specified kernel verion(s)--in this case, all kernel versions that you have installed. Alternatively, "$(uname -r)" can be used instead of "all" to only update the one you're currently booted into. The initramfs image is used to load necessary drivers immediately at boot, instead of inserting them after the kernel is loaded (later in boot).
  • "modprobe -r b44 b43 b43legacy ssb brcm80211" unloads from memory several conflicting driver modules.
  • "modprobe wl" loads the new driver into memory.

At this point, you should be able to configure your wireless network settings as normal. A reboot may be needed first, so if it gives you problems try restarting your PC and attempting it again. If you had to remove any other software packages during this process, be sure to do this:

Code:

sudo apt-get install <packagename> <packagename> <packagename>
...for all the packages that were removed.

Hopefully this will fix your problem. Let me know if you still need help.

Have a good one.

--Dane

redfox6627 04-24-2011 01:55 PM

Does this matter at all?

sudo echo blacklist brcm80211 >> /etc/modprobe.d/broadcom-sta-common.conf
bash: /etc/modprobe.d/broadcom-sta-common.conf: Permission denied

---------- Post added 04-24-11 at 02:55 PM ----------

[.CODE]
sudo echo blacklist brcm80211 >> /etc/modprobe.d/broadcom-sta-common.conf
bash: /etc/modprobe.d/broadcom-sta-common.conf: Permission denied
[./CODE]

DaneM 04-24-2011 05:53 PM

That step *might* not be needed, but it certainly helps ensure that the right driver gets loaded, instead of the wrong one. This error means that "noclobber" is activated, preventing you from redirecting output to that file. To get around this, try the following:

Code:

sudo su
[enter your password if asked]
echo blacklist brcm80211 >> /etc/modprobe.d/broadcom-sta-common.conf
exit

This will temporarily log you in as root, as opposed to just using root permissions, and will usually get around this kind of error. If that doesn't work, then type

Code:

sudo gedit /etc/modprobe.d/broadcom-sta-common.conf
...and add the words, "blacklist brcm80211" to the file--on its own line, at the very bottom. Finally save and close gedit.

Once you've done this, you can move onto the rest of the steps in my previous post, assuming you haven't already done them. It's safe to edit this brcm80211.conf file after you've done the rest, but before you reboot.

P.S. Be sure to take out the "." from your code tags. I only put them in so you could actually see the tags, rather than turning whatever came next into code text. You can use the edit button on your post to go back and change things if you wish. Thanks for making the effort.


All times are GMT -5. The time now is 10:37 PM.