Skip to first unread message

IA Ob.

unread,
Jun 30, 2015, 9:21:18 AM6/30/15
to ns-3-...@googlegroups.com
hello,

i am currently trying to develop a WiMAX framework in away that i have multiple Subscriber Station (SS>=1) consider this as multiple sensors streaming data to be processed in a proxy station, now in this framework the proxy is connected to the Base Station using fiber optics (i.e. not a bottleneck) so my application would look like it is located in the BS.
my question, can i add application to the BS or not??.
i tried the following but the system only runs for 6 sec and then it stops sending packet and some times it triggers some errors, i'd really want to know what is going wrong?
now that i am new to WiMAX.

int main (int argc, char *argv[])
{
  bool verbose = false;
  uint16_t nbSS = 20;

  int duration = 30, schedType = 0;
  WimaxHelper::SchedulerType scheduler = WimaxHelper::SCHED_TYPE_SIMPLE;

  CommandLine cmd;
  cmd.AddValue ("scheduler", "type of scheduler to use with the network devices", schedType);
  cmd.AddValue ("duration", "duration of the simulation in seconds", duration);
  cmd.AddValue ("verbose", "turn on all WimaxNetDevice log components", verbose);
  cmd.Parse (argc, argv);

  switch (schedType)
    {
    case 0:
      scheduler = WimaxHelper::SCHED_TYPE_SIMPLE;
      break;
    case 1:
      scheduler = WimaxHelper::SCHED_TYPE_MBQOS;
      break;
    case 2:
      scheduler = WimaxHelper::SCHED_TYPE_RTPS;
      break;
    default:
      scheduler = WimaxHelper::SCHED_TYPE_SIMPLE;
    }

  NodeContainer ssNodes;
  NodeContainer bsNodes;

  ssNodes.Create (nbSS);
  bsNodes.Create (1);

  WimaxHelper wimax;

  NetDeviceContainer ssDevs, bsDevs;

  ssDevs = wimax.Install (ssNodes,
                          WimaxHelper::DEVICE_TYPE_SUBSCRIBER_STATION,
                          WimaxHelper::SIMPLE_PHY_TYPE_OFDM,
                          scheduler);
  bsDevs = wimax.Install (bsNodes, WimaxHelper::DEVICE_TYPE_BASE_STATION, WimaxHelper::SIMPLE_PHY_TYPE_OFDM, scheduler);

  Ptr<SubscriberStationNetDevice>* ss = new Ptr<SubscriberStationNetDevice>[nbSS];
  for (int i = 0; i < ssNodes.GetN(); i++)
    {
      ss[i] = ssDevs.Get (i)->GetObject<SubscriberStationNetDevice> ();
      ss[i]->SetModulationType (WimaxPhy::MODULATION_TYPE_QAM16_12);
    }

  Ptr<BaseStationNetDevice> bs;

  bs = bsDevs.Get (0)->GetObject<BaseStationNetDevice> ();

  InternetStackHelper stack;
  stack.Install (bsNodes);
  stack.Install (ssNodes);

  Ipv4AddressHelper address;
  address.SetBase ("10.1.1.0", "255.255.255.0");

  Ipv4InterfaceContainer BSinterface = address.Assign (bsDevs);
  Ipv4InterfaceContainer SSinterfaces = address.Assign (ssDevs);

  if (verbose)
    {
      wimax.EnableLogComponents ();  // Turn on all wimax logging
    }

  //Application
  LogComponentEnable ("UdpClient", LOG_LEVEL_INFO);
  LogComponentEnable ("UdpServer", LOG_LEVEL_INFO);
  UdpServerHelper udpServer;
  ApplicationContainer serverApps;
  UdpClientHelper udpClient;
  ApplicationContainer clientApps;

  udpServer = UdpServerHelper (100);

  serverApps = udpServer.Install (bsNodes.Get (0));
  serverApps.Start (Seconds (1));
  serverApps.Stop (Seconds (duration));

  udpClient = UdpClientHelper (BSinterface.GetAddress (0), 100);
  udpClient.SetAttribute ("MaxPackets", UintegerValue (500000));
  udpClient.SetAttribute ("Interval", TimeValue (Seconds (0.01)));
  udpClient.SetAttribute ("PacketSize", UintegerValue (1024));

  clientApps = udpClient.Install (ssNodes);
  clientApps.Start (Seconds (2));
  clientApps.Stop (Seconds (duration));

  Simulator::Stop (Seconds (duration + 0.1));

  for (int i = 0; i < ssNodes.GetN(); i++)
    {
      IpcsClassifierRecord DlClassifierUgs (Ipv4Address ("0.0.0.0"),
                                           Ipv4Mask ("0.0.0.0"),
                                           BSinterface.GetAddress (i),
                                           Ipv4Mask ("255.255.255.255"),
                                           0,
                                           65000,
                                           100 + (i * 10),
                                           100 + (i * 10),
                                           17,
                                           1);
      ServiceFlow DlServiceFlowUgs = wimax.CreateServiceFlow (ServiceFlow::SF_DIRECTION_DOWN,
                                                             ServiceFlow::SF_TYPE_RTPS,
                                                             DlClassifierUgs);
      ss[i]->AddServiceFlow (DlServiceFlowUgs);
      IpcsClassifierRecord UlClassifierUgs (SSinterfaces.GetAddress (i),
                                           Ipv4Mask ("255.255.255.255"),
                                           Ipv4Address ("0.0.0.0"),
                                           Ipv4Mask ("0.0.0.0"),
                                           0,
                                           65000,
                                           100 + (i * 10),
                                           100 + (i * 10),
                                           17,
                                           1);
      ServiceFlow UlServiceFlowUgs = wimax.CreateServiceFlow (ServiceFlow::SF_DIRECTION_UP,
                                                             ServiceFlow::SF_TYPE_RTPS,
                                                             UlClassifierUgs);
      ss[i]->AddServiceFlow (UlServiceFlowUgs);
    }

  NS_LOG_INFO ("Starting simulation.....");
  Simulator::Run ();

  for (int i = 0; i < ssNodes.GetN(); i++)
    {
      ss[i] = 0;
    }
  delete[] ss;
 
  bs = 0;

  Simulator::Destroy ();
  NS_LOG_INFO ("Done.");

  return 0;
}


Best Regards

Tommaso Pecorella

unread,
Jul 2, 2015, 11:33:13 AM7/2/15
to ns-3-...@googlegroups.com
Hi,

theoretically what you are trying to do is possible. However, we can not check what's going on because the script is not complete (e.g., missing includes). The next time describe more precisely the errors you get and attach the script file (do not copy-paste the source).
As a general remark, WiMAX is dead like a parrot (I don't think there are vendors out there selling WiMAX radio chipsets). However, this is a more general point.

Have fun,

T.


On Tuesday, June 30, 2015 at 3:21:18 PM UTC+2, IA Ob. wrote:
hello,

i am currently trying to develop a WiMAX framework in away that i have multiple Subscriber Station (SS>=1) consider this as multiple sensors streaming data to be processed in a proxy station, now in this framework the proxy is connected to the Base Station using fiber optics (i.e. not a bottleneck) so my application would look like it is located in the BS.
my question, can i add application to the BS or not??.
i tried the following but the system only runs for 6 sec and then it stops sending packet and some times it triggers some errors, i'd really want to know what is going wrong?
now that i am new to WiMAX.

...

Best Regards

IA Ob.

unread,
Jul 2, 2015, 5:55:23 PM7/2/15
to ns-3-...@googlegroups.com
Hi T,
thanks for replying. in here i attached the script file and a snapshot of the error triggered.
i'd really appreciate it if you tell me what's going wrong?
thanks again for help.
Regards.
sur_wimax.cc
Screenshot from 2015-07-03 00:32:49.png

Tommaso Pecorella

unread,
Jul 3, 2015, 11:48:23 AM7/3/15
to ns-3-...@googlegroups.com
Hi,

unfortunately my system is experiencing some problems (it seems that an upgrade did disable my debugger). Shortly put, I can't debug and check what's going on.
I'd suggest to use a debugger (on Linux it works) to find out what is the problem. You should also check the open WiMAX module bugs and see if you are affected by an already-known bug. In case write a note on bugzilla.
If you believe you found a different bug, feel free to open a new bug on Bugzilla and attach the offending script.

Thanks and sorry if I can't help more.

T.

Tommaso Pecorella

unread,
Jul 3, 2015, 11:50:57 AM7/3/15
to ns-3-...@googlegroups.com
Correction...


The solution is simple: reduce the distance between the SS and the BS (or make sure that the SS doesn't go out of reach from the BS).

Have fun,

T.
Reply all
Reply to author
Forward
0 new messages