OK, so I finally fixed this :D
First here's what I learnt in the process:
NEVER ram your OS with different drivers or modules haphazardly until your problem gets fixed, at least not without a) Knowing what / why you are doing, and b) MOST IMPORTANTLY How to undo the same.
Whenever you try a different driver, module, or package, first uninstall the package that you previously installed for the same purpose.
And lots of thanks to @chili555 who pointed out that the leftover from a previous package was the reason.
So what I did was:
I tried installing bcmwl-kernel-source
on a live run of Ubuntu 14.04 (with my LAN cable) and checked if WLan works now. (And yeah, it did confirm that Ubuntu 14.04 / BCM43142 / bcmwl-kernel-source
were not the problem.)
I went to /etc/modprobe.d
and cross checked the files there with my hard disk installation's version of the same folder.
This /etc/modprobe.d
directory contains configuration files which contain blacklisting information for different modules. I made a note of the available files and later removed what was not available here from my hard disk installation's version of the same folder too.
I went to /lib/modules/3.*/updates/
. This is the directory that stores all your modules (wl, b43, etc. ... ) and the one that I messed up with various custom patched versions of wl modules listed in various forums.
After cross checking with my hard disk installation's version of lib/modules/3.*/updates/
, I manually removed all Bluetooth / wireless / dkms / wl / (and in particular one mac80211) and cleaned up any other modules that are related to wlan.
I finally replaced (did a recursive copy onto) the /etc/modprobe.d
and /lib/modules/3.*/updates/
directories (of my hard disk installation) with the same directories from the live OS.
Reboot
Do sudo apt-get install bcmwl-kernel-source
. This is the official working driver for BCM43142 for Ubuntu 14.04.
Reboot and sudo modprobe wl
and viola, wireless was working!
And finally sincere apologies to all my cross-posting, reposting, spamming IRCs with this question repeatedly. :P
NOTE: Replacing /removing your hard disk installation files is recommended only for those who installed your OS recently. Otherwise there is a risk that you could replace / remove files / modules that may have been installed for other devices which may be irrelevant to this issue.
Thanks again to chili555 :)
EDIT I recently updated my kernel to support the DisplayLink
driver for my USB monitor and bam the wifi was gone.
A blind attempt at re-installing bcmwl-kernel-source
threw the following error in the build log.
"alloc_netdev" requires 4 arguments, but only 3 given
Turns out the driver was not updated for the upgraded kernel (version 3.18). A bit of googling let me to this post -
https://bugs.launchpad.net/ubuntu/+source/bcmwl/+bug/1358966
Where there are links available to patched versions of wl
, which works with the upgraded kernel.
I manually downloaded and installed this guy and wifi was restored.
Now I can go back to browsing lolcats in peace. Amen.
Here is how you install it in about five minutes.
Krato: "Hey, friend, can I borrow your ethernet connection for just a few minutes? I brought along six of your favorite beverage."
Friend: "Sure, Krato, glad to help you! Let me put a couple of those beverages on ice."
You then open a terminal and do:
sudo apt-get install linux-headers-generic build-essential git
git clone https://github.com/porjo/mt7601.git
cd mt7601/src
make
sudo make install
sudo mkdir -p /etc/Wireless/RT2870STA/
sudo cp RT2870STA.dat /etc/Wireless/RT2870STA/
sudo modprobe mt7601Usta
Your wireless should now be working. Detach the ethernet, thank the friend and enjoy!
Here is how to do it in about five days...maybe.
Go here: http://packages.ubuntu.com/
Select Trusty in the drop-down box. Search for linux-headers-generic and build-essential. Be sure to locate their dependencies and the dependencies of the dependencies. Be sure to download the correct version, either 32- or 64-bit. Once you've download about fifteen or so packages on another computer, transfer them with a USB stick or similar to the desktop of your Ubuntu computer. Open a terminal and install them:
cd ~/Desktop
sudo dpkg -i *.deb
It may complain that a package is missing a dependency. If so, download that and add it to the desktop and try again.
Write many posts on the forum to tell old Chili how you're stuck. Rinse and repeat.
Once that's all done, get this: https://github.com/porjo/mt7601/archive/master.zip Download it and then transfer it to your desktop, too. Right-click it and select 'Extract Here.' Now, back to the terminal.
cd ~/Desktop/mt7601/src
make
sudo make install
sudo mkdir -p /etc/Wireless/RT2870STA/
sudo cp RT2870STA.dat /etc/Wireless/RT2870STA/
sudo modprobe mt7601Usta
Your wireless should now be working.
In either event, when Update Manager installs a later kernel, known as linux-image, after the requested reboot, you must recompile:
cd ~/mt7601/src
make clean
make
sudo make install
sudo modprobe mt7601Usta
Please retain the files and these instructions for that time.
Best Answer
It appears your device is supported in newer releases of the Linux kernel. Ubuntu provides a package with 'backports' of this. This is fairly the same as the answer of chili555, but without downloading from a 3rd party website (potentially untrusted and unsafe) and without the need to compile.
Just do:
and reboot.
You would have come to this step also when following my guide: