Sparrow Gateway - OTA Firmware Updates

With it’s original firmware, can a Sparrow Gateway receive OTA firmware updates utilizing the Host Firmware functionality found in Settings of a Fleet?

Hi @kdl, welcome to the Blues forum!

The answer is, YES!

To provide some color, the Sparrow Gateway is composed of two parts:

  1. Notecard + Notecarrier-A (one part, functionally speaking)
  2. Sparrow Essentials Board

Each part has it’s own MCU and firmware.

  1. The Notecard firmware can be updated OTA from Notehub.
  2. The Sparrow firmware is designed to handle DFU requests received from the Notecard, and can also be updated OTA from Notehub

I’m doing some additional testing to validate whether the Sparrow can also be updated using outboard DFU* (I believe it can).

I’m in the middle of the test, but I didn’t want to wait any longer to respond.

Again, the simple answer to your question is, “yes”, but I wanted to provide all the different flavors of yes. As soon as my test with Outboard DFU wraps up, then I’ll follow up here with the results!

All the best,
Zak

* Outboard DFU support was introduced in the Notecard firmware release v3.5.1

Hi Zak!

Thanks for the feedback. For clarity, I have been getting up to speed and hands on with the Blues products this week. I am starting to catch on and have successfully tested the Sparrow with the default firmware as well as a modified firmware on the Reference Sensor board.

From Sparrow’s default firmware code, it seemed like a DFU was possible. I tried to perform a host firmware update through Notehub by uploading a .bin file (163kB) generated in STM32Cube IDE but it failed and the log output on the gateway Essentials Board indicated that the Firmware file was too large to use. Was I getting the basics wrong here?

If I understand correctly, Outboard DFU differs from the standard OTA DFU in the following way:

  • Outboard DFU can deploy firmware updates to any device that has a default ROM bootloader whereas the standard OTA DFU would require one to create a partition for a bootloader and add Project Metadata to the main file of the Host. Is this correct and if not could you provide a basic description on how the two DFU methods differ?

Look forward to your test results of the Outboard DFU.

Hi @kdl ,

It sounds like you’ve been doing your homework, because that is a great high-level summary of the two forms of OTA DFU (inboard/outboard).

I’m have just run into a similar error while testing this morning. It is expected to work in the manner you’ve described. I’ll investigate it further and reach out soon.

Sincerely,
Zak

Hi again @kdl,

Outboard DFU does work!

While I toil on the Inboard DFU problem, you can use Outboard DFU as a stop gap.

Here’s how to hook it up:

Wiring:

SPARROW Notecarrier-A
RST# AUX4
BOOT AUX3
LPRX AUXTX
LPTX AUXRX

Tested with:

  • Sparrow powered via Qwiic
  • Notecard powered via Notecarrier-A USB

NOTE: Be sure to have the STLINK detached, it will interfere with the LPUART.

Have fun,
Zak

1 Like

AWESOME! Thank you @zfields

1 Like

Hi @kdl,

I kept hammering on it, and I have confirmed that Inboard DFU also works.

There are a couple of things to remember:

  • You must send a .bin file and not a .binpack or .elf.
  • You must compile with some level of optimization;-Og (debug) works fine.

Both you and I were having the same issue, because the binary was too large. I tested a couple different optimization levels, and confirmed this is easily worked around.

I have now updated the Sparrow repository to compile with -Og (debug) by default, as opposed to -O0 (None). If you were to pull the latest source from the repository, this should resolve your Inboard DFU issue.

Thanks for dragging this stumbling block out into light!
Zak

3 Likes