intrig-unicamp / mininet-wifi

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

'mesh' object has no attribute 'country_code' #408

Closed huynhducmanh closed 2 years ago

huynhducmanh commented 2 years ago

Hello, whenever i tried to run any examples with mesh attribute in the python script. I got the same error messgae. For example, the vanet.py would return: Traceback (most recent call last): File "examples/vanet.py", line 74, in topology(sys.argv) File "examples/vanet.py", line 46, in topology cls=mesh, ssid='mesh-ssid', channel=5) File "/usr/local/lib/python2.7/dist-packages/mininet_wifi-2.6-py2.7.egg/mn_wifi/net.py", line 618, in addLink link = cls(node=node1, **params) File "/usr/local/lib/python2.7/dist-packages/mininet_wifi-2.6-py2.7.egg/mn_wifi/link.py", line 1935, in init self.prepareMeshIface(wlan, iface) File "/usr/local/lib/python2.7/dist-packages/mininet_wifi-2.6-py2.7.egg/mn_wifi/link.py", line 1954, in prepareMeshIface self.setReg() File "/usr/local/lib/python2.7/dist-packages/mininet_wifi-2.6-py2.7.egg/mn_wifi/link.py", line 269, in setReg self.pexec('iw reg set {}'.format(self.country_code)) AttributeError: 'mesh' object has no attribute 'country_code'

Any suggestion to fix this :) Thank you very much!

ramonfontes commented 2 years ago

Fixed with https://github.com/intrig-unicamp/mininet-wifi/commit/afaf1e753d827f6c060fd31b26d6b56adcec0eb1