Rak4631 firmware update over UART port using external device

I would like you to be able to guide me to be able to upload firmware updates through the Serial port, I have the Wisblock connected to a device that is continuously receiving data from the wisblock through rs232, it is not possible for me to upload through OTA BLE because I do not have continuous access to the wisblock, then I would like to upload an update to the wisblock via the connected device. I see adafruit has the dfu_Serial example but I don’t know how to handle it as the example is only 1 line of code.

#include <Arduino.h>
#include <Adafruit_TinyUSB.h> // for Serial

void setup() 
void loop() 

Hello Jorge,

The example only shows how to force the nRF52 into Serial DFU mode, after that it waits for firmware upgrade sent over the USB port.

Device Firmware Update over the other serial ports (Not USB) is not supported by the bootloader.

If you want to do DFU over USB from a device different to a computer, you will have to mimic the
protocol of the updater tool nRFutil.

hi beegee

I have taken the time to look for more information in this regard, however I have not been able to figure out how to perform the update, apparently I also need to explain more my problem or my development idea, I have a device that uses 3G communication and I am using it as tunnel to send data to a platform using RS485 as a protocol and using an RS485 to RS232 converter connected to the Serial1 port I want to update my program using this means of communication, I understand that I must configure the bootloader so that when I send a sequence from the platform I told wisblock that a firmware update will be carried out and later send the firmware data, I understand that some microcontrollers handle 2 memory banks to store the new program while continuing to execute the old program until the storage and configuration of the new firmware, could you guide me to do it? .
The project also includes use the RAK5860 as a channel to send and receive data from the platform we are developing and in the same way it would be to see how to up
date the rak4631 or rak11200 code through the rak5860.

Hello Jorge,

As I wrote above, the bootloader does not support firmware update over Serial 1, only over USB or BLE.

When using Arduino BSP, the flash memory is organized as one single memory bank. When doing a firmware update, the update is controlled from within the bootloader and the old firmware is overwritten while the new firmware is received over USB or BLE.

What you want to do requires a changed bootloader and a changed BSP to support dual memory bank.