riebl / artery

OMNeT++ V2X simulation framework for ETSI ITS-G5
GNU General Public License v2.0
203 stars 131 forks source link

How to simulate a jammer effect #202

Closed xrispa-m closed 1 year ago

xrispa-m commented 3 years ago

I'm trying to create an RSU that will block the communication between vehicles and/or the other RSUs, similar to what a jammer would cause in the communication. I've changed the clear channel assessment (cca) threshold for all the RSUs to a very high value (+1000 dBm) and for the vehicles to a low value (-1000 dBm). The default value for the cca threshold in veins was -65 dBm. I've set a counter at the sendCam in the CaService and the RsuCaService and the cca threshold doesn't seem to have any effect on the exchanged messages.

# *.rsu[*].nic.phy80211p.ccaThreshold = 1000 dBm
# *.node[*].nic.phy80211p.ccaThreshold = -1000 dBm

Is there any other way to re-create a jammed communication in Artery?

riebl commented 3 years ago

You seem to use the Veins NIC: I suggest asking the Veins project how they recommend to realise jamming. Since I am no longer actively using the Veins radio layer, I cannot say which effect the ccaThreshold has in their implementation.

Nevertheless, a value of -1000 dBm does not make much sense because it is significantly below the noise floor (defaults to -98 dBm). I expect radios with a CCA threshold below the noise floor to sense the channel as always busy.

xrispa-m commented 3 years ago

I'm not that familiar with Veins to be honest, so the suggestion for the high cca threshold came from @sommer! But still I haven't figured out what I'm doing wrong!

I was thinking that if the RSUs have a high cca threshold, they will detect the channel as free and they will constantly send messages. On the other hand, if the vehicles have a cca threshold below that default value, they will detect the channel as busy and they will never send messages.

kenog commented 3 years ago

You say that you have a counters in the RsuCaService/CaService in sendCam(). It sounds to me like this is incremented every time that function is called and you expect that number to go up at the RSUs and down at the vehicles when a jammer is present. Is that correct? I think this is not going to happen because the CCA threshold only affects the MAC Layer but your counters are in the Facilities Layer. The CaService will keep generating CAMs which might then overwrite older CAMs in lower layer queues (because they are never emptied) but that number is never going down to 0. The only effect this could have is that it goes down to one message per second because of DCC when the channel is loaded. But not less than that. Similar for RsuCaService: It will always generate the same number of CAMs per second (default is 1 Hz). Changing the CCA threshold will have no effect on this. Could it be that you are confusing message generation (Facilities Layer) and message transmission (Access Layer)?

It might help to know what exactly you want to achieve in the end?