[riot-notifications] [RIOT-OS/RIOT] cpu/nrf5x/radio/nrfmin: Enhance nrfmin reliability (#11507)

Semjon Kerner notifications at github.com
Fri May 10 11:47:25 CEST 2019

### Contribution description

This PR provides fix for 3 independent flaws of the nrfmin radio driver:

The most profound commit fixes a bug discovered by @PeterKietzmann that allows to receive packets with a false receiver address. This Bug happend for receiver boards nrf52840dk and nrf52dk and was fixed with a workaround given by the errata sheet of the nrf52832.

Further this PR provides testing of power state when sending or receiving. Instead of throwing an assert, it now returns `ENETDOWN /*Network is down (POSIX.1-2001).*/`, when the device is powered off. This is, to avoid assertion fails on development, but rather avoid unspecified behavior when not in debug mode.

Also it adds a minor fix, lend from nrf52840 radio driver, to wait for the Ready-Event, which is triggered when the device is Ready to send/receive. This helped to increase reliability when flooding, as presented by @pystub in #10878.

I can split this PR, if prefered.

### Testing procedure

Test with examples/default on boards with nrf52840 or nrf52832 cpus. Make sure to use nrfmin with `USEMODULE=nrfmin`. Send packets with `txtsnd`.

On master, try to find an invalid address, that is accepted by the receiver by substituting single figures of the receiver address, preferably the last figure.
With this PR invalid addresses, generated with this approach will not work anymore.

Further testing could cover flooding with a small intervall of 0.1 seconds, as given in #10878.

### Issues/PRs references

Fixes #10878

You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * cpu/nrf5x/radio/nrfmin: explicit test for power mode
  * cpu/nrf5x/radio/nrfmin: wait for state transition

-- File Changes --

    M cpu/nrf5x_common/radio/nrfmin/nrfmin.c (11)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190510/4b5ff37e/attachment.html>

More information about the notifications mailing list