ieee802154/at86rf215: port to radio hal - #22541
Conversation
9c27e0a to
3bd224c
Compare
3bd224c to
d89befa
Compare
|
I'd suggest that instead of replacing the old driver, you create a new |
The infrastructure for multiple modulations already existed but was never used by any radio driver. The AT86RF215 allows to use different modulations. Therefore extend the submac to support this feature. Keep the 802.15.4g parameters in a phy_conf union in netdev_ieee802154_submac_t, since the HAL has no way to read them back from the radio. Switching PHY mode loads the compile time defaults of the target mode.
|
Yeah totally forget about that but it was actually not that difficult to add. But I'm not sure if this is the desired way. Test resultResults |
jia200x
left a comment
There was a problem hiding this comment.
Here's a first round from my side
| .config_addr_filter = _config_addr_filter, \ | ||
| .config_src_addr_match = _config_src_addr_match, \ | ||
| .set_frame_filter_mode = _set_frame_filter_mode, \ | ||
| .get_frame_filter_mode = _get_frame_filter_mode, \ |
There was a problem hiding this comment.
The IEEE802154 PHY's are independet from netdev. The old names are deprecated and mapped to the new ones.
|
Thanks for the first look! I decouple all NETDEV_IEEE802154_% PHY associated modules from netdev since the HAL is not depended on netdev. |
crasbe
left a comment
There was a problem hiding this comment.
Just the usual style comments 😇
style changes from crasbe Co-authored-by: crasbe <crasbe@gmail.com>
more style fixes
| #ifndef CONFIG_AT86RF215_DEFAULT_OQPSK_RATE | ||
| #define CONFIG_AT86RF215_DEFAULT_OQPSK_RATE (0) | ||
| # define CONFIG_AT86RF215_DEFAULT_OQPSK_RATE (0) | ||
| #endif |
There was a problem hiding this comment.
They are no longer used anyway
more style issues found by AI
tiny style change
Contribution description
This PR ports the at86rf215 radio to the new Radio HAL. So far the Radio seems to run smooth. The RTT increases here also due the following commit
a953ae9d9feadd a
IEEE802154_CAP_TX2RXcapSince
IEEE802154_CAP_IRQ_ACK_TIMEOUTandIEEE802154_CAP_FRAME_RETRANSarenot available on this radio, the TX2RX transition has to be handled by the SubMAC. Unfortunate this is an
SPI radio so the SubMAC is too slow to switch to RX in time and ACKs are missed.
The at86rf215 supports the Tx-to-Rx hardware acceleration by hardware so when an ACK was
requested the hardware enters RX after TX. The Submac needs only to set the ACK-Timeout Timer.
This was actually discussed in #14371 (comment)
Testing procedure
The ported driver was tested with the
gnrc_networkingexample on anopenmote-bagainst other radios in both directions with and without 6LoWPAN fragmentation.
In addition the
ieee802154_submacandieee802154_haltests were run against annrf52840dk.The following commands were used on the
gnrc_networkingexample:Test Overview
Each cell is
min / max / avg / dup / lost, times in ms.10000 packets per fragmented run, 20000 per not fragmented run.
at86rf231at86rf231nrf802154nrf802154kw41zrfkw41zrfesp_ieee802154esp_ieee802154cc2538cc2538kw2xrfkw2xrfWhen testing locally with short ping intervals I encounter somehow more duplicates and packet loss than on iotlab.
1. Both interfaces in parallel (2× openmote-b, IoT-LAB)
Two
openmote-bnodes (10 and 11) ping each other at the same time: one nodecontinuously pings the sub-GHz interface, the other one the 2.4 GHz interface.
With fragmentation the ping interval has to be set to at least twice the RTT. I assume this is because the second interface
keeps the node busy in the background so processing a single packet takes
considerably longer especially with fragmentation involved. What helps here is
setting
CFLAGS += -DCONFIG_GNRC_SIXLOWPAN_FRAG_FB_SIZE=4Fragmented —
fe80::ac8d:fee1:6030:5282%8Fragmented —
fe80::ac8d:fee1:6050:73df%7Without fragmentation the same setup runs fine with an interval of 25 ms:
Not fragmented,
-i 25—fe80::ac8d:fee1:6030:5282%8Not fragmented,
-i 25—fe80::ac8d:fee1:6050:73df%72. openmote-b ↔ iotlab-m3
The
iotlab-m3uses anat86rf231with the legacynetdevdriver. Both nodeswere running on IoT-LAB Strasbourg.
openmote-b → m3, fragmented
m3 → openmote-b, fragmented
openmote-b → m3, not fragmented
m3 → openmote-b, not fragmented
3. openmote-b ↔ nrf52840dk
The
nrf52840dkuses its integratednrf802154radio. Run locally.openmote-b → nrf52840dk, fragmented
nrf52840dk → openmote-b, fragmented
openmote-b → nrf52840dk, not fragmented
nrf52840dk → openmote-b, not fragmented
4. openmote-b ↔ frdm-kw41z
The
frdm-kw41zuses its integratedkw41zrfradio, which still uses the legacynetdevdriver.openmote-b → kw41z, fragmented
kw41z → openmote-b, fragmented
openmote-b → kw41z, not fragmented
kw41z → openmote-b, not fragmented
5. openmote-b ↔ esp32-c6
The
esp32-c6uses its integratedesp_ieee802154radio. Run locally.openmote-b → esp32-c6, fragmented
esp32-c6 → openmote-b, fragmented
openmote-b → esp32-c6, not fragmented
esp32-c6 → openmote-b, not fragmented
6. openmote-b ↔ cc2538 (openmote-b)
The same two IoT-LAB nodes (10 and 11) as in section 1 were used here, one of
them flashed to use the on-board
cc2538_rfradio instead.openmote-b → cc2538 (openmote-b), fragmented
cc2538 (openmote-b) → openmote-b, fragmented
openmote-b → cc2538 (openmote-b), not fragmented
cc2538 (openmote-b) → openmote-b, not fragmented
7. openmote-b ↔ phyWAVE-KW22
The
pba-d-01-kw2x(phyWAVE-KW22) uses its integratedkw2xrfradio. Run locally.In the not fragmented run from the
pba-d-01-kw2xthe node gets stucked after some time so this run has no output.This happens also on master.
openmote-b → kw2x, fragmented
kw2x → openmote-b, fragmented
openmote-b → kw2x, not fragmented
kw2x → openmote-b, not fragmented (did not finish)
8. SubMAC test (openmote-b ↔ nrf52840dk)
Frames are sent with
txtsndand received correctly in both directions.nrf52840dk → openmote-b
nrf52840dk (sender):
openmote-b (receiver):
openmote-b → nrf52840dk
openmote-b (sender):
nrf52840dk (receiver):
9. HAL test (openmote-b ↔ nrf52840dk)
openmote-b → nrf52840dk
openmote-b (sender):
nrf52840dk (receiver):
nrf52840dk → openmote-b
nrf52840dk (sender):
openmote-b (receiver):
Issues/PRs references
Marks off item in #14792
Hopefully fixes #20505 and the corresponding PR #22016. rxam is no longer
enabled at reset, it can only be activated through
ieee802154_radio_config_src_address_match.Hopefully also fixes #21685
Declaration of AI-Tools / LLMs usage:
AI-Tools / LLMs that were used are: