Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bandwidth in (inet::physicallayer::Ieee80211Radio) different from bandwidth in (inet::physicallayer::WirelessSignal). Why? #927

Open
arahman33 opened this issue Nov 13, 2023 · 8 comments
Assignees
Labels

Comments

@arahman33
Copy link

arahman33 commented Nov 13, 2023

I am trying to understand the different opModes of Ieee80211 in Ieee80211ModeSet.cc. I have the following setup in my .ini file

**.opMode = "n(mixed-2.4Ghz)"
**.bandName = "5 GHz (40 MHz)"
**.bandwidth = 40MHz

For this, I can see during the initializations that the bandwidth is set as I wanted. (text in bold)

INFO: Initialized (inet::physicallayer::Ieee80211Radio)radio id=1317, antenna = { IsotropicAntenna }, transmitter = { Ieee80211ScalarTransmitter, modeSet = { Ieee80211ModeSet, name = n(mixed-2.4Ghz) }, band = { Ieee80211Band, name = 5 GHz (40 MHz) }, mode = { object@0x28978aaf308 }, channel = { Ieee80211Channel, band = { Ieee80211Band, name = 5 GHz (40 MHz) }, channelNumber = 0 }, preambleDuration = -1, headerLength = 24 B, bitrate = -1 bps, codeRate = 1, power = 2.5 mW, modulation = { BpskModulation }, centerFrequency = 5.02 GHz, bandwidth = 40 MHz }, receiver = { Ieee80211ScalarReceiver, modeSet = { Ieee80211ModeSet, name = n(mixed-2.4Ghz) }, band = { Ieee80211Band, name = 5 GHz (40 MHz) }, channel = { Ieee80211Channel, band = { Ieee80211Band, name = 5 GHz (40 MHz) }, channelNumber = 0 }, errorModel = { Ieee80211NistErrorModel }, energyDetection = 3.16228 pW, sensitivity = 3.16228 pW, modulation = { BpskModulation }, centerFrequency = 5.02 GHz, bandwidth = 40 MHz, snirThreshold = 2.51189 }

But as the emulation takes place I can see that the bandwidth in WIRELESS SIGNAL changes as the following:

INFO: Transmission started: (inet::physicallayer::WirelessSignal)IABData2-0 (80 us 355 B) (inet::Packet)IABData2-0 (355 B) (inet::SequenceChunk) length = 355 B WHOLE as Ieee80211ScalarTransmission, mode = { object@0x28978aaca18 }, channel = { Ieee80211Channel, channelNumber = 0 }, power = 2.2 mW, bitrate = 65 Mbps, headerLength = 6 B, dataLength = 2814 b, centerFrequency = 5.02 GHz, bandwidth = 20 MHz, modulation = { Ieee80211OfdmModulation }, id = 15, transmitterId = 16, startTime = 0.250056114244, endTime = 0.250136114244, preambleDuration = 0.000036, headerDuration = 0.000008, dataDuration = 0.000036, startPosition = (76.75, 145.695, 0) m, endPosition = (76.75, 145.695, 0) m, startOrientation = (1, 0, 0, 0), endOrientation = (1, 0, 0, 0)

I am not sure why this is happening and what is the physical meaning. From Ieee80211ModeSet.cc I saw that opModes n and ac have bandwidth 20, 40.. 160MHz. How can I get the modes operate in with those bandwidths?

I've updated the post from opMode "p" to "n(mixed-2.4Ghz).

@sadman-siraj
Copy link

I am facing a similar issue on my end with the defining the bandwidth. Did you find any solution regarding this?

@arahman33
Copy link
Author

@sadman-siraj No I haven't figured it out yet.

@ZoltanBojthe, @levy can you please help us out on this matter?

@levy
Copy link
Contributor

levy commented Nov 23, 2023

I think the bandwidth parameter is inherited from a base module and it is misleading because it gives you the impression that you can directly control the bandwidth of the signal. In 802.11, the bandwidth of the signal is determined by the mode selected by the MAC. If you dig deep into the 802.11 mode sets, you will see the individual modes have their own bandwidth parameters. For example, see the Ieee80211OfdmCompliantModes, the Ieee80211HtmcsTable class, etc.

@levy levy self-assigned this Nov 24, 2023
@levy levy added the Bug label Nov 24, 2023
@arahman33
Copy link
Author

arahman33 commented Nov 27, 2023

@levy where can I find the tables you have mentioned? I looked through the github repo but couldn't find it. I also looked through the file directories of inet4.5 but still couldn't find it. Is it the one in Ieee80211ModeSet.cc? Thanks in advance.

@levy
Copy link
Contributor

levy commented Nov 28, 2023

Try searching for those class names in the src folder using the rg Ieee80211OfdmCompliantModes and rg Ieee80211HtmcsTable.

@aarizaq
Copy link
Contributor

aarizaq commented Dec 4, 2023

This is a quite old problem, I have suffered it about more of 2 years ago.
I solved this problem with this:
temp.patch.txt

@arahman33
Copy link
Author

@aarizaq thanks for your reply. Can you walk me through the process? Where should I add the piece of code you have provided?

@aarizaq
Copy link
Contributor

aarizaq commented Dec 20, 2023

You can add it or you can use inetmanet,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants