intrig-unicamp / mininet-wifi

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

AttributeError: 'TCIntf' object has no attribute 'configWLink' #377

Closed rosakolejarz closed 3 years ago

rosakolejarz commented 3 years ago

Hello, I can't resolve my error while running that simple python script:

#!/usr/bin/python

from mininet.node import RemoteController
from mininet.log import setLogLevel
from mn_wifi.net import Mininet_wifi
from mn_wifi.node import OVSKernelAP
from mn_wifi.cli import CLI

def myNetwork():

    net = Mininet_wifi(topo=None, build=False, ipBase='10.0.0.0/8')

    c0 = net.addController(name='c0', controller=RemoteController, ip='127.0.0.1', protocol='tcp', port=6633)
    ap1 = net.addAccessPoint('ap1', cls=OVSKernelAP, ssid='ssid1', mode='n', channel='1', position='250.0,400.0,0', range=200)
    ap2 = net.addAccessPoint('ap2', cls=OVSKernelAP, ssid='ssid1', mode='n', channel='1', position='250.0,400.0,0', range=200)

    net.configureWifiNodes()

    net.addLink(ap1, ap2, bw=10)

    net.build()

    net.controllers[0].start()

    net.get('ap1').start([c0])
    net.get('ap2').start([c0])

    CLI(net)
    net.stop()

if __name__ == '__main__':
    setLogLevel( 'info' )
    myNetwork()

Traceback (most recent call last): File "demo.py", line 33, in myNetwork() File "demo.py", line 21, in myNetwork net.build() File "/usr/local/lib/python2.7/dist-packages/mininet_wifi-2.5-py2.7.egg/mn_wifi/net.py", line 761, in build self.auto_association() File "/usr/local/lib/python2.7/dist-packages/mininet_wifi-2.5-py2.7.egg/mn_wifi/net.py", line 1415, in auto_association self.restore_links() File "/usr/local/lib/python2.7/dist-packages/mininet_wifi-2.5-py2.7.egg/mn_wifi/net.py", line 1377, in restore_links link.intf1.configWLink.set_tc(link.intf1.name, **params) AttributeError: 'TCIntf' object has no attribute 'configWLink'

I assume that I can set bw in addLink method (without that bw declaration everything runs fine, no error occure). If not, why? I have no other idea what is the reason of my error as I run that script on a fresh VM got from your github.

My additional question is whether mininet-wifi requires physical wireless network adapter? (I have only Ethernet physical adapter in that machine)

I will be really grateful for your answer!

ramonfontes commented 3 years ago

Please do a git pull and then run sudo make install

My additional question is whether mininet-wifi requires physical wireless network adapter? (I have only Ethernet physical adapter in that machine)

The hwsim module is the only requirement for simulating wifi.

rosakolejarz commented 3 years ago

All works fine now, thank you very much!