I am new to using veins and I'm currently trying to exchange messages between RSU and vehicle. However, only my vehicles are communicating with each other. I tried using the following: findHost()->getDisplayString().updateWith("r=16,green"); the radius between the vehicles is turning green but the RSU does not show any changes. From the previous questions, I could see there is an onData() function in the previous versions of veins(TraCIDemp11p.cc) but it is not available in the newer versions. Is there any way how I can establish connection and show it physically in my simulations?
OK, so it seems that the RSU and the vehicles in Veins have the same connections thus are capable of both receiving and transmitting Basic Safety Messages(BSM). One of the potential reasons why the RSU might not be able to receive messages might be because the distance between the vehicle and the RSU might be too great. Thus, try moving your RSU closer to the network(scenario). This can be done in the omnetpp.ini file under RSU settings. Change the x. mobility
, y.mobility
, and z.mobility
to move the RSU closer to the network and this might potentially fix your problem.