diff --git a/examples/wimax/wimax-ipv4.cc b/examples/wimax/wimax-ipv4.cc index 0e1c9af4f..063e9f208 100644 --- a/examples/wimax/wimax-ipv4.cc +++ b/examples/wimax/wimax-ipv4.cc @@ -67,7 +67,7 @@ using namespace ns3; int main (int argc, char *argv[]) { // default values - int nbSS = 4, duration = 2, schedType = 0; + int nbSS = 4, duration = 7, schedType = 0; bool verbose = false; WimaxHelper::SchedulerType scheduler = WimaxHelper::SCHED_TYPE_SIMPLE; LogComponentEnable ("UdpClient", LOG_LEVEL_INFO); @@ -151,7 +151,7 @@ int main (int argc, char *argv[]) // set server port to 100+(i*10) udpServer[i] = UdpServerHelper (100 + (i * 10)); serverApps[i] = udpServer[i].Install (ssNodes.Get (i)); - serverApps[i].Start (Seconds (1)); + serverApps[i].Start (Seconds (6)); serverApps[i].Stop (Seconds (duration)); udpClient[i] = UdpClientHelper (SSinterfaces.GetAddress (i), 100 + (i * 10)); @@ -160,7 +160,7 @@ int main (int argc, char *argv[]) udpClient[i].SetAttribute ("PacketSize", UintegerValue (800)); clientApps[i] = udpClient[i].Install (ssNodes.Get (i + (nbSS / 2))); - clientApps[i].Start (Seconds (1)); + clientApps[i].Start (Seconds (6)); clientApps[i].Stop (Seconds (duration)); } diff --git a/examples/wimax/wimax-multicast.cc b/examples/wimax/wimax-multicast.cc index 3074ded7c..471c79f39 100644 --- a/examples/wimax/wimax-multicast.cc +++ b/examples/wimax/wimax-multicast.cc @@ -98,7 +98,7 @@ int main (int argc, char *argv[]) Ptr SSPosAllocator[MAXSS]; // default values - int nbSS = 10, duration = 2, schedType = 0; + int nbSS = 10, duration = 7, schedType = 0; WimaxHelper::SchedulerType scheduler = WimaxHelper::SCHED_TYPE_SIMPLE; CommandLine cmd; @@ -266,14 +266,14 @@ int main (int argc, char *argv[]) { udpServer[i] = UdpServerHelper (multicast_port); serverApps[i] = udpServer[i].Install (ssNodes.Get (i)); - serverApps[i].Start (Seconds (1)); + serverApps[i].Start (Seconds (6)); serverApps[i].Stop (Seconds (duration)); } udpClient = UdpTraceClientHelper (multicastGroup, multicast_port, ""); clientApps = udpClient.Install (Streamer_Node.Get (0)); - clientApps.Start (Seconds (1)); + clientApps.Start (Seconds (6)); clientApps.Stop (Seconds (duration)); IpcsClassifierRecord MulticastClassifier (Ipv4Address ("0.0.0.0"), diff --git a/examples/wimax/wimax-simple.cc b/examples/wimax/wimax-simple.cc index 2d941190f..6fc3fb748 100644 --- a/examples/wimax/wimax-simple.cc +++ b/examples/wimax/wimax-simple.cc @@ -61,7 +61,7 @@ int main (int argc, char *argv[]) { bool verbose = false; - int duration = 2, schedType = 0; + int duration = 7, schedType = 0; WimaxHelper::SchedulerType scheduler = WimaxHelper::SCHED_TYPE_SIMPLE; CommandLine cmd; @@ -140,7 +140,7 @@ int main (int argc, char *argv[]) udpServer = UdpServerHelper (100); serverApps = udpServer.Install (ssNodes.Get (0)); - serverApps.Start (Seconds (1)); + serverApps.Start (Seconds (6)); serverApps.Stop (Seconds (duration)); udpClient = UdpClientHelper (SSinterfaces.GetAddress (0), 100); @@ -149,7 +149,7 @@ int main (int argc, char *argv[]) udpClient.SetAttribute ("PacketSize", UintegerValue (1024)); clientApps = udpClient.Install (ssNodes.Get (1)); - clientApps.Start (Seconds (1)); + clientApps.Start (Seconds (6)); clientApps.Stop (Seconds (duration)); Simulator::Stop (Seconds (duration + 0.1)); diff --git a/src/devices/wimax/bs-link-manager.cc b/src/devices/wimax/bs-link-manager.cc index 258a6952c..24d917d5d 100644 --- a/src/devices/wimax/bs-link-manager.cc +++ b/src/devices/wimax/bs-link-manager.cc @@ -321,8 +321,11 @@ BSLinkManager::DeallocateCids (Cid cid) uint64_t BSLinkManager::SelectDlChannel (void) { - // temporarily set to 1 for quick scanning - return m_bs->GetChannel (1); + // Values according to WirelessMAN-OFDM RF profile for 10 MHz channelization + // Section 12.3.3.1 from IEEE 802.16-2004 standard + // profR10_3 : + // channels: 5000 + n ⋅ 5 MHz, ∀n ∈ { 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167 } + return m_bs->GetChannel (147); } bool diff --git a/src/devices/wimax/ss-link-manager.cc b/src/devices/wimax/ss-link-manager.cc index a2fed03e5..e0ac6e9af 100644 --- a/src/devices/wimax/ss-link-manager.cc +++ b/src/devices/wimax/ss-link-manager.cc @@ -138,6 +138,12 @@ SSLinkManager::StartScanning ( m_dlChnlNr++; } + // using max number of channel according to according to Section 8.5.1 of IEEE 802.16-2004 standard. + if (m_dlChnlNr >= 200) + { + m_dlChnlNr = 0; + } + uint64_t dlChannel = m_ss->GetChannel (m_dlChnlNr); m_ss->SetState (SubscriberStationNetDevice::SS_STATE_SCANNING); diff --git a/src/devices/wimax/wimax-net-device.cc b/src/devices/wimax/wimax-net-device.cc index 75fc402e5..082069b1e 100644 --- a/src/devices/wimax/wimax-net-device.cc +++ b/src/devices/wimax/wimax-net-device.cc @@ -581,13 +581,19 @@ WimaxNetDevice::ForwardDown (Ptr burst, WimaxPhy::ModulationType mo void WimaxNetDevice::InitializeChannels (void) { - // initializing arbitrary vector of channels (or frequencies) - uint64_t frequency = 2000; - for (uint8_t i = 0; i < 20; i++) + // initializing vector of channels (or frequencies) + // Values according to WirelessMAN-OFDM RF profile for 10 MHz channelization + // Section 12.3.3.1 from IEEE 802.16-2004 standard + // profR10_3 : + // channels: 5000 + n ⋅ 5 MHz, ∀n ∈ { 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167 } + // from a range 5GHz to 6GHz, according to Section 8.5.1. + uint64_t frequency = 5000; + + for (uint8_t i = 0; i < 200; i++) { m_dlChannels.push_back (frequency); - frequency += 40; + frequency += 5; } } diff --git a/src/devices/wimax/wimax-phy.cc b/src/devices/wimax/wimax-phy.cc index ccb3c1731..23093f0a6 100644 --- a/src/devices/wimax/wimax-phy.cc +++ b/src/devices/wimax/wimax-phy.cc @@ -60,7 +60,7 @@ TypeId WimaxPhy::GetTypeId (void) .AddAttribute ("Bandwidth", "The channel bandwidth in Hz.", - UintegerValue (20000000), + UintegerValue (10000000), MakeUintegerAccessor (&WimaxPhy::SetChannelBandwidth, &WimaxPhy::GetChannelBandwidth), MakeUintegerChecker (5000000, 30000000)) @@ -73,7 +73,7 @@ WimaxPhy::WimaxPhy (void) m_nrCarriers (0), m_frameDuration (Seconds (0.01)), m_frequency (5000000), - m_channelBandwidth (20000000), + m_channelBandwidth (10000000), m_psDuration (Seconds (0)), m_symbolDuration (Seconds (0)), m_psPerSymbol (0),