Reticulum icon indicating copy to clipboard operation
Reticulum copied to clipboard

Extend RAK4631 support

Open jacobeva opened this issue 1 year ago • 0 comments

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 https://github.com/markqvist/RNode_Firmware/pull/77

jacobeva avatar May 13 '24 21:05 jacobeva