Skip to content
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

Rn2483 driver In Progress, Configuration Mostly Complete #2

Open
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

JustinDMorrison
Copy link

Added ability to set board configuration values by sending "radio set " signals to board.

Note: Please adhere to Contributing Guidelines.

Summary

Update this section with information on why change is necessary,
what it exactly does and how, if new feature shows up, provide
references (dependencies, similar problems and solutions), etc.

Impact

Update this section, where applicable, on how change affects users,
build process, hardware, documentation, security, compatibility, etc.

Testing

Update this section with details on how did you verify the change,
what Host was used for build (OS, CPU, compiler, ..), what Target was
used for verification (arch, board:config, ..), etc. Providing build
and runtime logs from before and after change is highly appreciated.

linguini1 and others added 5 commits October 17, 2024 14:18
…ice. Implemented with the rn2483_radio_set_cmd function which uses an enum to represent each cmd and sends a radio set <message> to set the desired values of the corresponding cmd. void *data is the generic pointer which will be set to different data types, so appropriate pointer casting was used. All inputs to the radio_set_cmd function are presumed to have already been checked, which is why there are no checks in the function itself. A dummy file_read call is a temporary fix to get rid of an annoying bug where the 'sys get ver' value would be the first values in the read buffer after startup. Logging is used mostly for debugging at this point through syslog.
Copy link

github-actions bot commented Nov 5, 2024

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

Copy link

@linguini1 linguini1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert the auto-formatting on the rp2040_common_bringup.c file.
Also revert the commit of the w4349A0_7_95_49_00_combined.h since that is a firmware WiFi firmware file that is not part of the code here.

Great work so far!

drivers/wireless/lpwan/rn2483/rn2483.c Outdated Show resolved Hide resolved
drivers/wireless/lpwan/rn2483/rn2483.c Outdated Show resolved Hide resolved
drivers/wireless/lpwan/rn2483/rn2483.c Outdated Show resolved Hide resolved
drivers/wireless/lpwan/rn2483/rn2483.c Outdated Show resolved Hide resolved
drivers/wireless/lpwan/rn2483/rn2483.c Outdated Show resolved Hide resolved
drivers/wireless/lpwan/rn2483/rn2483.c Outdated Show resolved Hide resolved
drivers/wireless/lpwan/rn2483/rn2483.c Outdated Show resolved Hide resolved
Copy link

@WhyNot180 WhyNot180 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wanted to recommend that you keep your commit messages curt (something like 2 sentences) just to make it easier to figure out it changes. You don't have to explain what's going on in the message, but rather do so instead in code comments (if things aren't self-evident). Another thing is to not have all your changes in one commit, a commit should only do one thing (e.g. refactor code, add specific functionality etc.). Otherwise, excluding @linguini1's comments, LGTM.

@WhyNot180
Copy link

Just wanted to recommend that you keep your commit messages curt (something like 2 sentences) just to make it easier to figure out it changes. You don't have to explain what's going on in the message, but rather do so instead in code comments (if things aren't self-evident). Another thing is to not have all your changes in one commit, a commit should only do one thing (e.g. refactor code, add specific functionality etc.). Otherwise, excluding @linguini1's comments, LGTM.

Oops, looks like NuttX's contributing guidelines tell you to make your commits messages like that so it puts it in the pull request, my mistake. It would still be a good idea to separate out your commits, however.

@linguini1
Copy link

Just wanted to recommend that you keep your commit messages curt (something like 2 sentences) just to make it easier to figure out it changes. You don't have to explain what's going on in the message, but rather do so instead in code comments (if things aren't self-evident). Another thing is to not have all your changes in one commit, a commit should only do one thing (e.g. refactor code, add specific functionality etc.). Otherwise, excluding @linguini1's comments, LGTM.

Oops, looks like NuttX's contributing guidelines tell you to make your commits messages like that so it puts it in the pull request, my mistake. It would still be a good idea to separate out your commits, however.

Yeah we can keep them granular on the fork here, I usually just squash them all before sending them to NuttX upstream.

Copy link

github-actions bot commented Nov 9, 2024

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

Copy link

github-actions bot commented Nov 9, 2024

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

…te functions. Removed all enums related to rn2483_radio_set_cmd.
Copy link

github-actions bot commented Nov 9, 2024

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

…nger than required in case we need to adda null terminating character.
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

…ed define for dummy read buffer length. Would like to get rid of dummy read eventually.
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

… recommended. I am also subtracting one to keep space for the null terminating character.
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

Copy link

@linguini1 linguini1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outside of review comments, logic all looks good to me! You can start writing your test case for the ioctl calls, or help Jason with the TX implementation. We can merge in RX after review comments are resolved. Looking like an upstream PR might be ready before end of November! Great work!

drivers/wireless/lpwan/rn2483/rn2483.c Outdated Show resolved Hide resolved
drivers/wireless/lpwan/rn2483/rn2483.c Outdated Show resolved Hide resolved
drivers/wireless/lpwan/rn2483/rn2483.c Outdated Show resolved Hide resolved
…t, set priv->config options after sending the radio command instead of before, and now check for the error return value from that radio command call before setting the config's parameters.
Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

Copy link

@linguini1 linguini1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! I think this is solid logic for the configuration settings, and I doubt you'll find any issues with your ioctl tests. I'll merge in the receive logic at some point soon and then you can write some code to test receiving too (it's quite fragile). I'll get you the COTS board and last year's test scripts to try sending actual radio signals!

Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

Copy link

This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants