Development and Simulation Two Wireless Hosts Communication Network Using Omnnet++

A wireless network is a collection of computers and other electronic devices that exchange information by means of radio waves. Endpoint computing devices can all be connected without the need for hardwired data cabling thanks to the prevalence of wireless networks in today's businesses and networks. This paper's aim is to create and construct a wireless network model for connecting two hosts which will be implemented to simulate wireless communications. The sending of User Datagram Protocol (UPD) data by one of the hosts to the other one has been wirelessly specified by the simulator. Additionally, the protocol models were kept as simple as possible including both the physical layer and the lower layer. The architecture and functionality of a new simulator is showed its ability to solve the issues of making a host move, especially, when it gets out of the range the simulation ends.


Introduction
To transmit data or work collaboratively between equipment without wires, wireless networking is implemented for allowing the use wireless signals including radio or infrared frequency.The proliferation of wirelessly connected mobile devices has increased the value of wireless networks.Wireless networks are also widely applied in wireless sensor networks that are groups of autonomous, location-distributed sensors which monitor environmental or physical parameters.In addition, the technical and industrial communities in the field of wireless communication are currently conducting extensive research into a promising area of wireless network [1].The framework can facilitate connectivity sharing among wirelessly mobile and cooperative hosts.Hosts that have a wireless internet connectivity and a second link to a different network (a "dual homer") can operate as "temporal gateways" sharing their second connection to the internet with other hosts in the group.This system offers load-balance traffic over many gateways with simultaneously improving accessibility and service levels [2].Wireless networks are thought to be more prone to errors than wired networks.Because of this dissimilarity, researchers have been pushed to develop new sets of protocols tailored to wireless networks.While much is known about the nature of errors in wired networks, for wireless LANs there is significantly less experimental data.In many scenarios, wireless network physical layer error rates are on par with those of cable connections [3].The achievement of a building project can hinge on the efficiency of transmitting data between the plant and the decision-making agency.It enables decision-makers stationed elsewhere to keep tabs on things from a far via centralized data storage and a network of remotely positioned sensors.Deploying high-bandwidth, flexible data communication networks like wired LANs can be time-consuming and expensive in construction projects M. Derbali 2 that are situated in remote, underdeveloped areas without ready access to a reliable network.Hence, wireless networking has the potential to provide a secure connection between the construction plant and the decision-making agency [4].With the help of a hybrid approach using wireless network connectivity and edge computing methods, it is possible to collect data on the bodybuilding activities of aerobics athletes [5].Wireless networks, such as GSM or IEEE 802.11, have recently attracted the attention of the industrial sector due to their many advantages, including low cost, rapid implementation, and the potential for the creation of novel applications.When operating in potentially dangerous and noisy locations, wireless networks must meet a long list of requirements, including adaptability, mobility, data integrity, protection to interference, privacy, and many more [6].However, the functionality of wireless systems must be tested whenever new design are created.Unfortunately, real hardware is quite costly to test, testing circumstances are rarely consistent, and experiment monitoring is challenging.Since this is the case, it is not recommended to conduct tests on actual testbeds.In this paper, a network simulator that contains two hosts are created where one host sending a data stream wirelessly to the other.The aim is to keep the physical layer and lower layer protocol models as simple as possible.Also making a host move and when it gets out of range the simulation ends.The contribution of the study architecture and functionality of a new simulator is showed its ability to solve the issues of making a host move, especially, when it gets out of the range the simulation ends.The rest of the paper is organized as follows.In section 2 the related work.In section 3 discuss the methodology, the components of creating the network based on INET 4 library is presented.In section 4, the configurations for each object in the network using Omnet++ is introduced.In section 5, the discussion of building the two-hosts wireless Network is presented.The conclusions of this study are discussed in section 6.

