Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Identifying and debugging wmediumd with error code

31 views
Skip to first unread message

alexande...@gmail.com

unread,
Oct 19, 2024, 7:28:55 PM10/19/24
to mininet-wifi-discuss
Good evening,

I'm recently trying to do some work which involves adding adhoc links to a node after the network is started (currently, my understanding is that you cannot adjust the attributes of second wireless interface created using the wlans parameter until after startup). My code looks something like this-
...
ndn.net.addLink(ndn.net[f"sta{i}"], cls=adhoc, intf=f"sta{i}-wlan1", ssid='adhocNet', mode='g', channel=2)
  File "/usr/local/lib/python3.10/dist-packages/mininet_wifi-2.6-py3.10.egg/mn_wifi/net.py", line 650, in addLink
    link = cls(node=node1, **params)
  File "/usr/local/lib/python3.10/dist-packages/mininet_wifi-2.6-py3.10.egg/mn_wifi/link.py", line 1790, in __init__
    self.setTxPower(self.txpower)
  File "/usr/local/lib/python3.10/dist-packages/mininet_wifi-2.6-py3.10.egg/mn_wifi/link.py", line 339, in setTxPower
    self.setTXPowerWmediumd()
  File "/usr/local/lib/python3.10/dist-packages/mininet_wifi-2.6-py3.10.egg/mn_wifi/link.py", line 190, in setTXPowerWmediumd
    w_server.update_txpower(w_txpower(self.wmIface, self.txpower))
  File "/usr/local/lib/python3.10/dist-packages/mininet_wifi-2.6-py3.10.egg/mn_wifi/wmediumdConnector.py", line 735, in update_txpower
    raise WmediumdException("Received error code from wmediumd: "
mn_wifi.wmediumdConnector.WmediumdException: Received error code from wmediumd: code 66

There does not seem to be any obvious sign of a list of error codes or clear reference to these constants, which makes understanding and addressing this issue rather difficult. Is there any existing resource you can point to which covers how to understand these error codes?

Thanks,
Alex Lane

Ramon Fontes

unread,
Oct 19, 2024, 7:59:03 PM10/19/24
to alexande...@gmail.com, mininet-wifi-discuss
Hi Alex, 

The issue you're describing with wmediumd crashing when new nodes are added at runtime in Mininet-WiFi occurs because wmediumd doesn't dynamically handle updates to the MAC addresses of new nodes after initialization. Since wmediumd is responsible for simulating wireless medium behavior and MAC address handling, it needs to be aware of all nodes' MAC addresses to function properly. However, when new nodes are added, it doesn't automatically update its list of MAC addresses, causing the crash.

To resolve this, a contribution could be made that allows wmediumd to dynamically update its information about nodes, particularly their MAC addresses, when new nodes are added at runtime.


--
You received this message because you are subscribed to the Google Groups "mininet-wifi-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mininet-wifi-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mininet-wifi-discuss/105eb313-a5c0-4a42-a863-5820636c0aa4n%40googlegroups.com.

alexande...@gmail.com

unread,
Oct 21, 2024, 4:29:08 PM10/21/24
to mininet-wifi-discuss
Hi Ramon,

I realize I left out some context by accident and made some additional findings:
A) This crash only occurs if I'm running with the mobility model.
B) If we add a delay with time.sleep to the mobility thread before beginning execution, we do not seem to see these crashes.
I am led to suspect that this may be a concurrency issue of some sort regarding wserver messaging. I will try and do some additional investigation.

Thanks,
Alex Lane

P.S.
I apologize for the double email, I missed the Google Groups pop-up about manual approval and assumed I had hit the discard button on accident.

Ramon Fontes

unread,
Oct 21, 2024, 4:33:37 PM10/21/24
to alexande...@gmail.com, mininet-wifi-discuss
> I am led to suspect that this may be a concurrency issue of some sort regarding wserver messaging. 

No, definitely. If you add nodes at runtime  wmediumd has no information about the new node. It may no crash but the new interface is not being managed by wmediumd. 

> I apologize for the double email, I missed the Google Groups pop-up about manual approval and assumed I had hit the discard button on accident.

No problem. I had to change the approval  method due to spams. 

Reply all
Reply to author
Forward
0 new messages