-
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
[RFC] The IEEE802.15.4 SubMAC #13376
Comments
+1 for the concept in general. However, if I see it correctly this issue acts as a place to summarize different efforts that you described in separate issues, right? In particular, I don't understand the difference (or synergy?) between this one and the proposal in #11483. Could you elaborate? |
Yes. Basically this is an actual proposal for "Moving the PHY/MAC layer out of the drivers". It updates though the "pure PHY" into a SubMAC to add common operations (for a MAC layer and a raw link user). The SubMAC replaces the
|
Yes. Basically this layer provides an uniform northbound API that mimics a radio in extended mode (e.g a user on top of the SubMAC will see a |
In other words, basically if we plug this module below If someone needs low level access there's always the transceiver HAL (to be defined) |
it's there! #14787 |
The SubMAC was merged (#14950 ). We can close this one now |
This issue introduces the concept of IEEE802.15.4 SubMAC.
Motivation
The SubMAC is a common layer used by the IEEE802.15.4 MAC and direct communication on top of the radio.
The SubMAC handles the following tasks (if not provided by the radio):
With this layer it's possible to use hardware that doesn't support acceleration (retransmissions, ACK timeout, etc) in direct radio communication or
gnrc_netif_ieee802154
.Although not strictly a SubMAC component, it might also be practical to define here the PHY layer for IEEE802.15.4 (set transceiver state, set channel, tx power, etc). This pattern is seen in some implementations like the Freescale PHY layer.
How does it work?
This layer should have functions like:
netdev->driver->send()
using radios with Extended Mode support (at86rf2xx
,mrf24j40
)Each function should ask the transceiver if a given acceleration is present. If not, the layer is in charge of calling the appropriate component to handle the task (CSMA-CA, Retransmissions, etc).
What's required in order to implement this?
We already have some of the components to implement the SubMAC (e.g
csma_sender
).There's a proposal for unifying the CSMA-CA, CCA and send in all radios in #13173, it would be relevant here.
We require to implement the retransmission and ACK handling logic by ourselves.
We would also need:
a) An interface between the SubMAC and the transceiver to access transceiver services (transceiver HAL)
b) An interface to check if a hardware acceleration is present on the given device ("radio caps")
We can use in the beginning the
netdev
interface for "a)". In the long run it might beneficial to have a dedicated IEEE802.15.4 HAL (as pointed out in #12469).For b) there's #11473. Some modules already model this concept of radio caps (e.g the
csma_sender
using NETOPT_AUTOACK and NETOPT_CSMA)Implications
gnrc_netif_ieee802154
, all radios will work with retransmission logic and CSMA-CA.Optimizations
If we are only using radios that have a certain hardware acceleration (e.g frame retransmission), we don't want to pull
csma_sender
and code to check if a radio has the acceleration or not.The other way around if we know all radios are "basic" radios, then we don't need to ask if a given radio has the acceleration.
We can aim to have radio caps function that resolve in compile time:
So the following snippet:
will always generate the minimum amount of instructions (what's not needed gets optimized out by the compiler)
Does this whole concept makes sense?
Related issues
I mentioned about this concept in #12741 .
CSMA-CA, CCA and send get automatically unified by this concept (see #13173)
Radio caps become relevant for this: #11473.
Move PHY/MAC out of drivers: #11483
The text was updated successfully, but these errors were encountered: