I ran into trouble this week while installing Ubuntu Gutsy on some older hardware for my five year old son Kadin. He'd been using a prism2 based wireless card with success under older releases of Ubuntu for over a year, so I knew that the card was supported. But after completing the fresh install, network manager couldn't find my home network.
Matt Hartley suggested that the problem was with Network Manager in this post, but I followed his recipe, winstalling wicd as a replacement, and it didn't help my situation. Wicd had the same problems detecting my home network.
ifconfig reported two interfaces for my wireless card---wifi0 and wlan0. Some suggested blacklisting hostap_pci (and others) to remove conflicting drivers which might be confusing network manager. The best suggestion I found early on---which didn't work for me at the time---was to install the linux-wlan-ng package. This was the right thing to do (the needed prism2 driver is installed), but unfortunately, this didn't work either. Perhaps some additional configuration was needed?
Since, according to some, the real problem was with Network Manager, and since it was working well for us under Feisty, I decided to pin back those packages using apt.
I added the following to /etc/apt/preferences:
Pin: release a=gutsy
Pin: release a=feisty
Pin: release a=feisty
Then I duped all of the repository entries in /etc/apt/sources.list and changed each "gutsy" to "feisty" so that apt can find modules in both repositories. Then I ran:
sudo apt-get install network-manager network-manager-gnome
This successfully downgraded and pinned the two Network Manager packages to the versions that are available in Feisty Fawn.
I was really pleased that the downgrade went so smoothly, as I've gotten trapped in dependency hell attempting similar feats in the past. Sadly, though, my problem remained! Perhaps Network Manager was not at fault after all.
linux-wlan-ng seemed to be the right solution for my card, so I decided to build from source from the trunk.
svn co svn://svn.shaftnet.org/linux-wlan-ng/trunk
Then I built and installed it and followed the directions in the README to setup, which included setting values in /etc/wlan/wlan.conf. I added my home network's SSID and changed the following entry:
# for some reason, this value was set to N --- seemed wrong to me
I also added the suggested values to /etc/rc.local (for modprobing the correct driver---prism2_pci in my case).
I remembered seeing wlan0 aliases under /etc/modprobe.d, so I grepped for matches and found this file:
The contents are shown below. The "alias wlan0 prism2_pci" line was commented so I removed the comment.
# Aliases to tell insmod/modprobe which module to use when bringing up the
# wlan0 interface.
# Uncomment the line corresponding to the type of prism2 device you have.
alias wlan0 prism2_pci
#alias wlan0 prism2_usb
#alias wlan0 prism2_cs
#alias wlan0 prism2_plx
# this allows network manager to manipulate the device
options p80211 wlan_wext_write=1
I rebooted and network manager was able to find my home network, as well as a number of my neighbors wireless network. In hindsight, I wonder if, after installing linux-wlan-ng as a package, I had just removed the comment from this file and WLAN_SCAN=Y, my troubles would have washed away? If you are having similar problems, I would try that first before compiling the latest driver from source.