intrig-unicamp / mininet-wifi

Emulator for Software-Defined Wireless Networks
https://mn-wifi.readthedocs.io/
Other
431 stars 239 forks source link

‘/sys/kernel/debug/ieee80211’: No such file or directory #421

Closed andredemori closed 2 years ago

andredemori commented 2 years ago

Hi, I'm trying to install Mininet-Wifi on an AWS EC2. But I'm having this problem when trying to run:

sudo mn --wifi

output:

Adding stations: sta1 sta2 Adding hotspots: ap1 *** Configuring wifi nodes... modprobe: FATAL: Module mac80211_hwsim not found in directory /lib/modules/5.11.0-1022-aws find: '/sys/kernel/debug/ieee80211': No such file or directory Warning! Error loading mac80211_hwsim. Please run sudo 'mn -c' before running your code. More information available at /tmp/mn-wifi-mac80211_hwsim.log.

Have you already performed the mininet-wifi installation procedure on a web server? Would you have any indication of a web server to install the mininet wi-fi? Do you know if it is possible to solve this problem on the Amazon server?

I realized that there was already a similar problem in the link below, but without a definitive solution:

https://github.com/intrig-unicamp/mininet-wifi/issues/169 I already tried sudo apt-get install linux-image-extra-'uname -r', and reboot, but the error persists.

When I try:

grep HWSIM /boot/config-*

output is:

CONFIG_MAC80211_HWSIM=m

So, it is compiled as module..

ramonfontes commented 2 years ago

Does the kernel have mac80211? Can you run sudo modprobe mac80211_hwsim?

So, it is compiled as module..

The error msg says: modprobe: FATAL: Module mac80211_hwsim not found in directory /lib/modules/5.11.0-1022-aws

So I suppose you don't have mac80211_hwsim

andredemori commented 2 years ago

sudo modprobe mac80211_hwsim

Output:

modprobe: FATAL: Module mac80211_hwsim not found in directory /lib/modules/5.11.0-1022-aws

ramonfontes commented 2 years ago

Yes, you don't have mac80211_hwsim. You probably don't have other kernel modules too. Can you run sudo modprobe mac80211?

andredemori commented 2 years ago

sudo modprobe mac80211

output:

modprobe: FATAL: Module mac80211 not found in directory /lib/modules/5.11.0-1022-aws

ramonfontes commented 2 years ago

You don't have mac80211 neither. In other words, this kernel have no support for 802.11. My assumption is that linux-image-extra-'uname -r' won't work because it cannot find any reference for 5.11.0-1022-aws. However, you can still try any other kernel version (including 5.11) by running apt-cache search linux-image-extra. There you can find the list of kernel versions you can use.

andredemori commented 2 years ago

Solution:

I installed a new kernel (V 5.11) and rebooted. Then I had to install NetworkManager

sudo apt-get install network-manager

and after that the Mininet Wi-Fi started working on EC2 AWS.

Grateful.

panos-ece commented 1 year ago

Hello, I came up with the same error as the title, but in my case the modprobe of both mac80211 and mac80211_hwsim works. This is the error that i get:

mn --wifi --mac --arp --ap p4ap --client-isolation
*** Adding stations:
sta1 sta2 
*** Adding access points:
ap1 
*** Configuring wifi nodes...
find: '/sys/kernel/debug/ieee80211': No such file or directory
find: '/sys/kernel/debug/ieee80211': No such file or directory
find: '/sys/kernel/debug/ieee80211': No such file or directory
find: '/sys/kernel/debug/ieee80211': No such file or directory
Warning! Error when loading mac80211_hwsim. Please run sudo 'mn -c' before running your code.
Further information available at /tmp/mn-wifi-mac80211_hwsim.log.

Any suggestions? I use ubuntu 18.04 with kernel version 5.15.0-46-generic.