1

I'm using VEINS4.4, OMNeT++ 5.0 and SUMO 0.25

My project involves vehicles to exchange 5 types of messages and # of vehicles is more than 200 , and i some of messages not received by others and when i traced the problem , i discovered that they lost because 'A packet was not received due to biterrors or packet was not received correctly, sending it as control message to upper layer'.

I have found solution in one of sites and i have applied in my code ,and it solved the problem little bit because some messages were lost and now other vehicles received it ,but i have still some other messages are lost and not received by others with same previous error. I need to get rid of this problem, please how ?

The solution that mentioned in one of sites was to add jitters in sending:

1) To add this in initialize :

if (sendBeacon) {
    scheduleAt(simTime()+ intuniform(1,3)* (par("beaconInterval").doubleValue()), sendRequestEvt);
}

2) Add this to handle self message :

scheduleAt(simTime()+(par("beaconInterval").doubleValue()), sendRequestEvt);
  • i have put dblrand() instead of intuniform(1,3) and no differrences
Julian Heinovski
  • 1,822
  • 3
  • 16
  • 27
user12345
  • 55
  • 9
  • 2
    I'm not sure what the problem is, it sounds like the simulation is working correctly. Messages are supposed to get lost, especially when the channel is congested. Is there any reason to suspect this is not normal behavior? – Rens van der Heijden Oct 16 '17 at 07:39
  • yes , you are right, its logic . Some messages get lost when channel is congested. But,i am getting these messages in module log "'A packet was not received due to biterrors or packet was not received correctly, sending it as control message to upper layer'" , when one request message not received by other vehicles. Therefore, i thought adding jitters will be a solution. – user12345 Oct 16 '17 at 12:32
  • but this solution didn't fix problem completely ,for example: in time 230 s , i was tracing lost message and after added jitter, that message has been received by others. However , in time 450 s , another message lost for the same previous reason, and others didn't receive it – user12345 Oct 16 '17 at 13:18
  • The message in the module log just indicates that a message was lost on the channel. That's exactly what is supposed to happen. I don't understand your problem -- channels are not loss-free, so why are you surprised when a message is lost? – Rens van der Heijden Oct 16 '17 at 14:53
  • Because my project is about controlling the intersection so i need all messages to be received by others. did you get my point ? – user12345 Oct 16 '17 at 16:10
  • Is there a way to make channels loss free? – user12345 Oct 16 '17 at 21:10
  • 2
    I guess I understand your problem, but the loss of messages is a common problem in a WiFi network. So maybe you should implement an algorithm that can deal with that problem? Having a loss free channel is quite unrealistic. – Ventu Oct 17 '17 at 05:40
  • Thank you for your answer. I have started to apply a mechanism to deal with this problem. – user12345 Oct 17 '17 at 14:24

0 Answers0