Different WiFi channels for a single WifiPhy object

104 views
Skip to first unread message

Chris Facchini

unread,
Aug 24, 2010, 11:12:14 PM8/24/10
to ns-3-users
Hi,

I was wondering, would it be possible to create two distinct IBSSs,
each of which has a different phy channel?
I have seen that WifiPhy has a method for doing it (SetChannelNumber).
However, correct me if I am wrong, if use two different WifiPhy
objects for the two IBSSs no collisions will happen.

That said, (although I suspect it isn't) is it possible to set two
channel numbers within the same WifiPhy object?
If not, how could I accomplish the same effect?

Thanks,
Chris

Mathieu Lacage

unread,
Aug 25, 2010, 12:18:26 AM8/25/10
to ns-3-...@googlegroups.com
On Tue, Aug 24, 2010 at 23:12, Chris Facchini <c.fac...@gmail.com> wrote:
> I was wondering, would it be possible to create two distinct IBSSs,
> each of which has a different phy channel?

yes.

> I have seen that WifiPhy has a method for doing it (SetChannelNumber).
> However, correct me if I am wrong, if use two different WifiPhy
> objects for the two IBSSs no collisions will happen.
>
> That said, (although I suspect it isn't) is it possible to set two
> channel numbers within the same WifiPhy object?

it is possible but you need to make sure that the senders and
receivers have the same number or the packets will be silently dropped
at the receiver side.

Mathieu
--
Mathieu Lacage <mathieu...@gmail.com>

Chris Facchini

unread,
Aug 25, 2010, 10:01:22 AM8/25/10
to ns-3-users
On Wed, Aug 25, 2010 at 12:18 AM, Mathieu wrote:
> On Tue, Aug 24, 2010 at 23:12, Chris wrote:
>> That said, (although I suspect it isn't) is it possible to set two
>> channel numbers within the same WifiPhy object?
>
> it is possible but you need to make sure that the senders and
> receivers have the same number or the packets will be silently dropped
> at the receiver side.

I am not sure I got the big picture.
Let's assume that all the variables in the example are valid objects
and that the suffixes 1 and 2 refer to each one of the IBSS.
Specifying this:

phy1.Set ("ChannelNumber", UintegerValue (1));
phy2.Set ("ChannelNumber", UintegerValue (1));
NetDeviceContainer wifiDevices1 = wifi1.Install (phy1, mac1,
wifiNodes1);
NetDeviceContainer wifiDevices2 = wifi2.Install (phy2, mac2,
wifiNodes2);

should instantiate two sets of nodes, sharing the same channel.
If that were the case, I would expect that the overall capacity would
be divided.
Instead, the two sets of nodes are able to fully exploit the channel,
as they were alone.

By way of example, I have run a modified version of samples/wireless/
wifi-adhoc.cc in which:
- a first IBSS has two nodes, one fixed, the other moving away;
- a second IBSS has two nodes, both fixed at a random position, that
create interfering traffic.

And here is the throughput achieved by the first IBSS: http://imagebin.org/111282
'Same phy' is the case in which both NetDeviceContainers use the same
phy (e.g. 'phy1').
'Diff phy' is the case in which each NetDeviceContainer use a
different phy (just like the code above).

Am I missing something?

Chris

Mathieu Lacage

unread,
Aug 25, 2010, 10:13:27 AM8/25/10
to ns-3-...@googlegroups.com
On Wed, Aug 25, 2010 at 10:01, Chris Facchini <c.fac...@gmail.com> wrote:
> If that were the case, I would expect that the overall capacity would
> be divided.
> Instead, the two sets of nodes are able to fully exploit the channel,
> as they were alone.

That is because the code does not implement a model for cross-channel
interference. See YansWifiChannel::Send

As usual, patches are welcome :)

Chris Facchini

unread,
Aug 25, 2010, 10:26:20 AM8/25/10
to ns-3-users
On Aug 25, 10:13 am, Mathieu wrote:
> That is because the code does not implement a model for cross-channel
> interference. See YansWifiChannel::Send
There it is! Completely forgot to check YansWifiChannel code. Thanks
for the pointer.

Chris

Chris Facchini

unread,
Aug 25, 2010, 10:56:05 AM8/25/10
to ns-3-users
On Aug 25, 10:13 am, Mathieu wrote:
> As usual, patches are welcome :)

I guess I could open a bug.
Actually, I have no idea whether I'll have time to devote to it in the
future, should I open it anyway?

Chris

Mathieu Lacage

unread,
Aug 25, 2010, 11:03:21 AM8/25/10
to ns-3-...@googlegroups.com
On Wed, Aug 25, 2010 at 10:56, Chris Facchini <c.fac...@gmail.com> wrote:
> I guess I could open a bug.
> Actually, I have no idea whether I'll have time to devote to it in the
> future, should I open it anyway?

In general, the answer is that if there is not one already, yes.

Reply all
Reply to author
Forward
0 new messages