I am studying X-MAC in multihop sensor network. I am using AODV as a routing protocol. During run time, at the beginning, I can see that the sensor node starts sending preambles before any route discovery. So, until any route is established these preambles are sent for nothing. I also studied the same network with csma/ca, in which the route is established first and then the node initiate transmission.
As per suggestions given in OmNET++ group, I tried the following, but it did not resolve the issue.
**.useHelloMessages = true
Would anyone please advice how to configure X-MAC so that when the simulation starts, a node will first establish a route and then it will send preambles for data communication?
Thank you.
At the start of the simulation, there are no routes. So when one of the nodes have some data to send (they contain a TCP app that generates a TCP packet, for example), the AODV initiates route discovery to the destination of the data (the TCP packet). Aodv does this route discovery by sending an Aodv route request message (AodvRreq). The message indicates that the node wants to discover a route to the destination of the data.
Aodv is implemented as an app in INET, and it sends its route request (and other) messages encapsulated in UDP packets.
The packets (aodv or data) go down the protocol stack to the XMAC for transmission.
So, from the point of view of the XMAC, the Aodv route request message (which is triggered by the node wanting to send TCP data) is itself treated as data (since it uses UDP). In order to send data, the XMAC first sends preambles.
(Answer edited for more details)