You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
QEMU LibreMesh instance with WiFi capabilities #1180
After experimenting quite a bit with different build, I think I have a working config.
This is still subject to changes, especially if we want to use it along with vwifi
Once the firmware compiled, the virtual machine can simply be set up like this : qemu-system-x86_64 \ -enable-kvm \ -nographic \ -drive if=virtio,file=path/to/your/image,format=raw \ -m 512
By default, the module loads up with 2 radios, and for some reasons that I'm still investigating, LibreMesh sets them up in the 6g band, but that comes with limitation : the 6g bands requires wpa3 to be set up, but that's currently outside my scope of testing, so you have to manually set up the radios to operate in the 2g or some of the 5g bands. Otherwise, nothing happens, especially no logs about the issue!
After selecting the channels and reloading wifi you'll finally be able to see the different interfaces show up.
You'll also see a hwsim0 interface appear, but from my understanding, this is only a mock up radio only used for debugging. Haven't experimented with it yet.
The issue with these virtual radios, is that they expose limitless capabilites : they can emit in the 2g/5g/6g bands, as can be seen from the result of the following command : iw phy phy0 info
The issue is as follow : At first boot, libremesh will set up the /etc/config/wireless :
This leads to the rest of the configuration to fail, and the virtual wifi interfaces will stay in the in the DOWN state.
The dirty fix to that is to manually change the band of the radios : uci set wireless.radio0.band=2g;uci set wireless.radio1.band=2g;uci commit; wifi reload
Then wait a bit for the set up to finish, and you'll finally have virtual interfaces show up and associate (in the wlan*-mesh cases) :
My opinion is that we should not try to support 6 GHz until when someone owns some actual 6 GHz hardware for testinh the support. So I would modify the code so that 6 GHz gets ignored, and a warning message gets printed. And same thing for 60 GHz but there's no need to do this now :)
Sure, I will take care of that!
From my quick look up there seems to be an issue with the logic for checking in which band the radio is operating, and the fact that 6g band have overlapping channel names with 2g band.
local radioBand = wireless.is5Ghz(radioName) and '5ghz' or '2ghz'
Activity
VGDSpehar commentedon Jul 2, 2025
After experimenting quite a bit with different build, I think I have a working config.
This is still subject to changes, especially if we want to use it along with vwifi
config-libremesh-virtual-wifi-enabled.txt
It relies on mac80211_hwsim module to simulate wifi inside a qemu virtual machine.
Once the firmware compiled, the virtual machine can simply be set up like this :
qemu-system-x86_64 \ -enable-kvm \ -nographic \ -drive if=virtio,file=path/to/your/image,format=raw \ -m 512By default, the module loads up with 2 radios, and for some reasons that I'm still investigating, LibreMesh sets them up in the 6g band, but that comes with limitation : the 6g bands requires wpa3 to be set up, but that's currently outside my scope of testing, so you have to manually set up the radios to operate in the 2g or some of the 5g bands. Otherwise, nothing happens, especially no logs about the issue!
After selecting the channels and reloading wifi you'll finally be able to see the different interfaces show up.
You'll also see a hwsim0 interface appear, but from my understanding, this is only a mock up radio only used for debugging. Haven't experimented with it yet.
VGDSpehar commentedon Jul 4, 2025
When the mac80211-hwsim module gets inserted, it adds by default two (virtual) physical radios :
The issue with these virtual radios, is that they expose limitless capabilites : they can emit in the 2g/5g/6g bands, as can be seen from the result of the following command :
iw phy phy0 infoThe issue is as follow : At first boot, libremesh will set up the /etc/config/wireless :
Two issues :
This leads to the rest of the configuration to fail, and the virtual wifi interfaces will stay in the in the DOWN state.
The dirty fix to that is to manually change the band of the radios :
uci set wireless.radio0.band=2g;uci set wireless.radio1.band=2g;uci commit; wifi reloadThen wait a bit for the set up to finish, and you'll finally have virtual interfaces show up and associate (in the wlan*-mesh cases) :
And to check if they're meshing :
ilario commentedon Jul 5, 2025
Thanks for the report!!
Can you post the output of
lime-configand oflime-report?VGDSpehar commentedon Jul 5, 2025
Yes, you can find both outputs here :
lime-config.txt
lime-report.txt
ilario commentedon Jul 7, 2025
I suppose we should update the code in this file:
https://github.com/libremesh/lime-packages/blob/master/packages/lime-system/files/usr/lib/lua/lime/wireless.lua
Can you do that?
My opinion is that we should not try to support 6 GHz until when someone owns some actual 6 GHz hardware for testinh the support. So I would modify the code so that 6 GHz gets ignored, and a warning message gets printed. And same thing for 60 GHz but there's no need to do this now :)
VGDSpehar commentedon Jul 8, 2025
Sure, I will take care of that!
From my quick look up there seems to be an issue with the logic for checking in which band the radio is operating, and the fact that 6g band have overlapping channel names with 2g band.
Seems to be one of the culprits.
ilario commentedon Jul 23, 2025
Should have been fixed by #1207.
In the future, if anyone gets some 6 GHz hardware, we could actually support 6 GHz radios.