Wifi Support for QCA9377 or EW-7811Un V2?

Osmium

New Member


Messages: 6

Dear community,

I have become interested in installing the operating system FreeBSD on my laptop (Acer Aspire 3).
As with all operating systems, the pain in the a** problem is again the Wifi - without which nothing else will work, since
I need internet in order to install things.

Now, I have found out that the Atheros QCA9377 card is not yet supported (installed into my laptop). So, I decided to
follow the instructions and suggestions given for the matter that the Wifi card is not supported, and now I have
an Edimax EW-7811Un (V2). And again, not knowing that this "V2" is of any relevance, it is not working.

This is really a pity, as both Edimax and Atheros are listed as supported Wifi devices.
Therefore, I would like to ask whether there is a workaround (I read that OpenBSD now
supports the Edimax V2 card), since getting yet another USB dongle becomes a little silly.

If not, then I would like to ask if any support for at least one of the abovementioned cards is planned in
the next version of FreeBSD? I can imagine that I am not the only one with this problem, since the
QCA9377 now seems quite common, and the "V2" is really hidden...

Thanks for any suggestions and information on this matter :)
Cheers
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 11,612
Messages: 37,948

This is really a pity, as both Edimax and Atheros are listed as supported Wifi devices.
Some Edimax and some Atheros chipsets are supported. Not all Edimax or all Atheros devices.

If not, then I would like to ask if any support for at least one of the above mentioned cards is planned in
the next version of FreeBSD?
What version did you try?
 
OP
O

Osmium

New Member


Messages: 6

Well, as I wrote above:
Qualcomm Atheros QCA9377
Edimax EW-7811Un V2

...and the current version of FreeBSD (13.0)
 

T-Daemon

Daemon

Reaction score: 790
Messages: 1,626

Edimax EW-7811Un V2

It's likely that specific Edimax model is supported on FreeBSD. The problem seems to be a missing device ID. I found this Linux patch for the Edimax EW-7811UN V2.

RTL8188EU chip support is provided by rtwn(4) on FreeBSD.

To make sure the device ID (0xb811) from the Linux patch is the same with your device please execute usbconfig | grep WLAN , look for the ugenX.Y unit.address value.

Example output for a Ralink:
Code:
ugen0.4: <Ralink 802.11 n WLAN> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (450mA)

Execute usbconfig 0.4 dump_all_desc | grep id (replace 0.4 with the Edimax unit.address value), post output.
 
OP
O

Osmium

New Member


Messages: 6

It's likely that specific Edimax model is supported on FreeBSD. The problem seems to be a missing device ID. I found this Linux patch for the Edimax EW-7811UN V2.

RTL8188EU chip support is provided by rtwn(4) on FreeBSD.

To make sure the device ID (0xb811) from the Linux patch is the same with your device please execute usbconfig | grep WLAN , look for the ugenX.Y unit.address value.

Example output for a Ralink:
Code:
ugen0.4: <Ralink 802.11 n WLAN> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (450mA)

Execute usbconfig 0.4 dump_all_desc | grep id (replace 0.4 with the Edimax unit.address value), post output.

Thank you for the reply!

Interestingly, doing an usbconfig command, I get, among other things,
ugen0.3: <Realtek Edimax N150 Adapter> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)

...but when doing it with | grep WLAN (or grep wlan), then nothing remains.

Doing as you said, the output is:
idVendor = 0x7392
idProduct = 0xb811

Best regards
 

T-Daemon

Daemon

Reaction score: 790
Messages: 1,626

ugen0.3: <Realtek Edimax N150 Adapter> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
I expected 'WLAN' here but it looks like that's not always the case I see.

idVendor = 0x7392
idProduct = 0xb811
After the product ID is confirmed you need to build and install a custom kernel to add support for the Edimax. Download and apply attached diff(1) file down below with patch(1) to the source code in /usr/src.

If you are unsure how to build a custom kernel and need a step by step guide please ask. In case you are worried about the procedure to be complicated, building a custom kernel is very easy.
 
OP
O

Osmium

New Member


Messages: 6

I expected 'WLAN' here but it looks like that's not always the case I see.


After the product ID is confirmed you need to build and install a custom kernel to add support for the Edimax. Download and apply attached diff(1) file down below with patch(1) to the source code in /usr/src.

