[riot-notifications] [RIOT-OS/RIOT] kw2xrf: CSMA support missing in driver (#10364)

Ilmu011 notifications at github.com
Tue Sep 3 14:50:30 CEST 2019


Another thing; kw2xrf supports `NETOPT_AUTOCCA` and kw41zrf supports `NETOPT_CSMA`, despite both of them doing the exact same thing. Both use automatic CCA before TX operations, and in both cases that's exactly what the respective NETOPTs in both drivers enable. The only difference is, that kw41zrf additionally does exponential backoff.

CSMA emulation via usage of automatic CCA is exactly what [NETOPT_AUTOCCA](https://riot-os.org/api/group__net__netopt.html#gga19e30424c1ab107c9c84dc0cb29d9906a3c84d6406a0e0c6929e15db79b3dfc8b) defines and should be supported here.

> Perform channel clear assessment before transmitting
> 
> This may be a hardware feature of the given transceiver, or might be otherwise implemented in software. If the device supports CSMA this option will enable CSMA with a certain set of parameters to emulate the desired behaviour.

Actually, according to the documentation, it is even WRONG to support [NETOPT_CSMA](https://riot-os.org/api/group__net__netopt.html#gga19e30424c1ab107c9c84dc0cb29d9906a566a086347f022dbd8962485bd245a10) here;

> If the device supports CSMA in hardware, this option enables it with default parameters. For further configuration refer to the other NETOPT_CSMA_* options.

Neither kw2xrf nor kw41zrf support CSMA in hardware. None should support `NETOPT_CSMA`, but should support `NETOPT_AUTOCCA` instead.

The advantage of supporting `NETOPT_CSMA` is that the driver can make use of the additional options for `NETOPT_CSMA`, like `NETOPT_CSMA_RETRIES`, `NETOPT_CSMA_MAXBE` or `NETOPT_CSMA_MINBE`, but from a specification standpoint, it's just wrong.



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/issues/10364#issuecomment-527443904
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190903/5c83eb23/attachment.htm>


More information about the notifications mailing list