Related Work
This is the body text with indent.This is the body text with indent.This is the body text with indent.This is the body text with indent.This is the body text with indent.This is the body text with indent.This is the body text with indent.This is the body text with indent.This is the body text with indent.This is the body text with indent.This is the body text with indent.This is the body text with indent.
As unmanned technology continues to advance, wireless communication systems play a vital role.Consequently, numerous scholars have dedicated significant research efforts to explore these systems.
Ojaroudi Parchin et al. [7] examined the current state and future prospects of wireless communication systems, specifically focusing on the use of reconfigurable antennas in small-sized devices.Their research confirmed the suitability of wireless communication systems for 4G and 5G terminals.To enhance the reliability of these systems in practical applications, Bakare and Enoch [8] reviewed recent simulation methods and analyzed layout strategies through simulation cases.Furthermore, Chowdhury et al. [9] explored the potential of 6G wireless communication systems to improve efficiency, capacity, and reliability in signal transmission.Their findings indicated that the development of 6G will greatly support the advancement of unmanned technology.
As wireless communication systems continue to evolve, obtaining the status signals of wireless devices has become more convenient at the base station.Based on these signals, researchers have made progress in remote device monitoring Rekha et al. [10] developed a real-time embedded system for traffic monitoring that utilizes wireless communication to monitor the status of wireless devices.Additionally, Alulema et al. [11] created a wireless sensor network to remotely monitor household electricity consumption, resulting in a network with higher precision and a simpler structure compared to traditional wired devices.In the context of COVID-19, Paganelli et al. [12] employed Internet of Things technology for wireless communication.Ghosh et al. (2023) embarked on a comprehensive study to assess water quality through predictive machine learning.Their research underscored the potential of machine learning models in effectively assessing and classifying water quality.The dataset used for this purpose included parameters like pH, dissolved oxygen, BOD, and TDS.Among the various models they employed, the Random Forest model emerged as the most accurate, achieving a commendable accuracy rate of 78.96%.In contrast, the SVM model lagged behind, registering the lowest accuracy of 68.29% [13].Alenezi et al. (2021) developed a novel Convolutional Neural Network (CNN) integrated with a block-greedy algorithm to enhance underwater image dehazing.The method addresses color channel attenuation and optimizes local and global pixel values.By employing a unique Markov random field, the approach refines image edges.Performance evaluations, using metrics like UCIQE and UIQM, demonstrated the superiority of this method over existing techniques, resulting in sharper, clearer, and more colorful underwater images [14].

INET4 Network Components
Discrete event simulation for IP-based networks is made possible via the INET Framework, which is frequently utilized within the Omnet++ simulation environment.When it comes to wireless networks and apps, the academic projects are available using INET OMNET++.Studies using wireless networks including wireless sensor and wireless mesh networks increasing in number on the INET framework.In this study, using INET 4 Library, the following components as shown in Figure 1 are created: WirelessHost, IPv4NetworkConfigurator, IRadioMedium, IntergratedCanvasVisualizer, WirelessHost, and IPv4NetworkConfigurator.

Figure 1. The created components in INET4 library
The NED format, WirelessHost , is a standard for TCP/IP hosts where various network interfaces and protocol components such as TCP, UDP, and IP are included in it.In INET, StandardHost is available in a few other versions, such as WirelessHost, which is essentially a StandardHost optimized for wireless use cases.A configurator submodule of the network, the Ipv4NetworkConfigurator, is responsible for assigning IP addresses to hosts.Furthermore, in order for hosts to communicate with one another, it is necessary for them to know each other's MAC addresses; in this approach, this is accomplished through the use of GlobalArp modules installed locally on each host rather than through the use of actual ARP.Without a radio medium module, i.e.IRadioMedium,INET cannot simulate wireless networks.This component stands for the shared physical media through which signals are transmitted.Among the physical processes it must account for signal propagation and attenuation as well as interference.With a variety of radio medium modules, INET can simulate the wireless physical layer at granularity levels.The simplest model, UnitDiskRadioMedium, is employed at this stage.A variant of unit disc radio is incorporated into its functionality.Such that the communication range is simply given in meters, and not in terms of physical processes like signal attenuation.All existing canvas visualizers can be found in the IntergratedCanvasVisualizer module.As long as the type parameter is left blank, any submodule visualizer can be disabled.

Network Components Configuration
Configuration components are implemented in this section for object in the network in order to properly work the Omne++ code.Omnet++ allows them to be defined and used in place of IP addresses, actions, denotations, and so on in configuration files.Modifying an item in one location results in that change being mirrored wherever it is referenced, making configuration maintenance much simpler.Without objects, it would have to individually adjust the settings for each feature as needed.An IP address and subnet mask can be defined in a network object, and if you need to make a change to either, you need to make the adjustment in the object definition rather than in every feature that makes use of the address.Objects are configured in the omnet.inifile as below:

Case study
In the case study, the simulation entails the following steps: Host A's UdpBasicApp generates UDP packets at random intervals, which are then transmitted via UDP and IPv4 to the network interface.The network interface queues and transmits the packets without any gaps between them.These events can be observed through OMNeT++'s Qtenv runtime GUI.The provided Figure 2, displays the internal process of host A during the simulation, showcasing the transmission of a UDP packet from the udpApp submodule through the intermediate protocol layers and wlan interface.The host type in this NED file is parametric, defined through a hostType parameter and the INetworkNode module interface.This allows us to easily replace hosts with a different NED type in later steps.The current NED type specified is WirelessHost, but this can be overridden using omnetpp.ini.

Address assignment
IP addresses are assigned to hosts by an Ipv4NetworkConfigurator module, which acts as the configurator submodule in the network.Additionally, the hosts need to know each other's MAC addresses for communication.In this model, we use per-host GlobalArp modules instead of real ARP to handle MAC address resolution.A MAC (Media Access Control) address, also known as a hardware or physical address, is a unique 12-character alphanumeric attribute used to identify electronic devices on a network.An example of a MAC address is: 00-B0-D0-63-C2-26.

Traffic model
In this model, host A generates UDP packets that are received by host B. Host A is configured with a UdpBasicApp module, which generates random 1000-byte UDP messages at intervals that follow an exponential distribution with a mean of 12ms.This results in an UDP traffic rate of 100 kbyte/s (800 kbps), excluding protocol overhead.Host B is equipped with a UdpSink application that simply discards the received packets.Additionally, the model tracks the number of packets received by host B. This information is displayed using the @figure[rcvdPkText] line, and the following line ensures that the figure is updated during the simulation.

Physical layer modelling
Let's focus on the radioMedium module in this step.In INET, all wireless simulations require a radio medium module.This module represents the shared physical medium where communication occurs, taking into account signal propagation, attenuation, interference, and other physical phenomena.INET provides different levels of detail for modeling the wireless physical layer, each realized with a different radio medium module.For this step, we are using the simplest model called UnitDiskRadioMedium.It implements a variation of the unit disc radio model, which disregards physical phenomena like signal attenuation.Instead, the communication range is directly specified in meters.As long as there are no collisions, transmissions within the specified range will always be received correctly.Modeling collisions and interference range are optional in this context.It's important to note that this model of the physical layer isn't an accurate representation of reality, but it serves its purpose in simulations.Its simplicity and predictability are advantageous in scenarios where realistic physical layer modeling is not the main concern, such as in the modeling of ad-hoc routing protocols.The use of the UnitDiskRadioMedium in simulations also provides faster results due to its low computational cost.In terms of hosts, network interface cards (NIC) are represented by NIC modules, with the radio being a part of wireless NIC modules.There are different radio modules available, and it's necessary to choose one that is compatible with the medium module.In this case, hosts contain the GenericUnitDiskRadio as part of the AckingWirelessInterface.To configure the chosen physical layer model (Unit Disk Radio Medium and Generic Unit Disk Radio), the following settings are applied: the communication range is set to 500m, packet losses due to collisions (referred to as "interference" in this model) are disabled, resulting in independent duplex communication channels.The radio data rates are set to 1 Mbps.These values can be adjusted in the omnetpp.inifile using the appropriate module parameters, such as communication Range, ignore Interference, and bitrate.

MAC layer
NICs modules in the AckingWirelessInterface include an L2 protocol, specifically the data link layer.The MAC protocol in the interface is configurable, with the default option being MultipleAccessMac.However, MultipleAccessMac is a simple MAC layer that only handles encapsulation/ decapsulation and lacks a proper medium access protocol.In this case, there is essentially no medium access control, as packets are transmitted immediately after the previous packet has finished transmission.Additionally, MultipleAccessMac may have an optional out-of-band acknowledgment mechanism, which we have disabled in this scenario.In the following animation shown in Figure 3, you can observe the communication between hosts using OMNeT++'s default "message sending" animation.

Results and Discussion
Two WirelessHost are first developed using the components listed in Section 2. Since wireless signals require a medium in which to travel, IRadioMedium is subsequently added.Since IP addresses are required for communication between wireless hosts, IPv4Network Configurator is included to the NED file.
During the simulation, the following events occur.Host A's UdpBasicApp generates UDP packets at random intervals.These packets are then sent via UDP and IPv4 to the network interface for transmission.The network interface queues the packets and transmits them as soon as it is able to.As long as there are packets in the transmission queue of the network interface, they are sent consecutively without any gaps between them.
These events can be tracked on OMNeT++'s Qtenv runtime GUI.The illustration below depicts the internal workings of host A during the simulation.It shows a UDP packet being sent from the udpApp submodule, passing through the intermediate protocol layers, and transmitted by the wlan interface.
At the conclusion of the simulation at t=25s, the packet count meter indicates that approximately 2000 packets were sent.Each packet with overhead measures 1028 bytes, resulting in a transmission rate of around 660 kbps.
In Figure 4, the blue circle represents the communication range of host A. It indicates that host B is within this range, which means successful communication is possible.
Furthermore, there is a dotted arrow between host A and host B, representing successful communication at the physical layer.This arrow is created once a packet reception is successfully completed and the packet is passed up to the link layer.It is displayed after the reception of the first packet at host B.
It is worth noting that the two hosts, A and B, are transmitted back-to-back without any gap between them, as illustrated in Figure 4.

Figure 2 .
Figure 2. The inside of host A during the simulation

Figure 3 .
Figure 3.The communication between the hosts

Figure 4 .
Figure 4.No gap back-to-back transmissions

Figure 5 .
Figure 5. Simulation results of the two wireless hosts communication networks It enables the visualization of operations that Omnet++ Naturally doesn't provide.The implementing NED cod is written as bellow: