Setup wifi network step-by-step

Hello guys,

I'm following the FreeBSD Handbook to setup a wifi network.
The Desktop computer on which I want to do this has a PCI wifi network card (you can see it in the picture below).

IMG_20180914_152356.jpg




STEP 1: IDENTIFY THE NETWORK CARD
The command: sysctl net.wlan.devices returns a blank prompt.
So, I've analyzed the installed hardware with commands: pciconf -lv and dmesg | grep pci

IMG_20180914_160355.jpg


If I've well understood, my PCI network card on pci 0:1:0:0 has no a driver attached (I think that this means I need to search the correct driver for the wifi connected card).

This device is shown as using an Broadcom chip BCM43131.

STEP 2: IDENTIFY THE DRIVER FOR THE NETWORK CARD
To do this I've run the command: apropos Broadcom, obtaining a list of possible drivers.

QUESTION.
1 - I think that the next step is to notify the driver to the kernel. In which a way ?
2 - It seems that what I've shown here per images is hardware indipendent, that is running the previous commands on a laptop (booted with the same USB stick) I obtain the same results.

Any help is apreciated.
Thanks in advance.
 
Hello.

bwi driver

Are you sure ? Have you just tried ?
Because the bwi(4) says:

" This driver requires firmware to be loaded before it will work. The ports/net/bwi-firmware-kmod port needs to be installed before ifconfig(8) will work. "

Googling it also seems that:

" The firmware port installs a module that must also be loaded:

bwi_v3_ucode "

Have you experienced with the above interface card driver ?


Another question:

To join the BSS network of my lab with network name ``my_netlab'', I use the command:

ifconfig wlan create wlandev bwi0 ssid my_netlab up


where I've had to specify the wpa/wpa2 pass_key ?
 
/etc/wpa_supplicant.conf
/etc/rc.conf

Ok ... I've again do my question in a wrong way. I try to be more clear:

Are the info contained in the /etc/wpa_supplicant.conf and /etc/rc.conf related with the driver of the network card ?
( the correct driver seems to be bwi(4), or probably the new one bwn(4) ).

If they are related in which part of the files the driver bwi is mentioned ?

That is:
/etc/wpa_supplicant.conf and /etc/rc.conf are configuration files executed at the boot time.
If so, their task is to inform the driver to sniff the network, to start up a connections, etc .... etc ......

Or not ?

Thanks very much.
 
The rc.conf(5) settings are used to bring up the interface first to a known state. Then wpa_supplicant(8) is hooked up to process where the interface is told to associate with an access point and wpa_supplicant(8) will then apply its configuration based on the matching SSID to the interface and will set up the encryption. After this the IP address set up is done either by manual set up or DHCP.

Btw the configuration files are not executed, they are not program code where statements are executed in order. They are rather a set of settings that are either simple variable assignments or applied if they match certain conditions like the SSID. With rc.conf(5) the order isn't important but if you repeat the same setting twice only the latter will be in effect, for example:

Code:
hostname="host1.mydomain"
...
hostname="host2.mydomain"

With those hostname would be set just to "host2.mydomain".
 
/etc/wpa_supplicant.conf
/etc/rc.conf

The rc.conf(5) settings are used to bring up the interface first to a known state. Then wpa_supplicant(8) is hooked up to process where the interface is told to associate with an access point and wpa_supplicant(8)

Ok ... if it is so simple I only need to "copy and paste" the code shown in the above files.

Let me try to arrange them for my network ... I'll post the results here.


A question please .....

Add in /boot/loader.conf the bwi driver

Once the (correct) network card driver has been installed which command can I use to see if the card is usable ?
- ifconfig(8) is one for example ...
- dmesg(8) (related to the boot phase) ....
- which others ????
 
the correct kernel module

The problem is:
is there a way to find the name of correct kernel module.

In this case is maybe the driver's name: bwn ?

The rc.conf(5) settings are used to bring up the interface first to a known state.
Before configure rc.conf, immediately after the driver has been installed, how can I see if the net card is recognized by FreeBSD ?
I thought ifconfig, but ....
neither the driver name nor any reference to the hardware card are shown running ifconfig.

Thanks !!!
 
ifconfig wlan0 create wlandev wpi0
kldstat
kldload bwn or kldload bwi
kldstat

ifconfig wlan0 up list scan

Read FreeBSD Handbook Networking section 7.4
https://man.freebsd.org/cgi/man.cgi?bwn(4)
Manual Page for Broadcom BWN wifi device driver
install 3 Broadcom BWN firmware files into directory /boot/modules
Follow directions in the above manual page for BWN
https://forums.ghostbsd.org/viewtopic.php?t=2469 BWN 43xxx install wifi
More setup information about BWN device driver installation for 43xx
Latest Post February 2024 tested with FreeBSD 14.0 kernel

https://forums.ghostbsd.org/viewtopic.php?f=64&t=526 USB RTL8192cu Edimax ES-7811un Realtek device
https://forums.ghostbsd.org/viewtopic.php?f=64&t=570 PCI RTL8188ce Realtek PCI device


I researched and wrote those forum posts to take some one who is a new user (like myself at that time) to FreeBSD / GhostBSD and find out what WiFi devices exist on their laptop or desktop and then manually go step by step with simple commands, until you have a working WiFi network connection using the same tools and programs that the NetworkMgr python application uses to make a network connection. I wrote these steps down based on reading many sources, Web URLS, and then testing step by step myself. I collected this information and wrote it down from beginning to end. The FreeBSD handbook is very useful, but starts in the middle and supposes you know what commands to use and in which order to configure your network, yet when you are a new user, you have no ideas on what command to use, nor previous experience in this "new to you" operating system.

Use the commands listed as a template and modify for your computer hardware situation. Basically edit 3 files:
/boot/loader.conf
/etc/rc.conf
/etc/wpa_supplicant.conf

and run about 4 commands:
ifconfig wlan0 create wlandev rtwn0
killall dhclient
wpa_supplicant -b -i wlan0 -c /etc/wpa_supplicant.conf
dhclient wlan0
 
Back
Top