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

Extend RAK4631 support #502

Merged
merged 2 commits into from
May 17, 2024
Merged

Extend RAK4631 support #502

merged 2 commits into from
May 17, 2024

Conversation

jacobeva
Copy link
Contributor

@jacobeva jacobeva commented May 13, 2024

This was a LOT of work, but hopefully will be bloody well worth it!

Added:

  • RAK4631 support to the autoinstaller
  • RAK4631 support to firmware upgrade utility

Fixes:

  • Renamed RAK4630 to RAK4631 (RAK4631 is the name I should've been using in the
    first place, it is the name of the board assembly, whereas the RAK4630 is just
    the name of the board)
  • Deleted rnode.hard_reset() on line 2859. This is negotiable of course, but to
    my knowledge having that line is unnecessary, given that a hard reset is done
    in RNode_Firmware when the EEPROM is erased anyway. It was causing issues on
    my testbed as it was trying to send the reset command whilst my board was
    already resetting.
  • Restricted firmware extraction to ESP32-based RNodes. Does that feature
    even work on AVR? If so, I could always add support for them to the PR too, but
    my impression is that it doesn't.

Caveats:
Sometimes during a firmware upgrade / autoinstall process, the adafruit-nrfutil
utility may have the wrong port address (only if the RAK4631 board hops port
addresses during the reset, which happens when performing an EEPROM erase for
example), causing the flashing to fail. If this is the case, currently
rnodeconf cannot tell and will pretend as if it succeeded. I have submitted a
PR to add a non-zero exit code to adafruit-nrfutil in this case, but the
project looks a little dead and I doubt it'll be merged soon. I may distribute
my own version instead soon to combat this. Also, to tackle the core issue, it
would be a good idea to start using board serial addresses in rnodeconf
when selecting the boards (e.g. in /dev/serial/by-id/), which can then be
passed to adafruit-nrfutil and will stop the issue of port address hopping.

There is a related PR for RNode_Firmware I will be submitting soon, I will
post the link once I have submitted it.

Update: Link to RNode_Firmware PR markqvist/RNode_Firmware#77

@markqvist
Copy link
Owner

Restricted firmware extraction to ESP32-based RNodes. Does that feature
even work on AVR? If so, I could always add support for them to the PR too, but
my impression is that it doesn't.

Very sensible, it only works on ESP32 ;)

Deleted rnode.hard_reset() on line 2859.

This is not transparent at all, but it is actually needed for some ESP32-S3 boards, and doesn't hurt other ESP32s. Can you add a statement to only skip it for nRF?

it would be a good idea to start using board serial addresses in rnodeconf when selecting the boards

I completely agree, that would be a much better way to do it. A good improvement for the future!

@markqvist
Copy link
Owner

Don't worry about the hard_reset, I'll add a conditional

@markqvist markqvist merged commit e28dd6e into markqvist:master May 17, 2024
@jacobeva
Copy link
Contributor Author

Ah sorry about that!

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

Successfully merging this pull request may close these issues.

2 participants