adjacentlink / emane

Distributed wireless network emulation framework
Other
127 stars 37 forks source link

[Question] setting up EMANE network "right" for usage of emane-spectrum-analyzer #209

Open martin20082018 opened 2 years ago

martin20082018 commented 2 years ago

Describe the bug There are 2 Emane Networks and 2 nodes (out of a example delivered in the code). See following figure: scenario

It is a little test program to validate the node location updates and so on. I can move nodes in order to increase their distance to the point where the link drops and decrease the position to see that the wireless recover. Works! :+1:

I used the following code to build the test scenario:

    def test_two_emane_interfaces_02(self, session: Session):
        """
        Test nodes running multiple emane interfaces.

        :param core.emulator.coreemu.EmuSession session: session for test
        """
        # create emane node for networking the core nodes
        options = NodeOptions()

        options.set_location(53.651715, 7.678774, 20)
        options.emane = EmaneIeee80211abgModel.name
        emane_net1 = session.add_node(EmaneNet, options=options)

        options.set_location(53.751715, 7.778774, 20)
        options.emane = EmaneRfPipeModel.name
        emane_net2 = session.add_node(EmaneNet, options=options)

        config_key = "noisemode"
        config_value = "outofband"
        session.emane.set_model(
            emane_net1, EmaneIeee80211abgModel, {config_key: config_value}
        )
        session.emane.set_model(
            emane_net2, EmaneRfPipeModel, {config_key: config_value}
        )

        # create nodes
        options = NodeOptions(model="mdr")
        options.set_location(53.560087, 8.317760, 600)
        node1 = session.add_node(CoreNode, options=options)
        session.services.add_services(node1, node1.type, ["SSH"])

        options.set_location(53.370592, 7.772324, 250)
        node2 = session.add_node(CoreNode, options=options)
        session.services.add_services(node2, node2.type, ["SSH"])

        # create interfaces
        ip_prefix1 = IpPrefixes("10.0.0.0/24")
        ip_prefix2 = IpPrefixes("10.0.1.0/24")
        for i, node in enumerate([node1, node2]):
            iface_data = ip_prefix1.create_iface(node)
            session.add_link(node.id, emane_net1.id, iface1_data=iface_data)
            iface_data = ip_prefix2.create_iface(node)
            session.add_link(node.id, emane_net2.id, iface1_data=iface_data)

        # instantiate session
        session.instantiate()

        # ping node2 from node1 on both interfaces and check success
        status = ping(node1, node2, ip_prefix1, count=5)
        assert not status
        status = ping(node1, node2, ip_prefix2, count=5)
        assert not status

Then I start 2 SSH connections on node3 and node4: perform pings. Works :+1:

Then I try to run spectrum-monitor with:

 emane-spectrum-analyzer 10.0.0.4:8883 -100 --with-waveforms --hz-min 2320000000 --hz-max 2500000000

This gives the following window: spectrum-monitor

On my machine the spectrum monitor already works with the letce2-tutorial-master setup. Most probably I miss here some configuration in order to get it working...

Please assist me with the configuration of the emane setup used with CORE. Thank you for your help!