-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IEEE802.15.4: Unify CSMA-CA,CCA and send in all radios #13173
Comments
Hey @jia200x nice overview, and w/o being very deep in the 15.4 specs (and csma, cca details) myself the proposal sounds about right. I don't know the current state but of cc2538 but if we implement your idea, this should bring us closer to finally get ACKs and retransmits right in cc2538 15.4 radio. so 👍 from my side |
While standard conformity is desired for normal, out-of-the box operations, there are experimental setups (e.g. for alternative medium access schemata) where you might want to deactivate/circumvent it. As long as this is easily possible, 👍 from my side. |
It's important to mention here that there are some setups that are "valid" in RIOT configuration but they never apply.
And it makes sense, since CSMA-CA is a dependency of the retransmission procedure. Since the hardware acceleration is designed for IEEE802.15.4, I think all kind of experimental setups that don't align with the standard should be made without any kind of hardware acceleration (after all, an IEEEE802.15.4 MAC without CSMA is not a IEEE802.15.4 MAC anymore...). |
As questioned offline, what does "deactivating hardware acceleration" mean in this case? Does it mean that I can't use any MAC functionalities of the device anymore if I only want the radio to not use CSMA? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions. |
I will close this one when the SubMAC is implemented. |
The SubMAC is there: #14787 |
The SubMAC + Radio HAL allow these mechanisms. So this one should be closed now. |
Description
Following the rework of #12688, we have a problem of consistency in CSMA-CA and CCA when calling
send
functions.The IEEE802.15.4 standard specifies that all packets (except ACKs and Beacons) must be sent using CSMA.
Consider the following diagram of the CSMA procedure. The green blocks are the entry points of different mechanisms:
Let's define the green blocks in the diagram with these functions:
ieee802154_send_csma_ca
, send using the CSMA-CA procedure.ieee802154_transmit
, Transmit a raw frame without any kind of channel activity detection.ieee802154_send_cca
, send using CCA procedure.ieee802154_cca
, perform a Clear Channel Assessment.So, in order to have a compliant IEEE802.15.4 layer:
ieee802154_send_csma_ca
function is always needed, regardless of the source of CSMA (hardware or software).ieee802154_transmit
function is needed in order to send ACK packetsieee802154_send_cca
function is needed, regardless of the source of CCA send (hardware or software)Here is a summary:
The problem is, calling
dev->driver->send
has an undefined behavior depending on the driver and configuration:ieee802154_send_csma_ca
, unless NETOPT_CSMA is disabled (in that case it will behave asieee802154_send_cca
).ieee802154_transmit
).ieee802154_cca_send
.This explains why there's a QoS degradation in GNRC when comparing nRF52xx with at86rf2xx.
I'm not including hw retransmissions here, but there's a similar problem.
Also, some modules might not work OK when using different radios (openthread, csma_sender, etc).
Proposal
Implement the proposed functions.
We already have
ieee802154_send_csma_ca
andieee802154_send_cca
"out of the box" using thecsma_sender
module (event with HW caps discovery using NETOPT_AUTOCCA and NETOPT_CSMA). We might need to adjust thecsma_sender
module a little bit because for some radios it might not work (callingieee802154_send_cca
using at86rf2xx radios will have a strange behavior).Then, we can explicitly call each "send" function (plain, cca and csma) where needed. E.g since we are only sending data packets in
gnrc_netif_ieee802154
, we should already use thecsma_sender
function there.We can use radio caps to check if a feature is implemented in hardware (so no need to call the software procedure). We can also add compile time optimzations (e.g we are not interested in compiling software CSMA if only at86rf2xx radios are used)
The text was updated successfully, but these errors were encountered: