-
I am communicating with the core-daemon using c++ generated responses/requests from the given protos. I am able to add CoreNode and EmaneNet nodes after the simulation has started and link them together. I want to be able to add the CoreNodes using the emane_ieee80211abg model and edit certain parameters on their config, like the txpower for example. When creating the CoreNodes, using a Is this the proper way to edit the emane properties of a CoreNode? I've also tried sending I would appreciate advice/guidance on how to add a node to a running simulation that has custom emane configuration settings. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 16 replies
-
Some improvements related to this are now on develop. Previously emane was not possible at all to add at runtime. A bit ago functionality was added to support the possibility. For the latest release, as long as you configure the emane config using the model name and the exact interface ID, it can show. It will require you to rejoin the session in the GUI for it to populate properly. The updates on develop will not require rejoining. There is also the aspect of the services on a node needing to be restarted, since some service config files that get generated are based upon the links/interfaces present at the time. You may also need to move one/all nodes to achieve emane location events for comms to be updated within EMANE. |
Beta Was this translation helpful? Give feedback.
-
Okay so I have some updates: I tested the first method you offered and that seems to work somewhat. My CoreNodes linked to an EmaneNet with an edited config also inherit the config changes (I see this change reflected in their phy.xml files), I still haven't been able to get the config change to populate in the gui but thats not very important. The problem is that emane doesn't seem to be reacting to these changes even after resetting all services on the nodes and moving the nodes like you mentioned. There is no connection being made between two emane nodes when I add them after starting the session. These nodes do connect if I add them both before starting the session under the same conditions so I know its not a problem of how close they are/the power between them. |
Beta Was this translation helpful? Give feedback.
-
As a quick and dirty test case, albeit using the python based client as an example.
from core.api.grpc.client import CoreGrpcClient
from core.api.grpc.wrappers import ConfigOption, Interface, Link, Node, Position
from core.emane.models.ieee80211abg import EmaneIeee80211abgModel
client = CoreGrpcClient()
client.connect()
session_id = 1
emane_net_id = 1
# add nodes
node2 = Node(
id=2,
name="Node2",
model="mdr",
emane_model_configs={
(EmaneIeee80211abgModel.name, 0): {
"txpower": ConfigOption(name="txpower", value="1.0")
}
},
position=Position(220, 200),
)
client.add_node(session_id=session_id, node=node2)
node3 = Node(
id=3,
name="Node3",
model="mdr",
emane_model_configs={
(EmaneIeee80211abgModel.name, 0): {
"txpower": ConfigOption(name="txpower", value="1.0")
}
},
position=Position(200, 200),
)
client.add_node(session_id=session_id, node=node3)
# add links
iface1 = Interface(id=0, ip4="10.0.0.2", ip4_mask=32)
iface2 = Interface(id=1)
link = Link(node1_id=node2.id, node2_id=emane_net_id, iface1=iface1, iface2=iface2)
client.add_link(session_id, link)
# add link
iface1 = Interface(id=0, ip4="10.0.0.3", ip4_mask=32)
iface2 = Interface(id=1)
link = Link(node1_id=node3.id, node2_id=emane_net_id, iface1=iface1, iface2=iface2)
client.add_link(session_id, link)
|
Beta Was this translation helpful? Give feedback.
-
Here is an updated example where I went ahead and scripted the above: from core.api.grpc.client import CoreGrpcClient
from core.api.grpc.wrappers import ConfigOption, Interface, Link, Node, Position, \
ServiceAction
from core.emane.models.ieee80211abg import EmaneIeee80211abgModel
client = CoreGrpcClient()
client.connect()
session_id = 1
emane_net_id = 1
position = Position(200, 200)
emane_config = {
(EmaneIeee80211abgModel.name, 0): {
"txpower": ConfigOption(name="txpower", value="1.0")
}
}
# add nodes
node2 = Node(
id=2,
name="Node2",
model="mdr",
emane_model_configs=emane_config,
position=position,
)
client.add_node(session_id=session_id, node=node2)
node3 = Node(
id=3,
name="Node3",
model="mdr",
emane_model_configs=emane_config,
position=position,
)
client.add_node(session_id=session_id, node=node3)
# add links
iface1 = Interface(id=0, ip4="10.0.0.2", ip4_mask=32)
iface2 = Interface(id=1)
link = Link(node1_id=node2.id, node2_id=emane_net_id, iface1=iface1, iface2=iface2)
client.add_link(session_id, link)
iface1 = Interface(id=0, ip4="10.0.0.3", ip4_mask=32)
iface2 = Interface(id=1)
link = Link(node1_id=node3.id, node2_id=emane_net_id, iface1=iface1, iface2=iface2)
client.add_link(session_id, link)
# restart node services
client.config_service_action(session_id, node2.id, "OSPFv3MDR", ServiceAction.RESTART)
client.config_service_action(session_id, node2.id, "zebra", ServiceAction.RESTART)
client.config_service_action(session_id, node3.id, "OSPFv3MDR", ServiceAction.RESTART)
client.config_service_action(session_id, node3.id, "zebra", ServiceAction.RESTART)
# move nodes
position = Position(x=position.x + 1, y=position.y + 1)
client.move_node(session_id, node2.id, position=position)
client.move_node(session_id, node3.id, position=position) |
Beta Was this translation helpful? Give feedback.
-
Update: Incorporating everything you've given me to now I am able to ping between two core nodes linked to an emane net after replicating this using the c++ message set. Thank you very much for all of your patient help! One note is that there is no visual link made in the gui between the two core nodes, like in the python scripts you sent. I don't know if this is on purpose or something being worked on but I would definitely suggest adding this to smooth the experience. |
Beta Was this translation helpful? Give feedback.
-
In theory the linking should work, but it only applies to a couple of the EMANE models currently and depends upon scraping data from Possibly this is either not being started properly, due to how the gRPC sets things up in this case, or the threshold isnt being met. It is probably the former. |
Beta Was this translation helpful? Give feedback.
Here is an updated example where I went ahead and scripted the above: