[riot-notifications] [RIOT-OS/RIOT] tests/ieee802154_hal: check error codes and improve error reporting (#16556)

José Alamos notifications at github.com
Tue Jun 15 17:18:02 CEST 2021


<!--
The RIOT community cares a lot about code quality.
Therefore, before describing what your contribution is about, we would like
you to make sure that your modifications are compliant with the RIOT
coding conventions, see https://github.com/RIOT-OS/RIOT/wiki/Coding-conventions.
-->

### Contribution description
This PR does essentially 2 things:
- Check error codes when requesting state transitions and transmission. In some cases radios were BUSY when requesting transmission or a new state (because of IFS or the hardware accelerator was finishing a task). This ended up with a situation where "confirm_xxx" functions were called without a successful request.

- Report errors when CCA failed or the transmission could not be performed.
<!--
Put here the description of your contribution:
- describe which part(s) of RIOT is (are) involved
- if it's a bug fix, describe the bug that it solves and how it is solved
- you can also give more information to reviewers about how to test your changes
-->


### Testing procedure
I think https://github.com/RIOT-OS/RIOT/pull/15761 would be appropiate to test this. This issue was triggered when using the `txtspam` command (Radios simply stop receiving packets after one is successfully received).

@LarsKowoll could you give it a look? :)


<!--
Details steps to test your contribution:
- which test/example to compile for which board and is there a 'test' command
- how to know that it was not working/available in master
- the expected success test output
-->


### Issues/PRs references
Discovered by @LarsKowoll in https://github.com/RIOT-OS/RIOT/pull/15761
<!--
Examples: Fixes #1234. See also #5678. Depends on PR #9876.

Please use keywords (e.g., fixes, resolve) with the links to the issues you
resolved, this way they will be automatically closed when your pull request
is merged. See https://help.github.com/articles/closing-issues-using-keywords/.
-->

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

  https://github.com/RIOT-OS/RIOT/pull/16556

-- Commit Summary --

  * tests/ieee802154_hal: spin if radio is BUSY on trx_state request
  * tests/ieee802154_hal: use _set_trx_state where possible
  * tests/ieee802154_hal: wait for IFS during transmission
  * tests/ieee802154_hal: improve error reporting

-- File Changes --

    M tests/ieee802154_hal/main.c (70)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/16556.patch
https://github.com/RIOT-OS/RIOT/pull/16556.diff

-- 
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/pull/16556
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210615/dabbd2c0/attachment.htm>


More information about the notifications mailing list