If you are unsure how to build a custom kernel and need a step by step guide please ask. In case you are worried about the procedure to be complicated, building a custom kernel is very easy.
Thank you for the reply.
I do have some questions:
- So, it is necessary to at least have a LAN connection to the internet from my Laptop with FreeBSD, is that correct?
There is no way of doing it any differently (say, by copying the file to a USB stick and from there, copy it to the operating system)?
- Yes, I am unsure of how to build a custom kernel. I have done that before with Gentoo, but it was a pain in the a**, and I needed to recompile
many times, since always, something was missing. It would be great, however, if there was a possibility to compile a kernel, say, just exactly
like the default kernel, but with this driver added. Is that possible?
--> And so, is it then necessary to build this kernel anew each time I want to upgrade the operating system?

Many thanks
Best regards
 

T-Daemon

Daemon

Reaction score: 790
Messages: 1,626

I had some questions above
When I posted last, your post #7 wasn't there. It must have appeared after Forums administrator approval. The Forums software doesn't notice about those between posts unless the user has the thread on the watch list. I hadn't this thread on the watch list, sorry, I had no knowledge you posted.

- So, it is necessary to at least have a LAN connection to the internet from my Laptop with FreeBSD, is that correct?
There is no way of doing it any differently (say, by copying the file to a USB stick and from there, copy it to the operating system)?
Sure, you can copy it on USB stick, it's not a necessity to have a internet connection from FreeBSD. The patch file (eventually also the system source code package) can be downloaded from a different operating system, put on the USB stick and carried over to FreeBSD. It would be best if the USB stick is formatted with a MS-DOS file system. It would make the device graft to the FreeBSD system easy by using the mount_msdosfs(8) utility from system base.

- Yes, I am unsure of how to build a custom kernel. I have done that before with Gentoo, but it was a pain in the a**, and I needed to recompile
many times, since always, something was missing. It would be great, however, if there was a possibility to compile a kernel, say, just exactly
like the default kernel,
Building a kernel on FreeBSD, just exactly like the default kernel, is very easy, not comparable with Gentoo, just follow the steps below.

... but with this driver added.
A driver doesn't need to be added to the kernel, it's already there but it doesn't recognize the Edimax model. The patch adds the devices unique identification number to the drivers USB module so the driver can recognize and attach to it.

Steps to build the kernel:

1 - Download patch file.

2 - In case you need to build the kernel again, to reduce the build time for future builds, create file /etc/src-env.conf and set the environment variable:
Code:
WITH_META_MODE=yes

Execute
Code:
# sysrc kld_list+=filemon    # This will set kernel module 'filemon' (needed for Meta_Mode)
                             # in  /etc/rc.conf to persist reboots
# kldload filemon            # load module imediate

3 - If not installed already, install source code from the FreeBSD installer image (/usr/freebsd-dist/src.txz) or if absent, download from link. I assume your system is 13.0-RELEASE, amd64 architecture (AMD, Intel 64 bit):

http://ftp.freebsd.org/pub/FreeBSD/releases/amd64/13.0-RELEASE/src.txz (~150MB)

4 - From USB stick extract source package (omit this step if /usr/src is populated) :
Code:
# tar xf src.txz -C /

5 - Patch the source code:
Code:
# patch -p0 < patch-edimax-ew-7811unv2.txt
Make sure there are no error messages. Don't continue when there are, report back.

6 - Build, install kernel:
Code:
# cd /usr/src
# make buildkernel
# make installkernel

7 - Agree Realtek license:

/boot/loader.conf
Code:
legal.realtek.license_ack=1

8 - Reboot system:
Code:
# shutdown -r now

9 - Check if the device is detected, execute
Code:
# sysctl net.wlan.devices
The output should show
Code:
net.wlan.devices: rtwn0
Also, please post
Code:
dmesg | grep rtwn0
for eventual problem report (see below).

10 - Continue with handbook 32.3. Wireless Networking.

--> And so, is it then necessary to build this kernel anew each time I want to upgrade the operating system?
At the moment yes. If all goes well, meaning your device is recognized and functional, I will open a problem report at FreeBSD bugzilla, submit the patch and ask to be committed. When the patch is approved it goes first into main (CURRENT), then after a few weeks merged into stable/13. From there into releng/13.x (13.x-RELEASE). A future update of your system will make a custom build kernel obsolete.
 
Last edited:
OP
O

Osmium

New Member


Messages: 6

Thanks very much for your answer! I will try it and give feedback whether it works or not.
 
Top