Hello to all,
I managed to install a Wifi to usb "adapter" Edimax AC1200, but what I have done and why it's working isn't completely clear to me… Perhaps someone here could enlighten me ?
What I have done :
I installed an unofficial driver from github. Installing it consisted in building and installing a linux module. I used dkms since that was indicated in the "Readme.md" file of the project. (Other people seem to run the Makefile instead and load the module with "modprobe" .)
However, upon reboot an error message shows :
firmware: failed to load rtl_nic/rtl8168g-2.fw (-2)
The missing file is provided by package "firmware-realtek" as can be seen on package.debian.org.
After installing the package, the error message no longer showed on start up
Eventually, I called "nmcli" to connect to a wifi network :
nmcli device wlan0 wifi connect <name of WIFI network> password <WIFI password>
Now I have a working internet connection !
Fiddling with the system is an excellent way to learn how it works (^.^) ! As a result, I was left with the following questions to meditate on :
Why wasn't the *.fw file part of the driver that I downloaded and of the linux module that I installed ? Is there a good reason for this ? People that invoked "make" instead of using "dkms" do not seem to install the package "firmware-realtek" that provides the firmware "*.fw" file. Does that make sense ?
What exactly is a linux module ? I've encountered the term several times before but the explanations I've encountered either seem too fuzzy or are beyond my reach. Basically, answering the following question would wipe out my confusion : why does the code that manage a device external to the computer (e.g. Wifi adapter) needs to be managed by the linux kernel and not by a regular process ?
Would you share some answers to those questions ?
P.S. Here is the detailled procedure I followed in case somebody is facing the same problem and is looking for some advice.
I own a desktop computer that I wanted to connect to the internet using a wifi to usb "adapter". To make things more difficult I could not get access to the internet from that computer (e.g. through cable connection). However, I did own a laptop connected to the internet so I could get some files from the internet using the laptop, copy it on a memory stick and transfer it onto the desktop computer.
Installing Debian and setting up repos
I installed the DVD-1 of jessie (gnome) on a USB pendrive using Unetbootin. Booting from the pendrive, I followed the installation procedure without connection to the internet, and when prompted to provide a firmware file (most certainly for the Wifi device) I skipped that step (perhaps that wasn't a smart move). Eventually, Debian got installed and I could run it.
Right after installation, make, dkms and other useful packages are not installed out-of-the-box. However, they can be installed from the USB pendrive (note that "make" is not provided with the CD-1 *.iso image but by the CD-4 *.iso image. To make things simpler, I downloaded the DVD-1 *.iso image instead which also contains "make")
However, running an `apt-get update` leads to an error message because Debian is expecting the packages to be on a cdrom not on a
USB pendrive :
Please insert the disk labeled: <name of installation disk>
So I had to first mount the installation pendrive :
less /proc/partitions #Check which partition you want to mount
mount -t auto -o loop /dev/sdb1 /mnt #Mount it to /mnt
and modify apt's configuration in `/etc/apt/sources.list` so that it checks the mounted directory instead of the cdrom.
Commented out this line :
#deb cdrom:[<label of cd>]/ jessie contrib main
And added that line :
deb file:/mnt/ jessie contrib main
Lastly run :
This being done, I was able to install make, dkms, etc with apt-get
Attempting to install the official linux driver
(for information only : it did not work, skip to next step)
Edimax, i.e. the device's vendor, provides a linux driver on its website called "EW-7822UAC_Linux_driver_v220.127.116.11 (Linux)". Installing it consist in compiling a linux module from source by calling make. Therefore, linux headers must be installed on the machine before calling make :
apt-get install linux-headers-amd64
However, compilation errors arise. These correspond to the use of a few depreciated functions in the source files : for instance function "create_proc_entry()" was called instead of "proc_create()".
Installing an unofficial linux driver
As an alternative, an unofficial linux driver (actually a fork of the official driver) can be downloaded here.
Similarly to the official driver, a linux module must be built and installed. The "Readme.md" file gives instructions to do this :
sudo cp -R . /usr/src/rtl8812AU_8821AU_linux-1.0
sudo dkms add -m rtl8812AU_8821AU_linux -v 1.0
sudo dkms build -m rtl8812AU_8821AU_linux -v 1.0
sudo dkms install -m rtl8812AU_8821AU_linux -v 1.0
Note : I suspect that the linux-headers-amd64 package must first be installed ?
Installing the firware
Upon reboot, an error message shows, which can also be viewed with `dmesg` and "kernel.log" :
firmware: failed to load rtl_nic/rtl8168f-1.fw (-2)
That file seems missing but it is provided in the "firmware-realtek" package as can be seen with the debian package search engine. I downloaded the "firmware-realtek.deb" package on my laptop and transfered it to the desktop computer. Then I installed it with "dpkg" :
dpkg -i firmware-realtek
Setting up the connection
After reboot, the wifi connection was down but invoking ifconfig showed that the wlan0 interface existed.
I set it up with nmcli :
nmcli device wlan0 wifi connect <name of network> password <WIFI password>
Tada : internet access working !