[Question] About Wifi Module and events

73 views
Skip to first unread message

Giancarlo Murillo

unread,
May 19, 2015, 5:09:53 PM5/19/15
to ns-3-...@googlegroups.com
Good day experts

I have a problem about using the Wifi Module and the Simulation Event.

I have studied third.cc, and i have studied how Event works (Kinda).

Let me explain my topology first

Basically m putting a bunch of nodes (UE nodes) attached automatically to a eNodeB, also i want to add Wifi capability to the UE, so, what i want to do, more specifically using this topology

               *-----------LTE-----------eNB
             UE1                          -----
                            --LTE------
               *---------
             UE2

 Do this after meeting some requirements

              *-----------LTE-----------eNB
             UE1                         - -
               !                         ---
              WiFi               ----      
               |          --LTE-
               *---------
             UE2
           
Being UE1 the AP and UE2 the STAclients, what i was thinking to do is this.

using the schedule at 0.5 Seconds and call a funcion (ex. DistanceBetweenUE)
if two nodes are near each other create the channel, phy, and mac

  YansWifiChannelHelper channel = YansWifiChannelHelper::Default ();
  YansWifiPhyHelper phy = YansWifiPhyHelper::Default ();
  phy.SetChannel (channel.Create ());

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

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

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

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

Ill generate the SSID string by the ramdom generator, but my real problem is this

  1. The UE's needs to have the NetDeviceContainer (Wifi) already installed, but since i need to generate the mac to do this. Can i install the netdevice in a external function?
  2. If it is imposible, is there any way to implement this.
  3. If there is a way, can the Wifi model suppor password keys? , there is no information  here https://www.nsnam.org/docs/models/html/wifi.html
I want to add this to my code attached





beta.cc

Tommaso Pecorella

unread,
May 20, 2015, 1:59:09 PM5/20/15
to ns-3-...@googlegroups.com
Hi,

short answers (not much time today).

No, you can't create at run-rime (after Simulation::Run()) a NetDevice or a MAC. You have to create them beforehand.
Yes, there is a workaround (use Ipv4Interface::SetDown()). A better solution is planned to be included in ns-3 future releases.
No, you can't have passwords in Wifi model.

Last thing (even if you didn't ask). Your design is flawed. The nodes have to be in AdHoc mode, as there's no AP.

Have fun,

T.
Reply all
Reply to author
Forward
0 new messages