[POC] ieee802154_hal: tester PR for #14371#14655
[POC] ieee802154_hal: tester PR for #14371#14655jia200x wants to merge 18 commits intoRIOT-OS:masterfrom
Conversation
7a7eb95 to
13ed540
Compare
|
@PeterKietzmann @maribu @benpicco if you all agree, I would like to move the CC2538 commits out of #14371 and move them here. That way #14371 only focus on the API. I can keep rebasing this one. |
13ed540 to
5aebfa9
Compare
|
done! |
There was a problem hiding this comment.
First test observation:
nrf52840 -> remote-reva : txtsnd <remote-reva addy> 10
- nrf52840 hangs, remote-reva crashes
- reset both nodes and send a packet the other way around before
- nrf52840 will receive the packet
- now repeat nrf52840->remote-reva
- nrf52840 will indicate that it receive a packet and hang. It is still receive-ready though.
| case IEEE802154_RADIO_CONFIRM_CCA: | ||
| mutex_unlock(&lock); | ||
| break; | ||
| case IEEE802154_RADIO_INDICATION_RX_DONE: |
There was a problem hiding this comment.
Add IEEE802154_RADIO_INDICATION_RX_START and IEEE802154_RADIO_CONFIRM_ACK_TIMEOUT here
tests/ieee802154_hal/main.c
Outdated
| ieee802154_radio_write(_dev, pkt); | ||
|
|
||
| /* If the radio supports frame retransmissions (thus, CSMA-CA), send with | ||
| * CSMA-CA. Otherwise, send without any kind of collision avoidance */ |
There was a problem hiding this comment.
Add a note that this would be the task of a MAC layer (SubMAC) to justify that it is out of scope for the radio HAL
|
|
||
| /* Set PHY configuration */ | ||
| ieee802154_phy_conf_t conf = {.channel=21, .page=0, .pow=1000}; | ||
| ieee802154_radio_config_phy(_dev, &conf); |
There was a problem hiding this comment.
#define parameters in header of file
tests/ieee802154_hal/main.c
Outdated
| ieee802154_radio_set_hw_addr_filter(_dev, (uint8_t*) &short_addr, (uint8_t*) &ext_addr, 0x23); | ||
|
|
||
| /* Set PHY configuration */ | ||
| ieee802154_phy_conf_t conf = {.channel=21, .page=0, .pow=1000}; |
| .iol_next = NULL, | ||
| }; | ||
|
|
||
| flags = IEEE802154_FCF_TYPE_DATA | 0x20; |
There was a problem hiding this comment.
Use IEEE802154_FCF_ACK_REQ?
tests/ieee802154_hal/main.c
Outdated
| return send(addr, res, len); | ||
| } | ||
|
|
||
| int config_phy(int argc, char **argv) |
There was a problem hiding this comment.
A bit confusing the shell function is names similar to the HAL function
| ifneq (,$(filter nrf52840dk,$(BOARD))) | ||
| DRIVER := nrf802154 | ||
| endif | ||
| ifneq (,$(filter cc2538dk,$(BOARD))) |
There was a problem hiding this comment.
Would be fine to check for the CC2538 MCU here. However, you were talking about the remote-rev% board somewhere, not cc2538dk.
|
I think we should specify a test procedure according to which we test all combinations of devices |
| ieee802154_dev_t *dev = &nrf802154_hal_dev; | ||
|
|
||
| ack[0] = 5; | ||
| ack[1] = 0x02; |
There was a problem hiding this comment.
| ack[1] = 0x02; | |
| ack[1] = IEEE802154_FCF_TYPE_ACK; |
| (void)chan; | ||
| ieee802154_dev_t *dev = &nrf802154_hal_dev; | ||
|
|
||
| ack[0] = 5; |
There was a problem hiding this comment.
Do we have defines for that?
| ack[0] = 5; | |
| ack[0] = 5; /* frame length */ |
| ack[0] = 5; | ||
| ack[1] = 0x02; | ||
| ack[2] = 0; |
There was a problem hiding this comment.
We might just initialize that part once and never touch it, should always stay constant.
| ack[0] = 5; | ||
| ack[1] = 0x02; | ||
| ack[2] = 0; | ||
| ack[3] = rxbuf[3]; |
There was a problem hiding this comment.
yes, this includes frame length. I will add a macro for the magic number
There was a problem hiding this comment.
sizeof(ack) would be enough. There are already maces for the rest.
daf4111 to
7eeeed9
Compare
|
updated to latest changes of #14371 |
|
I had to re-implement the I also needed to enable Fast RX-TX transition (this means I had to manually calculate IFS times and reject a transmit request if it doesn't meet the IFS criteria) |
57be8fb to
3569a98
Compare
d9956b4 to
b1aa378
Compare
|
So how do we proceed? |
|
I would say so. The CC2420 is in an ok-ish state (I just need to fix some labels and minor stuff). The nrf52840 is also not so far from being in a mergeable state. The at86rf2xx might need some love. |
70c1fc5 to
cabdb5e
Compare
|
Rebased. I will leave this PR open as a reference and open implementations for the radios. |
cabdb5e to
c213fd5
Compare
c213fd5 to
433a05a
Compare
|
since we already have a couple of radios merged with the new Radio HAL API, I think we can close this one. |


Contribution description
This PR is rebased on top of #14371 and add all radios implemented so far for testing the Radio HAL API.
This means:
Testing procedure
ieee802154_radio_ops_timplementationtests/ieee802154_haltest (for any of this radios).config_phycommand:An out of range value for TX power should give an error
txtsndcommand.It's possible to get the long address with the
print_addrcommand.ccacommand:config_ccacommand:Note the ED is in dBm. The ED threshold doesn't affect the Carrier Sense mode (CCA mode 2).
tx_modecommand:rx_modecommand:Use a sniffer to check if the receiver sends ACK. As expected, a radio with Promiscuous Mode will receive all kind of packets with correct FCS.
capscommand to get the available caps for a given device:Example session between a
cc2538dkandnrf52840:NRF52840:
CC2538DK
Issues/PRs references
#14371
#13943