WifiBox FreeBSD setup, Use Alpine Linux Wifi driver software

Help with setting up network cards, including WiFi cards.
Post Reply
wb7odyfred
Posts: 207
Joined: Sat Nov 12, 2016 5:44 pm

WifiBox FreeBSD setup, Use Alpine Linux Wifi driver software

Post by wb7odyfred »

WifiBox FreeBSD setup, Use Alpine Linux Wifi driver software

https://github.com/pgj/freebsd-wifibox Github Source files
https://cgit.freebsd.org/ports/tree/net/wifibox FreeBSD Ports cgit
https://forums.freebsd.org/search/33380 ... box&o=date FreeBSD Forum posts search on word Wifibox
https://forums.freebsd.org/threads/what ... ost-618456 there is net/wifibox as a very good and reliable workaround. it will work in ac mode. August 10, 2023
https://github.com/pgj/freebsd-wifibox/issues/6 Loading additional ath10k firmware #6 , great explanation here of a work around to download a new driver into Alpine Linux using the shared /var partition
https://github.com/pgj/freebsd-wifibox/issues/61 Details of setting up Wifibox for RT88 chipset. Good check to compare details with your setup.


Wifibox Reviews
https://eldapper.wordpress.com/2023/01/ ... sd-laptop/ Wifibox on my GhostBSD Laptop computer
https://www.freebsd.org/status/report-2 ... 3/wifibox/ January 2022 FreeBSD report
The FreeBSD team have published a status update which provides an overview of work going into the operating system. Several of the key updates involve getting FreeBSD to work better on new hardware, including RISC-V processors and Framework laptops. Efforts are being made to reduce boot times and several developers are also working on wireless networking support. One interesting project looks at using Linux to broaden wireless support on FreeBSD: "Wifibox is an experimental project for exploring the ways of deploying a virtualized Linux guest to drive wireless networking cards on the FreeBSD host system. There have been guides on the Internet to suggest the use of such techniques to improve the wireless networking experience, of which Wifibox aims to implement as a single easy-to-use software package." Details on Wifibox and other efforts can be found in FreeBSD's quarterly status report.

https://forums.sheridancomputers.co.uk/ ... reesbd/102 Sheridan Computers Wifibox Setup

https://www.linkedin.com/in/gabor-pali/ ... bdomain=hu Gabor Pali IBM Software Engineer Linked In site
Wifibox deploys a Linux guest to drive a wireless networking card on the FreeBSD host system with the help of PCI pass-through. There have been guides on the Internet to suggest the use of such techniques to improve the wireless networking experience on FreeBSD, of which Wifibox tries to implement as a single easy-to-use software package.

https://xyinn.org/md/freebsd/wifibox Example to setup WifiBox on FreeBSD. Author: Jonathan Vasquez <[email protected]>
Last Updated: 2022-09-11-1844
Currently On: FreeBSD 13.1-STABLE (stable/13-n252072-1243360b1a0/GENERIC)
Machine: Framework Laptop (Batch 6). Ordered on November 20, 2021.

https://www.jrgsystems.com/posts/2022-0 ... h-wifibox/ I'll like to credit John Grafton for his guide on this and his ASCII drawing showing wifibox, network card, FreeBSD connectivity.


Configuration information for /etc/rc.conf and /boot/loader.conf to use Wifibox
https://t.me/ghostbsd GhostBSD Telegram Group, copied the text to include in /etc/rc.conf and /boot/loader.conf configuration files

Matu Zalem, [27 Aug 2023 14:00:01]
I remember what i did to get it to work, here is my rc.conf:

Matu Zalem, [27 Aug 2023 14:00:03]

Code: Select all

## ## WIFIBOX ## ##
wifibox_enable="YES"
devmatch_enable="YES"
devmatch_blocklist="if_iwm if_iwlwifi"
#DHCP
ifconfig_wifibox0="SYNCDHCP"
background_dhclient_wifibox0="YES"
defaultroute_delay="0"
defaultrouter="10.0.0.1"
# end wifibox
27 ## ## WIFIBOX ## ##
28 wifibox_enable="YES"
29 devmatch_enable="YES"
30 devmatch_blocklist="if_iwm if_iwlwifi"
31 #DHCP
32 ifconfig_wifibox0="SYNCDHCP"
33 background_dhclient_wifibox0="YES"
34 defaultroute_delay="0"
35 defaultrouter="10.0.0.1"
36 # end wifibox[

Q-Pa, [27 Aug 2023 14:06:58]
Did you have any of the following loader.conf settings?

Code: Select all

vmm_load="YES"
pptdevs="0/20/3"
if_bridge_load="YES"
bridgestp_load="YES"
if_tap_load="YES"
nmdm_load="YES"
q-pa
Posts: 12
Joined: Mon Nov 22, 2021 5:35 am

Re: WifiBox FreeBSD setup, Use Alpine Linux Wifi driver software

Post by q-pa »

I finally got everything to work on my X1 Carbon Gen 7.

1. I did not need to edit /boot/loader.conf
2. for installation, most of the settings please follow this excellent how-to: https://eldapper.wordpress.com/2023/01/ ... sd-laptop/
3. for autostarting wifibox I created /etc/rc.local with the single entry

Code: Select all

/sbin/dhclient wifibox0
4. Suspend/resume only workes on my machine by tweaking /usr/local/etc/devd/wifibox.conf as follows:

Code: Select all

notify 11 {
    match "system" "ACPI";
    match "subsystem" "Suspend";
    action "logger 'Stopping wifibox before suspend' && /usr/local/sbin/wifibox stop guest && /etc/rc.suspend acpi $notify";
};

notify 11 {
    match "system" "ACPI";
    match "subsystem" "Resume";
    action "/etc/rc.resume acpi $notify && logger 'Starting wifibox after resume and getting IP via DHCP' && /sbin/kldunload vmm && /sbin/kldload vmm && /usr/local/sbin/wifibox start guest && /sbin/dhclient wifibox0";
};
I also commented on github regarding the latter (https://github.com/pgj/freebsd-wifibox/issues/31).
q-pa
Posts: 12
Joined: Mon Nov 22, 2021 5:35 am

Re: WifiBox FreeBSD setup, Use Alpine Linux Wifi driver software

Post by q-pa »

To not freeze wifibox after resuming from suspending while having mounted an nfs share I modified the suspend section in my /usr/local/etc/devd/wifibox.conf as follows:

Code: Select all

notify 11 {
		match "system" "ACPI";
		match "subsystem" "Suspend";
		action "logger 'Stopping wifibox before suspend' && umount -At nfs && /usr/local/sbin/wifibox stop guest && /etc/rc.suspend acpi $notify";
};
Post Reply