Its for learning purpose.
Dear Arafat Habib
see these codes
Example Script for Simulation Configuration
1. Configuration of PHY and channel
// *************************************** PHY and Channel ***************************************** //
YansWifiPhyHelper wifiPhy = YansWifiPhyHelper::Default ();
// set it to zero; otherwise, gain will be added
wifiPhy.Set ("RxGain", DoubleValue (0));
wifiPhy.Set ("CcaMode1Threshold", DoubleValue (0.0));
// ns-3 supports RadioTap and Prism tracing extensions for 802.11b
wifiPhy.SetPcapDataLinkType (YansWifiPhyHelper::DLT_IEEE802_11_RADIO);
YansWifiChannelHelper wifiChannel;
wifiChannel.SetPropagationDelay ("ns3::ConstantSpeedPropagationDelayModel");
wifiChannel.AddPropagationLoss ("ns3::LogDistancePropagationLossModel");
wifiPhy.SetChannel (wifiChannel.Create ());
// ************************************************************************************************* //
2. Configuration of MAC
// **************************************** MAC **************************************************** //
// Add a non-QoS upper mac, and disable rate control
NqosWifiMacHelper wifiMac = NqosWifiMacHelper::Default ();
wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
"DataMode",StringValue (phyMode),
"ControlMode",StringValue (phyMode));
// Set it to adhoc mode
wifiMac.SetType ("ns3::AdhocWifiMac");
3. Configuration of NetDevice
// ***************************************** Net Devices ******************************************* //
NetDeviceContainer devices = wifi.Install (wifiPhy, wifiMac, c.Get (0), 5);
devices.Add (wifi.Install (wifiPhy, wifiMac, c.Get(3), 1));
// This will disable these sending devices from detecting a signal
// so that they do not backoff
wifiPhy.Set ("EnergyDetectionThreshold", DoubleValue (0.0) );
wifiPhy.Set ("TxGain", DoubleValue (offset + Prss) );
devices.Add (wifi.Install (wifiPhy, wifiMac, c.Get (1), 5));
wifiPhy.Set ("TxGain", DoubleValue (offset + Irss) );
devices.Add (wifi.Install (wifiPhy, wifiMac, c.Get (2), 1));
4. Configuration of Network Topology
// **************************************** Mobility *********************************************** //
// Note that with FixedRssLossModel, the positions below are not
// used for received signal strength.
MobilityHelper mobility;
Ptr positionAlloc = CreateObject ();
positionAlloc->Add (Vector (0.0, 0.0, 0.0));
positionAlloc->Add (Vector (distanceToRx, 0.0, 0.0));
positionAlloc->Add (Vector (0, -distanceToRx, 0.0));
positionAlloc->Add(Vector (distanceToRx, -distanceToRx, 0.0));
mobility.SetPositionAllocator (positionAlloc);
mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
mobility.Install (c);
Best Regards
Thanks a lot sir for your answer. You are so kind.
Hi you can take a look in this link good luck
http://slogix.in/cognitive-radio-networks-source-code
The packet delivery ratio is the ratio of the number of packets successfully received to the number of total packets sent. Because some packets may get lost among transmissions, what kind of...
03 April 2018 7,835 13 View
While installing NS3, at build stage I got the error given in the following image. I will be really thankful if any of you can help me with this.
10 November 2017 4,052 0 View
I believe I should cite papers that I have actually read and is relevant and related to my work.
04 May 2017 5,126 10 View
Hi there. I am a young researcher and I have few conference papers. I am currently working hard and would love to get published in IEEE Transactions. Am I dreaming big? I have read many of the...
03 April 2017 2,902 2 View
Want to know this eagerly.
01 February 2017 1,199 6 View
Hello everyone. I am quite new in research field and confused about one issue. Opinion from the experts will help me remove the confusion. I am looking for an answer whether it would be ethical to...
11 December 2016 3,627 2 View
I am quite new in this field and please pardon me if there is any conceptual mistake in the question.
10 November 2016 1,363 8 View
09 October 2016 7,554 0 View
I'm targeting to deploy a mesh network and manually configure MANET routing protocols. I'm preparing scenarios, architectures, and hard devices needed to do that. Are there some step-by-step...
03 March 2021 1,931 5 View
I have tried to download the 64-bit version of MGLtools however, as many times as I have downloaded and uninstall the programs, an error arises that the app needs to be updated. Thank you.
03 March 2021 5,997 2 View
Question to you and THEM, the New Journal, "Integrative Psychological and Behavioral Science" -- do you not know, and have you not seen, this done before? There appears to be a core problem for...
02 March 2021 3,024 2 View
Hi Community, I'm facing the issue of integration/compiling a new routing protocol in a WSN simulator. The final goal is to successfully add, configure this routing protocol in hardware devices...
01 March 2021 9,332 6 View
Dear Researchers I am trying to perform a PIL simulation using STM32F4 Discovery board and comunication serial USB TO TTL. During simulation I receive the following timeout error: An error...
01 March 2021 2,327 1 View
Hi everyone, I would like to ask how I can download BibExcel software for MacOs? There are some links which are supported by Windows but I could not find it for Mac. or is there any other software...
01 March 2021 652 1 View
Hello researchers, Hello Castalia3.2 researchers I am a beginner with Castalia, I work on optimization of RFID systems used in wireless body networks. I simulated a WBAN with 10 nodes and one...
28 February 2021 400 1 View
Does data from contact tracing help in establishing patterns of behavior and social interactions that lead to infections? There are cases here in the Philippines where patients have no travel...
25 February 2021 9,002 13 View
Dear colleagues, Do you think there is cognitive oversaturation in the current pandemic? What impact can this have? And other manifestations? The question is mainly aimed at adolescents (pupils,...
23 February 2021 7,796 4 View
I am currently working on gene clustering based on co-expression pattern in mouse brain. The problem is I do not have some solid way to test my result. Are there any suggestions for databases...
22 February 2021 4,374 3 View