-
Notifications
You must be signed in to change notification settings - Fork 747
802.15.4: Add raw userspace driver #4016
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This avoids all of the MAC layers, framing, etc. and works with the radio directly.
Ok I pushed a commit that fixed the bug I was having. I've now tested this with the libtock-c radio_raw_tx and radio_rx apps and I'm getting packets from one device to the other. |
//! ``` | ||
//! | ||
//! `user_frame` denotes the 15.4 frame in addition to the relevant 3 bytes of | ||
//! metadata (offset to data payload, length of data payload, and the MIC len). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where in user_frame
are these 3 relevant bytes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The answer is on line 354, but that won't be exported to documentation. Worth just repeating that comment here IMO.
//! be passed to the process. The ring buffer is designed to overwrite old | ||
//! packets if the buffer becomes full. If the process notices a high number of | ||
//! "dropped" packets, this may be the cause. The process can mitigate this | ||
//! issue by increasing the size of the ring buffer provided to the capsule. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This paragraph mixes description with justification in a way that's a bit confusing. Would probably be better to split them up. Sometimes I want to just know what the interface is and I only separately care about why this is the interface.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This text was already merged before, we use the same logic for the other syscall driver. I didn't create or write this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This generally looks pretty good to me, some inline comments that I'm medium requesting to address.
Pull Request Overview
This pull request adds a new 802.15.4 syscall driver that does not handle and framing or packet processing in the kernel. It uses the radio HIL directly. This is useful for running networking stacks like OpenThread in userspace.
Testing Strategy
Testing as part of the full series of 15.4 changes.
TODO or Help Wanted
Need to update the other 15.4 driver with the new commands.Need to figure out what to name this.
Documentation Updated
/docs
, or no updates are required.Formatting
make prepush
.