Hello,
I am using the following add-on with ns2 to be able to simulate cognitive radio networks.
http://www.ece.mtu.edu/~ljialian/
While looking on the net, I also found this article which explains how to send Hello packets on multiple interfaces using the above mentioned simulator.
A Tutorial on Broadcasting Packets over Multiple-Channels in a Multi-Inferface Network Setting in NS-2
However, the project that I am working on asks for the mobile node to switch between channels, and not interfaces.
In addition to the code that the above article gives, here is what I am attempting to do:
if(nIfaces) //nIfaces is the number of interfaces on each radio
{
for(int i=0; i<nIfaces; i++)
{
Packet *p = p->copy();
struct hdr_cmn *ch_copy = HDR_CMN(p_copy);
for(int j=0; j<wcett_total_channels; j++) // wcett_total_channels is a global variable that contains the total number of channels
{
ch_copy->channelindex_ = j;
cout << "sendHello from node " << index << "On channel " << j << " on interface " << i << endl;
Scheduler::instance().schedule(targetlist[i], p_copy, 0.0);
}
}
}
However, this does not seem to work!
Any pointers to this will be appreciated!
Cheers
protti1