How to simulate multi interface wireless node and changing channels by Omnet++ - omnet++

How to simulate an adhoc network with the following conditions in Omnet++ in IEEE802.11b/g? (omnetpp.ini and NED file are expected)
1-Two wireless nodes (e.g. n1 and n2) having two interfaces with each other(e.g i1 and i2)
2-n1.i1 makes a link to communicate with n2.i1 and also n1.i2 makes a link with n2.i2, n1.i1 means interface i1 of node n1
3-channel 1 are allocated to link n1.i1 and n2.i1 in all simulation runtime
4-channel 2 are allocated to link n1.i2 and n2.i2 in the first second of simulation runtime, then channel 3 in the 2nd second, and so on until 10nd seconds, then repeat this circle.
Thanks in advance

Take a look at examples\adhoc\ieee80211 in INET. It contains simple network for testing the IEEE 802.11 in ad-hoc mode.

Related

Are there practical use cases for one PCIe Physical Function (PF) maps to hundreds or even thousands of Virtual Functions (VF)?

It's known that a single PF can map to multiple VFs.
About the number of VFs associated with a single PF:
In PCIe 5.0 spec:
IMPLEMENTATION NOTE
VFs Spanning Multiple Bus Numbers
As an example, consider an SR-IOV Device that supports a single PF. Initially, only PF 0 is visible. Software Sets ARI Capable Hierarchy. From the SR-IOV Extended Capability it determines: InitialVFs is 600, First VF Offset is 1 and VF Stride is 1.
If software sets NumVFs in the range [0 … 255], then the Device uses a single Bus Number.
If software sets NumVFs in the range [256 … 511], then the Device uses two Bus Numbers.
If software sets NumVFs in the range [512 … 600], then the Device uses three Bus Numbers.
PF 0 and VF 0,1 through VF 0,255 are always on the first (captured) Bus Number. VF 0,256 through VF 0,511 are always on the second Bus Number (captured Bus Number plus 1). VF 0,512 through VF 0,600 are always on the third Bus Number (captured Bus Number plus 2).
From Oracle:
Each SR-IOV device can have a physical function and each physical function can have up to 64,000 virtual functions associated with it.
From the "sharing PCIe I/O bandwidth" point of view, it might be understandable to having hundres or thousands of VFs (associated with a single PF), each VF is assigned to a VM, with the assumption that most of the VFs are in idle state at a particular time point;
However, from the "chip manufacturing" point of view, for a non-trival PCIe function, duplicating hundreds or thousands of the VF part of the IP instances within a single die would make the die area too large to be practical.
So my question is, as stated in the subject line, are there practical use cases for having so many VFs associcated with a single PF?

Allocating different channels to multi-radio interfaces of a wireless node

There are several frequency bands within the radio spectrum that are used for the Wi-Fi and within these, there are many channels that have been designated with numbers so they can be identified.
The table given below provides the frequencies for the total of fourteen 802.11 Wi-Fi channels that are available around the globe.
How to allocate different channels for example 1, 3, 8 to three-radio interfaces of a wireless node as drawn in Figure 2 for node 1?
The Showcases > Wireless > Multiple Wireless Interfaces example is not my answer. (without access point and set channel number to the interface not based on SSID for tuning channel for periods of simulation time is intended. See the second figure)
You can set in omnetpp.ini:
*.host[*].wlan[*].radio.bandwidth = 20MHz
*.host[0].wlan[0].radio.centerFrequency = 2.412GHz # channel no 1
*.host[0].wlan[1].radio.centerFrequency = 2.422GHz # channel no 3
*.host[0].wlan[2].radio.centerFrequency = 2.447GHz # channel no 8
# and so on ...
Reference: Ieee80211Radio.

PWM transistor heating - Rapberry

