How to set image version

Greetings!

Hopefully a simple question: How does one change the ESP-IDF image version number reported in the mDash Devices tab? I’ve looked through the docs and examples and haven’t been able to find this.

Thanks!
-AD

It is hardcoded in the firmware during build process, and reported to the shadow - see shadow.reported.ota section. You can change it by hands, but next time a device connects, it’ll override it.

To answer the question. The mdash library initialization function is actually a macro:

Thus you might use mDashInit() function directly and specify your own value for the MDASH_FRAMEWORK string.

LSM,

Thanks for the response. FWIW, my images report a fixed Version of “1.2.4-idf” right now with dynamic BuildIDs.

So what would be the recommended best practice for specifying this mDash version number each time I have a new release to deploy? Should I be modifying my code to manually increment a hardcoded value to call via mDashInit() or there is a more elegant/preferred way to do this?

Thanks for the advice,
-AD

The automatic schema is this:

  • 1.2.4-idf is the version of mDash library. 1.2.4 is a release, -idf means you’re using ESP-IDF framework, not Arduino
  • BUILD_ID is the build timestamp, YYYYMMDD-HHMMSS

What you would like to see instead?

1 Like

lsm,

OK - I think you’ve clarified something here. I had assumed “Version” referred to the firmware image version. I didn’t realize this was the mDash library version.

That in mind, things make more sense.

Thanks for the clarification.
-AD

Sure, you’re welcome!