2

I have tried using this guide: https://wireless.wiki.kernel.org/en/users/drivers/mac80211_hwsim

and did

modprobe mac80211_hwsim

However the output is:

modprobe: FATAL: Module mac80211_hwsim not found in directory /lib/modules/...

How do I get it?

1

Seems like the kernel you are running isn't compliled with mac80211_hwsim.

You need to install another one, compile it with it, and install it.

If you have ubuntu you can use that guide:

https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel

When it says "Modifying the configuration" add a CONFIG_MAC80211_HWSIM flag in the .conf or using make menuconfig

After you finish the installation reboot into the new kernel (choose it in grub), then you can modprobe mac80211_hwsim.

6
  • 1
    Can I avoid using another kernel? – money-for-nothing Jan 25 '20 at 16:15
  • 1
    you can compile the same kernel version you have, than insmod mac80211_hwsim manually from the compiled kernel folder. – dani39 Jan 25 '20 at 16:17
  • 1
    I have moved to another pc in the meantime, after modprobing hwsim I can't seem to run hostapd the wlan0 it creates, it says it can't do "UP", I'm running as root, any idea why? – money-for-nothing Jan 25 '20 at 16:25
  • Maybe it is the network-manager, try sudo service network-manager stop – dani39 Jan 25 '20 at 16:26
  • 1
    Yes, it did, I have actually used the same kernel version, so I just insmoded the module after re-compiling the kernel with the flag (I was already running on my own compiled kernel), without having to reboot into another kernel. – money-for-nothing Jan 25 '20 at 17:20
0

You can check whether mac80211_hwsim code compiled or not watching to your config (according to uname -r) such way:

grep HWSIM /boot/config-*

If your kernel configured with CONFIG_MAC80211_HWSIM=n this code is not compiled and you can't use it without recompiling. If you have CONFIG_MAC80211_HWSIM=m it is compiled as module (seems it's not your case). Also it can be configured as CONFIG_MAC80211_HWSIM=y - this code is already built in your kernel, so you don't need to do modprobe or insmod.

0

In latest Ubuntu I solved this by installing the package linux-modules-extra-{KERNEL_VERSION}-generic where this modules resides.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.