I have a raspberry and an auxiliary PCB with transistors for driving some LED strips.
The strips datasheets says 12V, 13.3W/m, i'll use 3 strips in parallel, 1.8m each, so 13.3*1.8*3 = 71,82W, with 12 V, almost 6A.
I'm using an 8A transistor, E13007-2.
In the project i have 5 channels of different LEDs: RGB and 2 types of white.
R, G, B, W1 and W2 are directly connected in py pins.
LED strips are connected with 12V and in CN3, CN4 for GND (by the transistor).
Transistor schematic.
I know that that's a lot of current passing through the transistors, but, is there a way to reduce the heating? I think it's getting 70-100°C. I already had a problem with one raspberry, and i think it's getting dangerous for the application. I have some large traces in the PCB, that's not the problem.
Some thoughts:
1 - Resistor driving the base of the transistor. Maybe it won't reduce heating, but i think it's advisable for short circuit protection, how can i calculate this?
2 - The PWM has a frequency of 100Hz, is there any difference if i reduce this frequency?
The BJT transistor you're using has current gain hFE of roughly 20. This means that the collector current is roughly 20 times the base current, or the base current needs to be 1/20 of the collector current, i.e. 6A/20=300mA.
Rasperry PI for sure can't supply 300mA current from the IO pins, so you're operating the transistor in linear region, which causes it to dissipate a lot of heat.
Change your transistors to MOSFETs with low enough threshold voltage (like 2.0V to have enough conduction at 3.3V IO voltage) to keep it simple.
Using a N-Channel MOSFET will run much cooler if you get enough gate voltage to force to completely enhance. Since this is not a high volume item why not simply use a MOSFET gate driver chip. Then you can use a low RDS on device. Another device is the siemons BTS660 (S50085B BTS50085B TO-220). it is a high side driver that you will need to drive with an open collector or drain device. It will switch 5A at room temperature with no heat sink.It is rated for much more current and is available in a To220 type package. It is obsolete but available as is the replacement. MOSFETs are voltage controlled while transistors are current controlled.

Getting a ETA of a packet in Omnet++

I embedded the Omnet++ simulation kernel into my application and I'm using the inet framework for my simulation. The problem I'm having is that I need to estimate at witch time a packet is going to arrive at it's destination.
So more specific: There are two EtherHost, named H0 and H1 (inet.node.ethernet.EtherHost) and one EtherSwitch named switch (inet.node.ethernet.EtherSwitch), the three are connected like this:
H0 <-> C <-> switch <-> C <-> H1
C denotes a DatarateChannel with datarate = 100Mbps and delay = 0.1us. When the EtherAppCli in H0 sends a EtherAppReq to H1, I need to get a ETA on the EterAppReq packet during the transfer of said packet.
My first thought was to always get the encapsulating package of EtherAppReq, wich is added in the EtherLLC and EtherMAC module but this is not as simple as I thought.. I would need to change all the encapsulating functions in all the lower layers to always get a pointer to the encapsulating package, or am I wrong?
Or is there another way to get a ETA of a packet mid-transfer?
Edit: For my purpose I only need the arrival time at the next module, so if the packet is in the mac module of H0 I need the arrival time at the mac layer in the switch (So no multi module hops). Like when you have a cMessage you can call getArrivalTime() on the message and get a estimate of the arrival time if I'm not mistaken.
Thank you very much for the help in advance!
It is impossible to obtain ETA of a packet in advance. The time of packet's arriving depends on many factors (like in real network), for example: current number of packets in host's and switch's queues, processing time in switch, number of CPU of switch, processing time of MAC layer in a host etc. Therefore at the moment of sending a packet neither the host nor simulation environment do not know when this packet arrive a destination host. So we prepare a model and do a simulation in order to measure this time and learn how some factors influence it.
By the way: there is no H1 in your figure.

omnet - Inet - Which factor decides transmission sequence of the nodes

I have a general question regarding the transmission sequence. In INET ->exapmles->manetrouting->dynamicNodeCreation, how does it decide which node should initiate beacon transmission. And how does the next node would be selected to transmit.
I tried to go through the tic-toc example where getIndex() in initialize function is used for the selection of transmitting node (eg txc10.cc). But I haven't figure out such functionality in INET examples.
Is there a way, in which I can select the respective node for beacon transmission as par my beacon occupancy map vector?
Is there a way, in which I can select the resepective node for beacon transmission as par my beacon occupancy map vector.
I beg your forgiveness for not being comprehensive for this problem.
I will take the example of INET ->examples->manetrouting->dynamicNodeCreation to answer my question. When I run this example in omnet the first event after initialize (at run time) is 'beaconTimer' for a fixhost (in my case it is meshtest.fixhost2[4].wlan[0].magmt ) So basically its starting with mgmt submodule. (If you check hierarchy of any single node at run time, it would be :- Delayunit -> wlan0 and in wlan0 its again mgmt->mac->radio. The code for mgmt is written in inet->source->linklayer->ieee80211->mgmt->Ieee80211MgmtAP.cc
Now in the initialize function for this class, there is a code line scheduleAt(simTime()+uniform(0,beaconInterval) , beaconTimer) . Here uniform is a Omnet defined uniform distribution function and gives a random value, beaconInterval is the time after which next super frame will start and beaconTimer is a message. This function schedule a random time for sending beacons for all nodes (respectively by their own mgmt module). So whichever device got the lowest value by this uniform function, will start beacon sending. Other devices should follow accordingly.
Now if I want to send beacons in prescheduled manner then I would change in handleTimer function in the same module as it provides the scheduleAt() function for next event.

Resources