Hello everyone,
I am trying to simulate tcp traffic from two APs to two different nodes.
I am using wifi-spatial-reuse.cc , but with changes to tcp application from udp. It builds successfully but the throughput is 0 on both BSS.
I someone could give me some hints what I am doing wrong I would be very grateful.
Part of the code where application is installed:
//BSS 1
uint16_t port = 50000;
Address apLocalAddressA (InetSocketAddress (Ipv4Address::GetAny (), port));
PacketSinkHelper packetSinkHelperA ("ns3::TcpSocketFactory", apLocalAddressA);
ApplicationContainer sinkAppA = packetSinkHelperA.Install (wifiApNodes.Get (0));
sinkAppA.Start (Seconds (0.0));
sinkAppA.Stop (Seconds (duration + 1));
OnOffHelper onoffA ("ns3::TcpSocketFactory",Ipv4Address::GetAny ());
onoffA.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
onoffA.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
onoffA.SetAttribute ("PacketSize", UintegerValue (payloadSize));
onoffA.SetAttribute ("DataRate", DataRateValue (54000000)); //bit/s
AddressValue remoteAddressA (InetSocketAddress (ApInterfaceA.GetAddress (0), port));
onoffA.SetAttribute ("Remote", remoteAddressA);
ApplicationContainer appsA;
appsA.Add (onoffA.Install (wifiStaNodes.Get (0)));
appsA.Start (Seconds (1.0));
appsA.Stop (Seconds (duration + 1));
// BSS 2
uint16_t portB (port);
Address apLocalAddress (InetSocketAddress (Ipv4Address::GetAny (), portB));
PacketSinkHelper packetSinkHelper ("ns3::TcpSocketFactory", apLocalAddress);
ApplicationContainer sinkAppB = packetSinkHelper.Install (wifiApNodes.Get (1));
sinkAppB.Start (Seconds (0.0));
sinkAppB.Stop (Seconds (duration + 1));
OnOffHelper onoff ("ns3::TcpSocketFactory",Ipv4Address::GetAny ());
onoff.SetAttribute ("OnTime", StringValue ("ns3::ConstantRandomVariable[Constant=1]"));
onoff.SetAttribute ("OffTime", StringValue ("ns3::ConstantRandomVariable[Constant=0]"));
onoff.SetAttribute ("PacketSize", UintegerValue (payloadSize));
onoff.SetAttribute ("DataRate", DataRateValue (54000000)); //bit/s
AddressValue remoteAddress (InetSocketAddress (ApInterfaceB.GetAddress (0), portB));
onoff.SetAttribute ("Remote", remoteAddress);
ApplicationContainer appsB;
appsB.Add (onoff.Install (wifiStaNodes.Get (1)));
appsB.Start (Seconds (1.0));
appsB.Stop (Seconds (duration + 1));