# Setup Wifi on laptop - BCM43228



## btomza (Dec 26, 2016)

Hi All,

I want to try FreeBSD 11 in a laptop and I'm having some problem to setting up my wifi.

The device details are:
vendor: Broadcom Corporation
device: BCM43228 802.11a/b/g/n

I've loaded the kernel modules for bwi and bwn and I've installed two ports of firmware but it doesn't seem to work.... or probably I don't know how to do it works...so, do you have any guideline or anything to suggest to read and/or follow to setup it?

Thanks!


----------



## btomza (Dec 28, 2016)

getopt said:


> You probably have to use NDIS. See FreeBSD handbook 11.5.1.1. Using Windows® NDIS Drivers


Thanks for you answer.

I've used NDIS, to create the new module successfully and algo I can load the new module without problems, but also I don't see if it's enougth to recognize my wifi card.

For example if I run "ifconfig" command I only see the "lo0" and "re0" but nothing more... also I don't see weird messages on dmesg... so do you have any suggestion about how to test it? and check if the new module is working? or why it isn't staring my wifi interface?


----------



## Phishfry (Dec 28, 2016)

Your device will not show up in ifconfig(8) starting with FreeBSD 11, Instead use sysctl(8).
`sysctl net.wlan.devices`


----------



## btomza (Dec 29, 2016)

Phishfry said:


> Your device will not show up in ifconfig(8) starting with FreeBSD 11, Instead use sysctl(8).
> `sysctl net.wlan.devices`



Hi Phishfry,

Thanks for your answer... I think that I'm not following you... sysctl new.wlan.devices shows nothing... should I do other thing?
Also I've been following http://www.urban-astronomer.com/new...my-hp-probook-6570bs-wifi-working-in-freebsd/ anyway I cann't do it work... also I have error when I try to load the dll modules.

thanks,


----------



## Phishfry (Dec 29, 2016)

When working correctly sysctl should show ndis0.
That is assuming ndis works with the new sysctl wlan structure.

https://srobb.net/fbsdquickwireless.html


----------



## Phishfry (Dec 29, 2016)

Maybe you want to try ndis on FreeBSD 10.3 seeing how things have changed some. I have never used ndis as it seems hackish.


----------



## btomza (Dec 29, 2016)

Phishfry said:


> Maybe you want to try ndis on FreeBSD 10.3 seeing how things have changed some. I have never used ndis as it seems hackish.


Ok thanks!!

one more question, ndis0 device should ir appear just after to load the modules? or I have to change the loader.conf and reboot?


----------



## Phishfry (Dec 29, 2016)

Look at the very bottom for some insight why use 10.3.
http://unix.stackexchange.com/questions/252899/freebsd-broadcom-bcm43225-setup

Either reboot or load by hand with `kldload`.


----------



## btomza (Dec 30, 2016)

Phishfry said:


> Look at the very bottom for some insight why use 10.3.
> http://unix.stackexchange.com/questions/252899/freebsd-broadcom-bcm43225-setup
> 
> Either reboot or load by hand with `kldload`.



mmm... interesting...
I've reinstalled my laptop with 10.3, and also I've tested the steps describied in the url that you shared and also I've created the steps has descrived the url that I shared before... in both cases... I don't see error all seems to work but ... the wlan or ndis0 device is not detected.... I cann't see it with ifconfig command...


----------



## Phishfry (Dec 30, 2016)

Looking some more at this I also note some also do this:
`kldload if_ndis`

Worth a shot


----------



## Phishfry (Dec 30, 2016)

Also I see that some instructions issue this:
`ifconfig ndis0 up`


----------



## Phishfry (Dec 30, 2016)

Some other things to ponder. The handbook states that the driver must be the same class.
32 bit windows driver for 32 bit FreeBSD.
How about you post this output:
`dmesg | grep ndis`


----------



## btomza (Dec 30, 2016)

Phishfry said:


> Looking some more at this I also note some also do this:
> `kldload if_ndis`
> 
> Worth a shot


mmmm.... something has happend... now when I tried to load if_ndis it said "can't load if_ndis: No such file or directory"


----------



## Phishfry (Dec 30, 2016)

Looking at the handbook it appears you must have 3 modules loaded. The driver.ko you created and ndis and ndis_if
`kldstat` will show what is loaded


----------



## btomza (Dec 30, 2016)

Phishfry said:


> Looking at the handbook it appears you must have 3 modules loaded. The driver.ko you created and ndis and ndis_if
> `kldstat` will show what is loaded


yes... I thought that... but I doesnt happen is I follow the steps described here: http://unix.stackexchange.com/questions/252899/freebsd-broadcom-bcm43225-setup


----------



## btomza (Dec 30, 2016)

Phishfry said:


> Looking at the handbook it appears you must have 3 modules loaded. The driver.ko you created and ndis and ndis_if
> `kldstat` will show what is loaded



Well, I've got another error now... when I tried to load the module I see:

```
ndis0: failed to initialize device; status: 0xC0000001
device_attach: ndis0 attach returned 6
```


----------



## btomza (Dec 30, 2016)

Finally, I think it's working... I'm used another driver... let me test that all works fine, and I'll update it with the information...


----------



## coyote_zed (Jan 10, 2017)

btomza said:


> Finally, I think it's working... I'm used another driver... let me test that all works fine, and I'll update it with the information...


Do you have an update on which driver you used and how to set it up? I'm also planning on putting FreeBSD 11 onto a laptop with this network card as well.


----------



## btomza (Jan 12, 2017)

coyote_trackz said:


> Do you have an update on which driver you used and how to set it up? I'm also planning on putting FreeBSD 11 onto a laptop with this network card as well.



Hi!!, I'm sorry for the delay I have some problem to configure properly the wpa_supplicant, but now it's working fine...

My current test are on 10.3, following the steps described in the url shared by "Phishfry" (http://unix.stackexchange.com/questions/252899/freebsd-broadcom-bcm43225-setup), anyway I want to test generate the driver using 11.0 because as I said I found another driver, but I haven't chance to test it no. I plan to do it soon...

You can download the driver here: https://ufile.io/6b073

_(I'll update it after to test on FreeBSD 11.00)_


----------



## btomza (Jan 13, 2017)

coyote_trackz said:


> Do you have an update on which driver you used and how to set it up? I'm also planning on putting FreeBSD 11 onto a laptop with this network card as well.



FYI, I've tested again FreeBSD 11 with the driver that I've shared before... it seems to be the correct driver, but it doesn't work on FreeBSD 11.
After to create the module (using ndisgen), I can't load the module, when I try to do it the system is rebooted and based on the Phishfry comments, FreeBSD 11 doesn't support ndis .... at least for now...

In my case I'm going to use 10.3 .... I'm using 10.2 in other machine and it works perfect so I guess that 10.3 should be fine, also the support for it is until Dec 2018 (if I'm not wrong) so 10.3 sounds good


----------



## aht0 (Jan 25, 2017)

Did it work in a reliable manner with FreeBSD 10.3? I had same type of module in Acer Aspire and it did not work reliably even in Windows (over time traffic was slowing down, eventually connection dropped)


----------



## btomza (Jan 28, 2017)

aht0 said:


> Did it work in a reliable manner with FreeBSD 10.3? I had same type of module in Acer Aspire and it did not work reliably even in Windows (over time traffic was slowing down, eventually connection dropped)



Yes, up to now it works perfect. I've installed the rest of the packages (XOrg, OpenBox, LibreOffice, etc) using wifi and I've not seen problems.


----------

