[ndnSIM] wifi simulation with access point

Muktadir R Chowdhury (mrchwdhr) mrchwdhr at memphis.edu
Thu Jun 25 16:56:21 PDT 2020

I have three nodes: two stations and one access point. Which I created in the following way:

  NodeContainer wifiStaNodes;

  wifiStaNodes.Create (2);

  NodeContainer wifiApNode;

  wifiApNode.Create (1);

  YansWifiChannelHelper wifiChannel = YansWifiChannelHelper::Default ();


  wifiChannel.AddPropagationLoss ("ns3::RangePropagationLossModel", "MaxRange", DoubleValue(50));

  YansWifiPhyHelper phy = YansWifiPhyHelper::Default ();

  phy.SetChannel (wifiChannel.Create());

  WifiHelper wifi;

  wifi.SetRemoteStationManager("ns3::ConstantRateWifiManager", "DataMode",


  WifiMacHelper mac;

  Ssid ssid = Ssid ("ns-3-ssid");

  mac.SetType ("ns3::StaWifiMac", "Ssid", SsidValue (ssid), "ActiveProbing", BooleanValue (false));

  NetDeviceContainer staDevices = wifi.Install (phy, mac, wifiStaNodes);

  mac.SetType ("ns3::ApWifiMac", "Ssid", SsidValue (ssid));

  NetDeviceContainer apDevices = wifi.Install (phy, mac, wifiApNode);

Node 0 (Consumer) , Node 2 (Access Point), and Node 1 (Producer).

All the nodes' strategy is set to best-route for the used prefix. I am manually setting up the routes between stations and ap.

  Ptr<Node> conNode = wifiStaNodes.Get(0);

  Ptr<Node> prodNode = wifiStaNodes.Get(1);

  Ptr<Node> apNode = wifiApNode.Get(0);

  ndn::FibHelper::AddRoute(conNode, "/test/prefix", apNode, 1);

  ndn::FibHelper::AddRoute(prodNode, "/test/prefix", apNode, 1);

I am getting the following error in the FibHelper::AddRoute():

msg="Cannot add route: Node# 0 and Node# 2 are not connected", file=../src/ndnSIM/helper/ndn-fib-helper.cpp, line=156

This is because the NetDevice for Node# 0 is not found, which is checked in this line:

>From the log I can see that NetDeviceTransport is created for all the nodes. Can you any one please tell what I am missing here?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20200625/4b815048/attachment-0001.html>

More information about the ndnSIM mailing list