# Getting wifi to work on FreeBSD is nearly impossible.



## rtobiasr (Jan 14, 2022)

I've searched Google. I've searched the FreeBSD forums and documentation. Every computer that I've tried FreeBSD on, getting wifi to work isn't possible. I got it to work once with a USB Netgear dongle, but even then it was a hassle and was extremely slow. I know the forum rules forbid "Why isn't FreeBSD more like..." Throw me a bone. I've yet to encounter a non BSD OS that doesn't automatically detect the drivers, ask me for my SSID & password, and carry on with Internet happy times. In my experience, wifi simply doesn't work on FreeBSD 99% of the time no matter what I search. In one instance I had a Broadcom wifi chip. I added bcma_load="YES" as well as bcma_bhndb, bhmd, bhnd_pc, bhnd_pci_hostb, bhnd_pcib, and bhnd_pci to my /boot/default/loader.conf file. Still no wifi adapter detected.

Am I missing something, or is FreeBSD just crappy with the wifi support. If I enable Linux binaries then might my wifi experience be better if I can xfer the Linux wifi drivers, or the Linux doodad that can use Windows wifi drivers? Surely it cannot be as hard as this guy retired from a 20+ year career in IT finds it to be.


----------



## drhowarddrfine (Jan 14, 2022)

My information is old because I don't use a laptop anymore.

My laptops ran wifi just fine with FreeBSD. My Realtek and Atheros adapters also ran just fine. Atheros is your best bet.

Broadcom does not supply drivers for FreeBSD to use. This is Broadcom's fault and has always been an issue.

The Foundation has funded someone who is working on the latest wifi AC standard right now. I don't know where his progress is.


----------



## shkhln (Jan 14, 2022)

rtobiasr said:


> Am I missing something, or is FreeBSD just crappy with the wifi support.


A question mark.


----------



## rtobiasr (Jan 14, 2022)

If it's Broadcom's fault then... and I hate to break the rule of "why isn't FreeBSD more like", but if it's Broadcom's fault then why does Linux not have a problem with my Broadcom wifi?


----------



## rootbert (Jan 14, 2022)

FreeBSD's wireless stack is quite sub-par, however, it would be extremely helpful if you provided us information about the version of FreeBSD you are trying to get wifi access as well as hardware information about the wifi chip you are trying to use.


----------



## SirDice (Jan 14, 2022)

rtobiasr said:


> but if it's Broadcom's fault then why does Linux not have a problem with my Broadcom wifi?


Because Broadcom does support Linux and provides binary blobs for them.


----------



## jb_fvwm2 (Jan 14, 2022)

With a fully supported usb  adaptor and a passable /etc/wpa_supplicant.conf, the proper lines in /etc/rc.conf, a working knowledge of `service netif start` and similar commands, wifi seems as good as what it replaced here,
wired ethernet...
For instance, if the connection drops, I've found by removing and replacing
the usb adaptor, no reboot needed, and issuing the command above, in a few seconds the connection is up again.
[ hours testing configurations, but that was a decade or so ago... ]


----------



## jb_fvwm2 (Jan 14, 2022)

Also, `pkg install wifimgr`...
[ rtwn0, Realtek 802.11n ]


----------



## drhowarddrfine (Jan 14, 2022)

Last I looked, a good Atheros wifi adapter was $9


----------



## free-and-bsd (Jan 14, 2022)

jb_fvwm2 said:


> With a fully supported usb  adaptor and a passable `/etc/wpa_supplicant.conf`, the proper lines in `/etc/rc.conf`, a working knowledge of `service netif start` and similar commands, wifi seems as good as what it replaced here,
> wired ethernet...
> ..


Glad you feel that particular way. In my practice there are cases when resetting the connection just doesn't help the problem, and you're in the middle of a conference, for example... So, in some cases it will _never_ be "as good".


----------



## free-and-bsd (Jan 14, 2022)

drhowarddrfine said:


> Last I looked, a good Atheros wifi adapter was $9


Besides, Atheros modules offer more features (that I need) than Broadcom USB sticks. 
So... I personally feel about this much as I do about _printer support in UNIX_. Software printers aren't supported, but neither do they work reliably even where they ARE supported (from recent Windows experience with an HP printer). 
So maybe we're just _better off_ having to choose a better product that will work _for sure_?


----------



## rtobiasr (Jan 14, 2022)

OK, details. Here's the thing. I bought a couple of 2009 iMacs for US$100 each. They have internal Broadcom adapters. I have successfully used a Netgear dongle, but that's a workaround, not a real solution. I really wanted to go with FreeBSD + XFCE, but alas, only wired Ethernet works. For now, I've settled on another operating system that works with the Broadcom chips, but I'd really prefer to use FreeBSD so that I can learn it outside of a virtual machine.


----------



## SirDice (Jan 14, 2022)

Then you'll have to bug Broadcom and ask them to start supporting FreeBSD. Until then we can't really do much. Reverse engineering is difficult and error-prone.


