nuttx-apps
nuttx-apps copied to clipboard
MCUBoot Agent Feature. Add extra headers.
When downloading images in mcuboot_agent application from a URL with a GET command it would be a good feature to add a function that lets you send board custom headers to the server to indicate board related data.
I am thinking in a OTA Server that serves the firmware image depending in the board ID, Firmware current version, etc...
A function that adds to the webclient_context struct
the extra headers could be implement in mcuboot_agent_main.c
file in download_firmware_image
function like this:
#ifdef CONFIG_MCUBOOT_UPDATE_AGENT_EXTRA_HEADERS
mcuboot_add_extra_headers(&client_ctx)
#endif
Then mcuboot_add_extra_headers
would be defined by the user depending on his concrete server according to its needs...
How do you see this feature?? Could it be a good idea?? @pkarashchenko
Hi @tito97sp. Contributions are generally welcome, but in this case I would recommend against adding this kind of feature to the MCUboot Update Agent example. This application is designed as a minimalist update agent, with a minimal set of requirements (e.g. Python's standard simple HTTP server for hosting the update file). It goes beyond the scope of this example to improve the connectivity aspects or adding application-specific (or product-specific) features on the communication. Otherwise it will move the focus out of the main motivator for the example, which is to demonstrate the use of MCUboot's APIs on the application image and also to serve as a basis for cloud service providers to eventually integrate their services with NuttX-based devices.