Mua hàng tại Link Shopee hoặc Hotline 0345-148-136.

Better WiFi on FreeBSD with Wifibox



I used to run FreeBSD on my PC with an Ethernet connection, it was perfect without WiFi.

I was install FreeBSD on my laptop recently because I need to bring it with me on the way to my hometown.

The WiFi card on my laptop (Intel® Dual Band Wireless-AC 3160) is supported by FreeBSD (iwm, iwlwifi).

Unfortunately the driver (iwm, iwlwifi) did works but it was terrible slow and unreliable.

Then I found Wifibox from this report. I found some tutorials on internet too:

I was follow the first one. The setup was quite straight, it works perfect now.

I put in i3 config because I’m using FreeBSD+i3wm instead of GhostBSD. Maybe I’ll move it to cron.

$ doas pciconf -lv | grep -B3 -i wireless
    subclass   = SMBus
ppt0@pci0:6:0:0:	class=0x028000 rev=0x83 hdr=0x00 vendor=0x8086 device=0x08b3 subvendor=0x8086 subdevice=0x8470
    vendor     = 'Intel Corporation'
    device     = 'Wireless 3160'
$ cat /usr/local/etc/wifibox/bhyve.conf
# These are the default values for launching the bhyve(8) guest,
# please revisit them.

# Number of virtual CPUs allocated for the guest, which determines the
# count of concurrent execution threads.

# Maximum amount of memory allocated for the guest.  This is rather a
# conservative default, and it is worth considering to lower this
# value when possible.

# Change this to `yes` to activate the nmdm(4)-based console.  Usually
# this is not needed hence it is disabled by default.

# The value of `passthru` has to match with the slot/bus/function of
# the wireless PCI device, which can be obtained from the output of
# the pciconf(8) tool.  THIS MUST BE SET otherwise the device will not
# be visible for the guest.  Expected format: "s/b/f", e.g."3/0/0" for
# the `pci0:3:0:0` device.
$ cat /etc/rc.conf
# wlan0 using wifibox
devmatch_blocklist="if_iwm if_iwlwifi"
$ cat /usr/local/etc/wifibox/core.conf
# These are the default values that control the overall behavior of
# wifibox.

# Level of logging.  Verbosity increases in the following order.
# - none:  No messages are either displayed or logged.
# - error: Only error messages are displayed and logged.
# - warn:  Error and warning messages are displayed and logged.  That
#          is the default.
# - info:  Besides error and warning messages, informative messages
#          about the execution are logged.
# - debug: In addition to errors, warnings, and informative messages,
#          some extra information about the program's state is logged.
#          Useful for troubleshooting, but mostly makes sense when
#          read together with the source code.
$ cat /usr/local/etc/wifibox/wpa_supplicant/wpa_supplicant.conf
# This is a placeholder file.  On how to create one, consult
# /usr/share/examples/etc/wpa_supplicant.conf or import an existing one
# from the /etc directory.

# Mind that the `ctrl_interface` parameter, when in use, has to be
# kept in sync with UDS pass-through definitions in uds_passthru.conf.
# The default values are aligned with these settings below.
# It is also recommended to enable write access for the clients that
# are connecting to wpa_supplicant from the host through the forwarded
# control socket.

$ cat service/
doas service routing restart
doas service netif restart wifibox0


Trả lời

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *