Enhancement request: how hard would it be to add remote flashing of the board?

I’m just curious what would it take to have either BT or even wifi on the board in order to connect to and flash the board?

An interesting question.
Most BT/Wifi chips are actually powerful enough to run a saber by themselves, so if we ported proffieOS to them, we would have builtin bluetooth/wifi and possibly some way to do the updates wirelessly “built in” so to speak. The hard part would be the other parts: motion, sound and FETs.

Doing it for existing boards is also possible. Either by programming an external board (like maybe an ESP32) to talk SWDIO or USB to the proffieboard and re-program it that way. That way, the proffieboard basically doesn’t have to know anything about what’s going on.

Perhaps a simpler way would be to add this support in ProfffieOS itself. It could look something like this:

  1. We add support for file upload/downloads over serial port in ProffieOS.
  2. We make it so that ProffieOS can load code from the SD card into RAM.
  3. Write a script that uploads the file to the SD card, issues a command that tells proffieOS to load code from the SD card which re-flashes the board using the file on the SD card.

This last way may be impractically slow using the kinds of bluetooth chips we currently use though. I suspect it will take several minutes to flash the board this way.

Is there a way to interface Arduino IDE via BT/wifi?

1 Like

The short answer is yes, because Arduino just runs a command to do the actual file upload to the board.

The longer answer is that the command needed to upload the code might need to be written, maintained and compiled for windows, mac, linux and possibly more platforms. It’s a lot easier if a standard command can be used.

1 Like

If you can read from the SD, you don’t need to transmit it by anything. You can simply copy the firmware there, can’t you?

1 Like

Incidentally, it would allow companies to release new firmware without users having to reflash the board. Or wouldn’t it?

1 Like

the reason I ask is that in my case, where my usb came off it would help if the board had wireless connectivity to push the policy I could easily change my config without too much fuss.

Yes

There are other easy ways to do that, since it’s not very difficult to re-flash the board from a web page.

That’s a fairly specific and unique use case though.

1 Like

Thats fair but it would be also a nice to have feature as well

Indeed.
I was thinking that it would be more generic and useful if we split it up three features:

  1. Loading code from SD card.
  2. up/downloads to SD card from serial
  3. flashing from SD card

Each of these features have possible other uses as well, and if it’s done right, only the first one (loading code from sd card) actually takes up any flash memory space. The rest could be loaded from the SD card. :slight_smile:

1 Like

so looking into the stm32l433ccu6 coding via sdcard than? it’s pretty sweet.