Incorrect Software Version Displayed in Processing Log

Hello.

I am currently testing nRF Cloud and encountering an issue.

I have flashed the Peripheral Memfault Diagnostic Service (MDS) sample program to an nRF54L15DK and connected it to the nRF Device Manager app on my iPhone.
Upon checking the Processing Log in the Memfault web portal, I noticed that the Software Version value varies depending on the type of event received:

  • Reboot events / Trace events / Metrics Reports: Displayed as "0.0.1+0" ( Correct )
      "event_data": {
        "software_version": {
          "version": "0.0.1+0",
          "software_type": "peripheral_mds",
          "existence_ensured": true
        },

  • OTA check for update events: Displayed as "0.0.1 0" ( Incorrect - the plus sign is replaced by a space )
      "event_data": {
        "hardware_version": "nrf54l15dk",
        "software_version": {
          "version": "0.0.1 0",
          "software_type": "peripheral_mds",
          "existence_ensured": true
        },

The expected value is "0.0.1+0".
My configuration is as follows:

  • CONFIG_MEMFAULT_NCS_FW_VERSION="0.0.1+0"
  • The value is automatically derived from the VERSION file because it exits in the project and CONFIG_MEMFAULT_NCS_FW_VERSION_STATIC is set to y.

Thanks for reading.

a.da

  • Hi,

    Can you please zip and share your project (remove your memfault project key before sending it), so that I can try to reproduce your bug?

    Because, by default this sample doesn't support FOTA, I just want to see the change that you did and try it on my end.

    I can make this ticket private if you are not comfortable sharing your project publicly :)

    Best regards,

    Simon D-M

  • Hi Simon D-M, thanks for your reply.

    I have attached my project.

    I applied the Memfault Docs Quickstart to the MDS sample program.

    Additionally, I modified some Kconfig default values to reference other Kconfig values.

    I also Added a new VERSION file.

    This is so to avoid hardcoding the same value multiple times.

    peripheral_mds.zip

    a.da

  • Hi,

    I tried to reproduce your error, but wasn't able to reproduce it, unfortunately. I'll forward this internally. I or a colleague will get back to you soon.

    Best regards,

    Simon D-M

  • Hi a.da-

    Thank you for reporting this issue!

    It looks like there's an incompatibility in nRF Connect Device Manager iOS application when the software version contains a non-URL-safe character, in this case `+`.

    Since you're using the automatic version number from `VERSION` file, you can use a small workaround in your project's `Kconfig` file to eliminate the `+0` component of the version, see an example here:

    https://github.com/memfault/memfault-firmware-sdk/blob/master/examples/nrf-connect-sdk/nrf5/memfault_demo_app/Kconfig#L55-L97

    This sets the `MEMFAULT_NCS_FW_VERSION` value to match `MEMFAULT_BUILTIN_DEVICE_INFO_SOFTWARE_VERSION`. `MEMFAULT_BUILTIN_DEVICE_INFO_SOFTWARE_VERSION` is set here:

    https://github.com/memfault/memfault-firmware-sdk/blob/master/ports/zephyr/Kconfig#L1053

    You can see the strategy there, which doesn't populate the `+0` if it's `=0`, which will remove the extraneous `+0` from the version number passed by the mobile app.

    We'll work on an update for the mobile app to properly solve the problem long-term.

    Thanks!

    Noah

  • Hi Noah, thanks for your reply.

    I tried the suggested workaround and found two important points:

    First, even after redefining the default value in my project’s 'Kconfig' file, the value remained "0.0.1+0" and did not change.

    config MEMFAULT_NCS_FW_VERSION
    	default "$(VERSION_MAJOR).$(VERSION_MINOR).$(PATCHLEVEL)"

    I suspect this is because the initial value was already determined when it was declared within the NCS ( nRF Connect SDK ) environment.

    C:\ncs\v3.2.1\nrf\modules\memfault-firmware-sdk\Kconfig

    config MEMFAULT_NCS_FW_VERSION
    	string "Static firmware version to use"
    	depends on MEMFAULT_NCS_FW_VERSION_STATIC
    	default "$(APP_VERSION_TWEAK_STRING)" if "$(VERSION_MAJOR)" != ""

    However, when I set a fixed value in 'prj.conf' file instead of the 'Kconfig' file, it worked as expected.

    CONFIG_MEMFAULT_NCS_FW_VERSION="0.0.1"

    Second, it appears that the value displayed in the "OTA check for update events" log is actually 'CONFIG_BT_DIS_FW_REV_STR', not 'CONFIG_MEMFAULT_NCS_FW_VERSION'.

    As mentioned earlier, even when I set 'CONFIG_MEMFAULT_NCS_FW_VERSION' to a fixed value ( "0.0.1" ), the version in the OTA events was still displayed as "0.0.1 0".
    After setting 'CONFIG_BT_DIS_FW_REV_STR' to the same fixed value, it was correctly displayed as "0.0.1".

    CONFIG_MEMFAULT_NCS_FW_VERSION="0.0.1"
    CONFIG_BT_DIS_FW_REV_STR="0.0.1"

    I look forward to the mobile app update!

    a.da

Related