at86rf2xx: implement basic mode (v2)#13798
Conversation
70b9232 to
4aec29d
Compare
|
Does it make sense generalizing this |
I know this should somehow come more easily after the |
The basic mode is specific to the AT86RF2XX.
So we could configure a "basic mode" setting the right parameters |
I typed without thinking, but actually this is indeed radio specific (unless we disable ACK or frame retransmissions for the (Sub)MAC layer, which makes no sense unless you want to simulate test scenarios). The switch(cap) {
#if AT86RF2XX_AUTO_ACK
return RADIO_HAS_AUTO_ACK;
#endif
}} Then an upper layer has uniform way to extract the caps. |
|
(in other words, setting IEEE802154_FRAME_RETRANS to 0 won't have any effect in CC radios, NRF52, etc) |
|
Or alternatively, we can model these caps for now using compile time features (e.g FEATURES_PROVIDED=IEEE802154_FRAME_RETRANSMISSION). But then we would need to manually take care of the cases where we want to use the radio without the feature (e.g OpenWSN) |
I think that could make sense, you could have drivers providing those features, and then drivers |
|
I think I addresses all comments |
|
I tested pinging between nodes, it sill works and from
Details
Details
Details |
|
This doesn't change the base case operation case, and basic mode now works. Please squash @jia200x (and rebase as well, I want to re-check enhanced mode oepration). |
cb3fa4a to
0168b2b
Compare
Strange. Which was your base commit there? |
|
squashed and rebased! |
|
@jia200x Travis is complaining about missing documentation about those new macros. You can squash right away once addressed! |
0168b2b to
69dbf17
Compare
|
done! |
69dbf17 to
ab5418e
Compare
|
GO! |
|
Congratulations! |
Contribution description
This PR implements basic mode for the AT86RF2XX radios.
In basic mode, the radio doesn't perform any kind of CSMA-CA, retransmissions and Auto ACK.
Although the Address Matching is still available, I'm not adding it because the AT86RF233 doesn't match ACK frames, which might be problematic for users of the basic mode (e.g OpenWSN)
I added CRC error report via a netdev event. The radio will release frame buffer protection when the CRC check fails. Since the extended mode doesn't trigger the TRX_END if CRC fails, this event is only available in basic mode.
Testing procedure
It's possible to test with one radio in extended mode (default configuration) and another radio running in Basic Mode:
CFLAGS=-DAT86RF2XX_BASIC_MODE make flash termYou should be able to see the retransmissions + received ACKs.
Check that the
NETDEV_EVENT_CRC_ERRORis called (e.g with an failed assertion).Issues/PRs references
#8213