----------



## grahamperrin@ (Jan 14, 2022)

rtobiasr welcome to FreeBSD Forums.



rtobiasr said:


> … I have successfully used a Netgear dongle, but that's a workaround, not a real solution. …



I do empathise, in that I occasionally used FreeBSD with an old MacBook Pro that could not do wireless without a massive old adapter (one that was handy). Fortunately, I did not treat this notebook as portable. 

If we remove all emotion: 

in the absence of compatible software, addition of compatible hardware is the solution.


Re: improvement of *FreeBSD support for Wi-Fi* (and other technologies), yesterday's <https://forums.freebsd.org/posts/551003> includes relevant links.

FreeBSD: Wi-Fi: suggested adapters includes links to discussions of a variety of adapters. I imagine this list growing when people begin to suggest adapters that suit the improved support.


----------



## bsduck (Jan 14, 2022)

On machines made to be upgradable (or, I'd like to say, done right), you can easily remove the unsupported chip and install a supported one instead, which you can get for cheap. Unfortunately Apple doesn't like it that way.


----------



## freezr (Jan 14, 2022)

jb_fvwm2 said:


> Also, `pkg install wifimgr`...
> [ rtwn0, Realtek 802.11n ]


This works for my Atheros WiFi Card, I like more `networkmgr` but since the moment it requires `sudo` as dependency and I use `doas` I stick with `wifimgr`.


----------



## tingo (Jan 15, 2022)

rtobiasr said:


> OK, details. Here's the thing. I bought a couple of 2009 iMacs for US$100 each. They have internal Broadcom adapters. I have successfully used a Netgear dongle, but that's a workaround, not a real solution. I really wanted to go with FreeBSD + XFCE, but alas, only wired Ethernet works. For now, I've settled on another operating system that works with the Broadcom chips, but I'd really prefer to use FreeBSD so that I can learn it outside of a virtual machine.


If you want to use something (say FreeBSD) and be happy that you get it to work; you should do proper research before buying. Assuming is never going to make you happy all the time.
- don't buy hardware before you have checked (as good as you can) that it will work with FreeBSD
- don't assume that everything will work "out of the box"; read the various documents that tell you how to configure things like graphics, wireless and wired networking, etc.
- if you can't find information on a subject, dig deeper. Search for it, ask on forums

That is not too much to ask for something that you really want to use is it?
If you can't be bothered; choose something else that will work with less effort. That is a perfectly fine solution too, even if it isn't FreeBSD.


----------



## grahamperrin@ (Jan 15, 2022)

rtobiasr said:


> a 20+ year career in IT





rtobiasr said:


> I'd really prefer to use FreeBSD s



– looks, to me, like someone who _can_ be bothered


----------



## rtobiasr (Jan 16, 2022)

tingo said:


> If you want to use something (say FreeBSD) and be happy that you get it to work; you should do proper research before buying. Assuming is never going to make you happy all the time.
> - don't buy hardware before you have checked (as good as you can) that it will work with FreeBSD
> - don't assume that everything will work "out of the box"; read the various documents that tell you how to configure things like graphics, wireless and wired networking, etc.
> - if you can't find information on a subject, dig deeper. Search for it, ask on forums
> ...


Meh. You don't get it. I knew in advance that these things couldn't run anything past El Capitan when I bought them. I like to eff-around with various OS's on various hardware. In this case, I'm running into problems for which I'm asking help. I'm just a hobbyist asking for help. Why do you have to get so prickly about it?


----------



## wago (Feb 7, 2022)

Swapping out a wifi card is usually pretty easy and doesn't cost alot. You want Intel, Qualcomm Atheros, or Realtek.


----------



## Alain De Vos (Feb 7, 2022)

Making wifi work on freebsd is very easy. You just plug in the cheapest wifi-usb dongle you can find.


----------



## trev (Feb 7, 2022)

My 2009 Mac minis use the bwn(4) Broadcom BCM4321 IEEE 802.11b/g wireless network driver in FreeBSD without any issue. No idea if the 2009 iMac is similar or not.


----------



## free-and-bsd (Feb 7, 2022)

rtobiasr said:


> OK, details. Here's the thing. I bought a couple of 2009 iMacs for US$100 each. They have internal Broadcom adapters. ...


Can't that chip be replaced?? AFAIK it uses mini-pcie slot, right? So you check on AliExpress a Qualcomm/Atheros wifi module with the same form-factor. Will cost you ~15$US.
Unless those iMacs have some sort of internal "lock" (system won't boot with a "foreign" wifi card) it's a pretty nice solution. For example, AR9380 can be found there both in half and full size form-factor.


----------



## grahamperrin@ (Feb 7, 2022)

Alain De Vos said:


> … the cheapest wifi-usb dongle you can find.



Thumbs-up, even though you forgot the word _compatible_ :-)


----------



## wago (Feb 7, 2022)

grahamperrin said:


> Thumbs-up, even though you forgot the word _compatible_ :-)


I was looking at ama- and noticed there are basically no compatible dongles, it seems everything is updated with different chipsets that aren't yet supported. (maybe there are one or two stragglers with 1 month shipping). I did find some compatible and inexpensive dongles at office depot, probably haven't moved the inventory for a few years. But it seems the rtl and atheros usb drivers are nearly obsolete.


----------



## wb7odyfred (Feb 11, 2022)

Fred Finster, [2/11/22 11:39 AM]
Here is detailed step by step manual setup of wifi.  https://t.me/ghostbsd/94284 , refers to https://forums.ghostbsd.org URL links, near the bottom of this post.

are you using *networkmgr*?  Ghostbsd, Left or right Click on the little WIFI icon in the upper left corner.
3 files are edited by *networkmgr*  /boot/loader.conf  /etc/rc.conf  /etc/wpa_supplicant.conf     wpa_supplicant.conf is where you edit in your password.   The *networkmgr* saves the password and wifi ssid in the file /etc/wpa_Supplicant.conf.

If your internal wifi does not work,  buy a cheap  USB wifi dongle  Edimax EW-7811un v1.  V2 might work now on ghostbsd. Or TpLink TL-WN725N .  Dont buy TL- WN823N rtl8188eu or ee cant remember That device driver for that chip, has a problem in the chipset_power_down() function inside the rtwn device driver.  It uses a 2 step sequence, and other WORKING drivers use a 3 step sequence.

uname -a
kldstat
kldload ir_rtwn.ko if_rtwn_usb.ko if_rtwn_pci.ko # select usb or pci to match your Realtek device interface
pciconf -lv
usbconfig list
usbconfig  ugenx.y dump_device_desc    where you change x.y  to  0.2 or 1.4 that matches your usb wifi device
sysctl net.wlan.dev

https://forums.freebsd.org/threads/edimax-ew-7811utc-how-do-i-connect-to-the-wifi.67485/post-542747

https://forums.ghostbsd.org/viewtopic.php?p=8143#p8143

https://forums.ghostbsd.org/viewtopic.php?f=64&t=526 nano usb wifi dongle, Edimax EW-7811un Version 1 , Version 2?? The USB product ID has to be updated in the FreeBSD wifi driver if_rtwn_usb.ko

https://forums.ghostbsd.org/viewtopic.php?f=64&t=570    RealTek RTL8188CE Wii-Fi PCI network hardware manual setup,  a good reference post.

Wish you successful BSD computing with your chosen wifi device.

https://www.freshports.org/net-mgmt/networkmgr/
Wish you successful BSD computing with your chosen wifi device.

*NetworkMgr* is an open source, Network Manager based on the look of the Linux
    Network Manager user interface. It use ifconfig and netif if make all work.

    WWW: https://github.com/GhostBSD/networkmgr


----------



## gentisle (Sep 25, 2022)

I know this is late, but I just got on this forum. I also am somewhat new to FreeBSD, and would like to get it up and running on a box, and then configure it to my needs/liking. One thing I have learned in reading about it, is that FreeBSD is a network OS. So I guess wifi is more of an after thought only because more and more people are trying to use it as a daily driver. I have tried installing FreeBSD (various versions) on one of my machines, with little luck. What I found by accident is NomadBSD. It was able to install and my wifi card (Intel 7265) and it worked correctly. So I had to kind of work backwards, by installing NomadBSD, then looking at the config files, and copying some of them, etc. to be able to "fix" a plain FreeBSD install. You might try that, but since the hardware is so old, you might not luck out. If Broadcom or any other manufacturer doesn't publish the specs on their products, it's difficult to write drivers for those products. Even if they do publish the data, the good folks at FreeBSD cannot always get to it, because a certain company in Washington and another copy in California like to keep new hardware flowing out of China to keep good operating systems such as FreeBSD down. I'm not a programmer, but I have read that writing device drivers is pretty difficult. Just because Linux or some other OS has a driver for a particular device, doesn't mean FreeBSD or OpenBSD or anything else will have one. I am discovering that FreeBSD requires a lot of research to just get things going, and I'm reading Absolute FreeBSD 3rd Edition. Still lost though. I don't have a lot of time to be learning/fiddling with FreeBSD either, but for some reason, I keep trying. GhostBSD may also help you with some of those devices in your machine.
gentisle


----------



## PMc (Sep 25, 2022)

Well, I didn't find it particularly difficult to install wifi - it somehow happened during basic installation without me caring about it, and afterwards, at every reboot, it just worked. (I notice it because DHCP sends a wrong DNS IP - so I know it works because I can notice that it does not work after receiving the new DHCP  ).
The problem is rather that it crashes after some 50 - 5000 MB of data, and requires a reboot.


----------



## Alain De Vos (Sep 26, 2022)

PMc, what is it. Which name of the process ?


----------



## PMc (Sep 26, 2022)

iwlwifi. Something along the line of "program error in firmware code". I didn't look at it closely yet.


----------

