If you have recently updated from any other operating system to Ubuntu or you have dual OS in your laptop then you might face the wifi problem, your laptop is having the wifi adapter but OS will show one message like you do not have the wifi adapter :
In this case you need to figure out that which wifi hardware is being used in you laptop, "lspci" and "lshw" are two commands to find out the name of it, follow the below snapshot
Now you know very well that your laptop have the wireless hardware but missing thing is the relative software of it, this kind of special software is known as the hardware drivers, these drivers are used to function the hardwares, you can google if you want to know the software drivers in details, basically software drivers are special software program which runs inside the operating system's kernel, each computer peripheral devices are having the relative drivers to perform the read/write operations, in my laptop the wireless hardware is provided by "Mediatek Corp..", i found the software in github i.e https://github.com/neurobin/MT7630E.git , you need to search the software in internet and then need to build it, i used the below steps to clone, build and install the wireless driver:
sudo apt-get install git build-essential
git clone https://github.com/neurobin/MT7630E.git
cd MT7630E/
chmod +x install test uninstall
sudo ./install
sudo reboot
Here the "install" script itself compiles and install the program in your computer, below are the content of the install script
#!/bin/bashset -eBASEDIR="$(dirname "$BASH_SOURCE")"cd "$BASEDIR"if (( $EUID != 0 )); thenprintf "\n-----Sorry! Run with root privilege (for example with 'sudo ./install')\n\n"exit 1fiKERNEL=${1-$(uname -r)}make KERNEL=$KERNELmake install KERNEL=$KERNELmodprobe mt7630e -S $KERNELmodprobe mt76xx -S $KERNELecho "The driver has been successfully installed.If you don't have wifi yet, try to reboot.If bluetooth doesn't work, read the bluetoothsection in README.md file and follow through."
You can see above that the source code is compiled on the basis of current kernel architecture to generate the appropriate binary, once kernel module is geing generated it is being inserted into the linux kernel.
For learning perspective you can also execute the makefile instead of executing the install script, makefile will have below kind of content inside that:
.PHONY: all clean install uninstallKERNEL ?= `uname -r`KDIR ?= /lib/modules/$(KERNEL)/buildDST_DIR ?= /lib/modules/$(KERNEL)/kernel/drivers/net/wireless/PKG_VER ?= `sed -n 's/^[[:blank:]]*PACKAGE_VERSION=\([^[:blank:]]*\).*/\1/p' dkms.conf`all:$(MAKE) -C $(KDIR) M=$(CURDIR)/rt2x00 modules$(MAKE) -C $(KDIR) M=$(CURDIR)/btloader modulesclean:$(MAKE) -C $(KDIR) M=$(CURDIR)/rt2x00 clean$(MAKE) -C $(KDIR) M=$(CURDIR)/btloader cleaninstall:cp -v firmware/*/* /lib/firmware/cp rt2x00/mt7630e.ko $(DST_DIR)cp btloader/mt76xx.ko $(DST_DIR)depmod $(KERNEL)uninstall:rm -vf /lib/firmware/mt76x0.bin /lib/firmware/MT7650E234.binrm -vf $(DST_DIR)/mt7630e.korm -vf $(DST_DIR)/mt76xx.kodepmod $(KERNEL)dkms:cp -v firmware/*/* /lib/firmware/cp -R . /usr/src/mt7630e-$(PKG_VER)dkms add -m mt7630e -v $(PKG_VER)dkms build -m mt7630e -v $(PKG_VER) -k $(KERNEL)dkms install -m mt7630e -v $(PKG_VER) -k $(KERNEL)
"make" simply compile your source code and build the kernel module ( .ko file) for you, after that you can simply insert the module in ubuntu's kernel by mannual "insmod" commad, my makefile compilation terminal logs are below:
jeet@jeet-X200LA:~/Downloads/wifi-Driver-Ubuntu/MT7630E$ sudo makemake -C /lib/modules/`uname -r`/build M=/home/jeet/Downloads/wifi-Driver-Ubuntu/MT7630E/rt2x00 modulesmake[1]: Entering directory '/usr/src/linux-headers-4.15.0-91-generic'CC [M] /home/jeet/Downloads/wifi-Driver-Ubuntu/MT7630E/rt2x00/rt2x00dev.oCC [M] /home/jeet/Downloads/wifi-Driver-Ubuntu/MT7630E/rt2x00/rt2x00mac.oCC [M] /home/jeet/Downloads/wifi-Driver-Ubuntu/MT7630E/rt2x00/rt2x00config.oCC [M] /home/jeet/Downloads/wifi-Driver-Ubuntu/MT7630E/rt2x00/rt2x00queue.oCC [M] /home/jeet/Downloads/wifi-Driver-Ubuntu/MT7630E/rt2x00/rt2x00link.oCC [M] /home/jeet/Downloads/wifi-Driver-Ubuntu/MT7630E/rt2x00/mt_linux.oCC [M] /home/jeet/Downloads/wifi-Driver-Ubuntu/MT7630E/rt2x00/rt2x00crypto.oCC [M] /home/jeet/Downloads/wifi-Driver-Ubuntu/MT7630E/rt2x00/rt2x00firmware.oCC [M] /home/jeet/Downloads/wifi-Driver-Ubuntu/MT7630E/rt2x00/rt2x00leds.oCC [M] /home/jeet/Downloads/wifi-Driver-Ubuntu/MT7630E/rt2x00/rt2x00mmio.oCC [M] /home/jeet/Downloads/wifi-Driver-Ubuntu/MT7630E/rt2x00/rt2800pci.oCC [M] /home/jeet/Downloads/wifi-Driver-Ubuntu/MT7630E/rt2x00/rt2800lib.oCC [M] /home/jeet/Downloads/wifi-Driver-Ubuntu/MT7630E/rt2x00/rt2x00pci.oLD [M] /home/jeet/Downloads/wifi-Driver-Ubuntu/MT7630E/rt2x00/mt7630e.oBuilding modules, stage 2.MODPOST 1 modulesCC /home/jeet/Downloads/wifi-Driver-Ubuntu/MT7630E/rt2x00/mt7630e.mod.oLD [M] /home/jeet/Downloads/wifi-Driver-Ubuntu/MT7630E/rt2x00/mt7630e.komake[1]: Leaving directory '/usr/src/linux-headers-4.15.0-91-generic'make -C /lib/modules/`uname -r`/build M=/home/jeet/Downloads/wifi-Driver-Ubuntu/MT7630E/btloader modulesmake[1]: Entering directory '/usr/src/linux-headers-4.15.0-91-generic'CC [M] /home/jeet/Downloads/wifi-Driver-Ubuntu/MT7630E/btloader/mt76xx.oBuilding modules, stage 2.MODPOST 1 modulesCC /home/jeet/Downloads/wifi-Driver-Ubuntu/MT7630E/btloader/mt76xx.mod.oLD [M] /home/jeet/Downloads/wifi-Driver-Ubuntu/MT7630E/btloader/mt76xx.komake[1]: Leaving directory '/usr/src/linux-headers-4.15.0-91-generic'
Now kernel module is generated and ready to be inserted into the kernel, i ran the below command to insert:
jeet@jeet-X200LA:~/Downloads/wifi-Driver-Ubuntu/MT7630E$ sudo insmod rt2x00/mt7630e.koinsmod: ERROR: could not insert module rt2x00/mt7630e.ko: File existsjeet@jeet-X200LA:~/Downloads/wifi-Driver-Ubuntu/MT7630E$
I already inserted therefore it is showing "File exists", below is the description:
jeet@jeet-X200LA:~/Downloads/wifi-Driver-Ubuntu/MT7630E$ lsmod | grep mt76mt76xx 20480 0mt7630e 180224 0mac80211 786432 1 mt7630ecfg80211 622592 2 mt7630e,mac80211eeprom_93cx6 16384 1 mt7630e
Now you must be able to find the wifi devices, go to setting and turn on the wifi, you must be able to see the wireless devices
The conclusion of the above story is that you need to find out the wireless hardware name then only you will able to find the driver, for almost all the mediatek devices to to https://www.mediatek.com/products/broadbandWifi/mt7630 link and read the appropriate information to resolve you issue.
If you need more help related to your wireless hardware then please comment i will try to resolve your all issues.
Follow me on instagram: Click Here ( Instagram Account)
Subscribe my Youtube channel: Click Here ( Youtube Channel)
Facebook account: Click Here ( Facebook Account)
Linkedin Account: Clicke Here ( Linkedin Account)
My Books:
India Tourism: India Tourism EBook
Love story of an engineer: Love Story of an Engineer Ebook
Subscribe my Youtube channel: Click Here ( Youtube Channel)
Facebook account: Click Here ( Facebook Account)
Linkedin Account: Clicke Here ( Linkedin Account)
My Books:
India Tourism: India Tourism EBook
Love story of an engineer: Love Story of an Engineer Ebook
No comments:
Post a Comment