CCA fails to detect packets in some situations
This issue has been around for some time but I have not been able to come up with a solution or be able to prove it until now. See the attached exampleccaTest.cc
If 2 packets are transmitted within 192 us from each other (no backoff periods), CSMA/CA will not be able to detect the transmission of the packet even with CCA. This is because there is a vulnerable window during the turnaround (RX_ON->TX_ON) between the CCA and the actual transmission of the packet in which a 2nd node CCA will assume the channel IDLE because there is no transmission (the first node is in its turnaround before transmission)
The following exemplifies the issue:
* Transmission of packets over time:
*
* Node1 CCA | Node 1 TurnAround Rx->Tx | Node1 Packet Tx
* 128us | 192us |
* = Collision
* Node2 CCA | Node 2 TurnAround Rx->Tx | Node2 Packet Tx
* 128us | 192us |
* Time ---------------------------------------------------------------->
Node 2 CCA was unable to detect any traces of energy because it sensed during
the Node 1 turnaround time.
The result is undetectable collisions in packets that are transmitted close to each other that otherwise CSMA/CA should be able to detect. This has not been detected until now because of CSMA/CA random backoff periods. Backoff periods have been turned off in the example to make this issue reproducible.
Comments, solutions, and opinions on how this is handled in other NetDevices are much appreciated.
Edit:Is this perhaps a normal behavior? I cannot find information about the contrary.