Wireless dongue RTL8812AU
- Login o registrati per inviare commenti
Hi to everyone!
Do you think that this wireless dongue, seen on Ebay, can really be suitable? Thanks for the attention.
Allegato | Dimensione |
---|---|
RTL8812AU.png | 232.6 KB |
There is no free software support for 802.11ac.
The wireless dongle tpe-n150usb, available from thinkpenguin.com, has worked for me. It uses the 802.11n protocol for which there is libre driver support available in trisquel-11.
They have open source drivers for that card at https://deb.trendtechcn.com/. It's licensed under GPLv2 https://deb.trendtechcn.com/troubleshooting/source-code/ and the installer is GPLv3. You can also get the drivers from Aircrack as well.
The problem is usually the firmware (which runs on the Wi-Fi chip), not the driver (which runs on the CPU). Do the Wi-Fi chipsets listed on https://deb.trendtechcn.com/troubleshooting/source-code/ actually work without non-free firmware, for instance on Trisquel or on any distribution using Linux-libre? https://deb.trendtechcn.com/supported-distributions/ actually lists Trisquel 9, but, assuming that piece of information is correct, it is puzzling that we have heard nothing about those chipsets in this forum. If they do work without proprietary firmware, I guess having Linux-libre and Trisquel's kernel support them out of the box should be a priority: not only the RTL8812AU chipset supports the 802.11ac standard (a higher throughput) but it is pretty popular, as far as I can see searching the Web.
That would indeed be very significant news and I (and others) would be jumping all over it, if it were true. After downloading the source code from there I can confirm that this does have source code for the driver. I found no firmware source code and so the freedom status of the RTL8812AU appears to remain unchanged.
(Moved to the proper place in the thread.)
Pursuing my little investigation...
There is apparently no non-free firmware for RTL8812AU in https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/rtlwifi/ or https://packages.debian.org/sid/firmware-realtek (there is for RTL8812AE but, hopefully, the last letter makes a difference). Also, https://docs.alfa.com.tw/Support/Linux/RTL8812AU/ mentions nothing about downloading firmware in its instructions for having the chipset supported by Debian (which still does not include non-free firmware by default, on its stable version; that will soon not be true anymore, unfortunately). Those instructions clone https://github.com/morrownr/8812au-20210629.git but I find no firmware in that repository and https://raw.githubusercontent.com/morrownr/8812au-20210629/main/install-driver.sh does not seem to download any.
I have found https://forum.openwrt.org/t/rtl8812au-driver-is-firmware-needed-too/97101/6 entitled "[rtl8812au] Driver, is Firmware needed too?" but the solution in https://forum.openwrt.org/t/rtl8812au-and-or-rtl8814au-drivers/67/99 does not involve installing firmware.
Even better, since Trisquel 9, Trisquel's repository actually has the package rtl8812au-dkms with "dkms source for the r8812au network driver" and the package rtl8821ce-dkms with "DKMS source for the Realtek 8821C PCIe Wi-Fi driver": https://packages.trisquel.org/rtl88
Do RTL8812AU and RTL8821CE (both supporting the 802.11ac standard) actually work on Trisquel after installing the related package? Can anybody here owning a Wi-Fi adapter having such a chipset (lsusb executed in a terminal identifies it) confirm or infirm? If they do not work with the sole installation of the package, have you tried the instructions in https://docs.alfa.com.tw/Support/Linux/RTL8812AU/ to compile from the source either in https://github.com/aircrack-ng/rtl8812au.git (instructions for Ubuntu) or in https://github.com/morrownr/8812au-20210629.git (instructions for Debian)?
EDIT: I was writing the results of my investigation in this post when jxself replied. @jxself: couldn't RTL8812AU and RTL8821CE work with no firmware sent by the kernel (using firmware on a ROM, probably)? I know the older Wi-Fi chipsets were working in this way...
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/rtw88/rtw8821c_fw.bin (a blob) is probably required for RTL8821CE. I have still hope when it comes to RTL8812AU, in many Wi-Fi adapters.
The driver I looked at from trendtechcn.com contains several functions related to firmware. To me, a firmware is clearly intended but without having the hardware it can be hard to determine whether and to what extent the device will continue to function without it. It seems quite important to find out though so I have ordered a USB wifi with RTL8812AU to be delivered to my house tomorrow. I'll provide an update after examining the situation further.
I believe you can cancel your purchase (a purchase I was considering as well): the firmware, disguised as source code, is in /usr/src/rtl8812au-5.13.6/hal/rtl8812a/hal8812a_fw.c or, in the repository I pointed out:
- https://github.com/aircrack-ng/rtl8812au/blob/v5.6.4.2/hal/rtl8812a/hal8812a_fw.c
- https://github.com/morrownr/8812au-20210629/blob/main/hal/rtl8812a/hal8812a_fw.c
Sad.
This explains why it would "work" on Trisquel 9 then, since it's being loaded as a third party kernel module using DKMS it can bypass the general prohibition in Linux-libre against firmware loading. It also means that Trisquel is distributing the firmware blob as part of the rtl8812au-dkms package. Obligatory bug report: https://gitlab.trisquel.org/trisquel/ubuntu-purge/-/issues/7
tldr: the blob is necessary. :-(
#ifdef LOAD_FW_HEADER_FROM_DRIVER conditions the inclusion of the blob. Without much of a surprise, either include/autoconf.h (code at trendtechcn.com and in morrownr's repository) or include/rtl_autoconf.h (in aircrack-ng's repository) defines LOAD_FW_HEADER_FROM_DRIVER:
#define CONFIG_EMBEDDED_FWIMG 1
#if (CONFIG_EMBEDDED_FWIMG==1)
#define LOAD_FW_HEADER_FROM_DRIVER
I tried to define BANANA instead of LOAD_FW_HEADER_FROM_DRIVER (I use Trisquel 11's default kernel; git, make, gcc, and libc6-dev are installed):
$ sudo apt install linux-headers-5.15.0-70-generic
$ git clone https://github.com/morrownr/8812au-20210629.git
$ cd 8812au-20210629
$ sed -i 's/LOAD_FW_HEADER_FROM_DRIVER/BANANA/' include/autoconf.h
$ make
Unfortunately BANANA is no substitute for LOAD_FW_HEADER_FROM_DRIVER, which therefore looks compulsory:
/home/banana/8812au-20210629/hal/rtl8812a/rtl8812a_hal_init.c: In function ‘FirmwareDownload8812’:
/home/banana/8812au-20210629/hal/rtl8812a/rtl8812a_hal_init.c:588:57: error: ‘array_mp_8812a_fw_nic’ undeclared (first use in this function)
588 | pFirmware->szFwBuffer = array_mp_8812a_fw_nic;
CONFIG_RTL8812A conditions the line raising the error but, defined or not, the same instructions are executed:
#ifdef CONFIG_RTL8812A
pFirmware->szFwBuffer = array_mp_8812a_fw_nic;
pFirmware->ulFwLength = array_length_mp_8812a_fw_nic;
#else
pFirmware->szFwBuffer = array_mp_8821a_fw_nic;
pFirmware->ulFwLength = array_length_mp_8821a_fw_nic;
#endif
Gosh! Firmware disguised as source code! What purpose for? General espionage?
To pretend not to be there and circumvent what is written a few lines earlier, in effect preventing modification:
"This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation."
Would it be possible to analyze the firmware, trace the source? If not, would it be possible to ask Realtek to release the source to allow free (as in freedom) software support for 802.11ac?
Would it be possible to analyze the firmware, trace the source?
It is as hard as analyzing any firmware binary. It is a binary, written in an array. If you want to try that, https://www.radare.org may be useful.
If not, would it be possible to ask Realtek to release the source to allow free (as in freedom) software support for 802.11ac?
You can try that as well.
It looks like this needs updating:
The description links to a Trisquel forum thread that now appears to be guiding users into installing non-free firmware.
UPDATE: I updated the h-node page.
Well the fact that s/he took an external repository and build it from there, is the first sign that it may be trouble some.
Otherwise, there would be no need to fetch anything third parties.
Hi to everyone!
In the h-node site https://h-node.org/wifi/view/en/2219/TP-Link-802-11ac-WLAN-Adapter/1/1/undef/undef/undef/undef/wifi-works/RTL8812AU
I see another wireless device 802.11 ac, "TP-Link 802.11ac WLAN Adapter (model id: 2219)", with free driver rtl88XXau. I think the chipset is always RTL8812AU. Can we really be secure? Is it reliable after seeing the above comments?
Added:
I read so in the h-node home:
''Free software - In order to add a device to the h-node database, you must verify that it works using only free software.''
But why are devices added to the database, such as those mentioned above, which do not comply with the aforementioned conditions? I find this aspect paradoxical and ridiculous!
Not unlike you, some users are confused because of non-free firmware hidden in supposedly free driver source.
Now you are aware of that situation, it would indeed look paradoxical and ridiculous to sit around and do nothing instead of helping improve the h-node entries.
I did already ask for removal of both!!
Good! You just earned yourself the "I-don-t-look-paradoxical-and-ridiculous-do-you?" badge.
In such cases, I believe it would be better to create an account on the h-node page and update the problematic entry. There seem to be others than the two we already mentioned, and people may keep posting them if the whole entry is removed, which would lead us back to the paradoxical and ridiculous situation we are trying to avoid. The modification itself is pretty straightforward: switch the value of "does it work with free software?" from "yes" to "no". Adding a link in the description to the firmware array may also help.
This is a community effort, you can contribute as much as anyone else.
Can we really be secure? Is it reliable after seeing the above comments?
I do not trust proprietary firmware. You cannot know what it hides. Maybe vulnerabilities. Maybe even malware.
But why are devices added to the database, such as those mentioned above, which do not comply with the aforementioned conditions?
As prospero replied: it is probably an honest mistake. At first, I did not find the proprietary firmware either.
It's probably best to distinguish between free, open source, secure, and private.
Free means just what you'd think it does.
Open source means that the source code is available for inspection, but may or may not be free.
Secure only means authorized users have access.
Private means what you'd think it does.
Just because something is free does not mean that is secure or private. Just because something is secure doesn't imply that it's private. On the other hand, if something is private, it does imply that it is also secure.
Like most things in life, there are areas of gray. I may try to choose to use cash whenever possible at local retailers, but it doesn't necessarily imply that I'll take a suitcase full of cash to the airport to buy an airline ticket...or that I'd be leaving in anything but handcuffs if I did.
I would like to contribute with my experience about the subject of
freedom pertaining to this thread.
If some software contains even a little nonfree code, it is not free.
It cannot be 99.999% free, if the user is to have control over it. If
the user does not have control over the software, the developer controls
the user by way of the software. This is what Richard Stallman has
stated in other words.
I try to define objectively because what other people think might be
different about the same words:
Free: does not subjugate its user.
Open source: is portrayed as free, but in the end is subjugating
Secure: gives security...the question is, to whom?
Private: removed from others
In software, the first requirement (for security and privacy) is
auditability. Even auditable software could be risky, though. If you
do not have access to the source code, it is surely not auditable. So,
there is no secure software without access to the source code. Free
software allows access to the source code with permission to modify it
and to distribute those changes. This allows the user to control the
software and not be bossed-around by its owner.
If people and organizations define clear policies, they always know what
to do. Conflating money and freedom is misleading, unless there is a
total lack of either one. Defining the separation of these two aspects
is important because it can clarify the route to take.
--
Saluton.
Esteban Ordóñez
If you want to give Richard Stallman (the father of the free software
movement) a hand, visit https://stallmansupport.org
All information received in subsequent emails and the associated
attachments is considered public with rights to use, redistribute,
modify and distribute modified versions, regardless of any previous or
future notice. If you do not agree with these terms, do not send me that
information. Thank you.
I wanted to believe =(. Thanks for checking it out.
- Login o registrati per inviare commenti