-
Notifications
You must be signed in to change notification settings - Fork 146
Commit 6b299aa

Merge #143
143: initial ieee802.15.4 API r=jonas-schievink a=japaric
what the title says
this PR adds an `ieee802154::Radio` API that wraps the `RADIO` peripheral and puts it in IEEE 802.15.4 mode.
I haven't checked the silicon erratas of (or tested) other chips (the code contains one workaround for (nRF52840 specific?) silicon errata) so for now I have put the API directly under `nrf52840-hal`. But I guess the API should also work on other nRF52 devices -- I think the nRF51 chips do not have an 802.15.4 mode? And I don't know about other chip families.
The implementation is not super IEEE compliant. It's missing a backoff delay mechanism when doing CCA (Clear Channel Assessment) before transmitting packets and it's also missing IFS (inter-frame spacing) between consecutive packets (the hardware has some built-in support for this but the PR doesn't expose it). But it is sufficient to send packets around and receive them on other nRF52s running the same implementation, though it would be good to check this against some third party implementation like the DWM1001 or the MRF24J40.
There are some TODOs here and there in terms of additional things the API could expose like changing the transmit power. I'm not sure if all those need to be added before a review though. They could be added as follow up PRs too.
TODO items
- [x] API to change TX power (the default value doesn't go very far, like tens of centimer or so in a noisy 2.4 GHz environment)
- [x] API to change the start of frame delimiter (the default value matches the IEEE spec)
- [x] API to extract the LQI (Link Quality Indicator)
- [x] verify that CRC are being checked. May need to send a malformed packet from a different device (MRF24J40?)
- [x] "The total usable payload (PSDU) is 127 octets, but when CRC is being used, this is reduced to 125 octets of usable payload." -- adjust MAX_LEN accordingly
Co-authored-by: Jorge Aparicio <[email protected]>
Co-authored-by: Jorge Aparicio <[email protected]>
Co-authored-by: Lotte Steenbrink <[email protected]>File tree
Expand file treeCollapse file tree
2 files changed
+811
-0
lines changedFilter options
- nrf52840-hal/src
Expand file treeCollapse file tree
2 files changed
+811
-0
lines changed
0 commit comments