Matter ota provider provided the wrong ota file when I wanted to upgrade my matter device

I wanted to upgrade my matter device with chip-ota-provider-app, I have finished other prepareations and run command `chip-ota-provider-app -o otaList.json` to start ota-provider.

//otaList.json
{ "foo": 1, // ignored by parser
  "deviceSoftwareVersionModel":
  [
      { "vendorId": 65521, "productId": 32773, "softwareVersion": 1, "softwareVersionString": "v1.0", "cDVersionNumber": 18, "softwareVersionValid": true, "minApplicableSoftwareVersion": 0, "maxApplicableSoftwareVersion": 100, "otaURL": "light_ota_v1.ota" },
      { "vendorId": 4619, "productId": 4192, "softwareVersion": 17, "softwareVersionString": "1.1", "cDVersionNumber": 18, "softwareVersionValid": true, "minApplicableSoftwareVersion": 0, "maxApplicableSoftwareVersion": 100, "otaURL": "ota_test_H1_EF4_V11.ota" }
  ]
}

And then I commissioned a matter device which I want to upgrade into this matter network. Everything was ok but the ota-provider gave the wrong ota file.The correct one shall be "light_v1.ota".

What is the problem? Is this a known issue about matter ota? project-chip.github.io/.../README.html

Parents
  • Hi,

    The OTA image with the most recent software version in the JSON file will be selected and sent to the device. In your JSON file, the sw version of ota_test_H1_EF4_V11.ota is 17 while it is 1 for light_ota_v1.ota, so ota_test_H1_EF4_V11.ota will be selected as it is the most recent version. Try removing the line with ota_test_H1_EF4_V11.ota and only having light_ota_v1.ota in the JSON file.

    I recommend checking out Matter - Performing Device Firmware Upgrade in the nRF Connect examples, as it is more geared towards nRF Connect SDK than the guide you link to.

    Best regards,
    Marte

  • So it does not check Product ID and Vendor ID? It just only check the software version whatever the product ID and vendor ID is? Because my device's product ID is 32773, and it does not match the ota file whose product ID is 4192 even its software version is higher.

    And the result was that it could not ota normally because of the wrong ota file. I think it should select the correct ota file based on product ID and vendor ID to upgrade instead of selecting the ota file only based on software version. So is it a known issue of matter ota? Or I did something incorrect?

    Assume that I have many matter devices whose vendor ID and product ID are different in a matter network, how could I make them upgrade to their own ota file correctly?

  • Hi,

    Llama12580 said:
    So it does not check Product ID and Vendor ID? It just only check the software version whatever the product ID and vendor ID is?

    Correct, this is stated in the "Current Limitations" in the guide you linked to:

    Llama12580 said:
    Assume that I have many matter devices whose vendor ID and product ID are different in a matter network, how could I make them upgrade to their own ota file correctly?

    In the guide in our documentation you specify the node ID and endpoint ID of the device that is to receive the OTA image. Please see Matter - Performing Device Firmware Upgrade in the nRF Connect examples,

    Best regards,
    Marte

  • Thanks for answering!

    The situation is, I have commissioned a matter light(PID:65521 VID:32773) and a sensor(PID:4619 VID:4192) into my matter network, and start ota-provider by running `chip-ota-provider-app -o otaList.json`.

    In the guide in our documentation you specify the node ID and endpoint ID of the device that is to receive the OTA image.

    Yes, I did specify the node ID of my matter light(PID:65521 VID:32773), but it could not ota successfully. Ota-provider provided it the wrong ota file(PID:4619 VID:4192) just because this ota file has higher software version, and regardless of whether the product ID and vendor ID is correct. So my light can not upgrade normally but sensor can.

    Ota-provider always provides the ota file of the highest software version but never check PID and VID. So in my case, how can I make my matter light upgrade to its own corresponding ota firmware?

  • Hi,

    Product ID and vendor ID are not the same as node ID. Node ID is the unique ID of the device, and each device in a Matter fabric will have different and unique IDs. If you are using CHIP Tool as Matter controller then the node ID is defined by you as part of the commissioning command, for example:

    ./chip-tool pairing ble-thread <node_id> hex:<operational_dataset> <pin_code> <discriminator>

    Please try using the guide in our documentation for the OTA Provider: Matter - Performing Device Firmware Upgrade in the nRF Connect examples.

    Best regards,
    Marte

Reply Children
  • Thanks for answering so patiently!

    Sorry, maybe I wasn't clear enough that you didn't understand what I mean.

    I mean, I have two devices, one is matter light (PID:65521 VID:32773), and the other one is matter sensor(PID:4619 VID:4192). I have commissioned them into the same matter network successfully now. 

    And, I have prepared two ota firmware, one is for the matter light, firmware's PID and VID is 65521, 32773; the other ota firmware is for the matter sensor, firmware's PID and VID is 4619, 4192. And I start chip-ota-provider-app by running command `chip-ota-provider-app -o otaList.json`. This json includes these two different ota firmwares which are different in PID and VID.

    //otaList.json
    { "foo": 1, // ignored by parser
      "deviceSoftwareVersionModel":
      [
          { "vendorId": 65521, "productId": 32773, "softwareVersion": 1, "softwareVersionString": "v1.0", "cDVersionNumber": 18, "softwareVersionValid": true, "minApplicableSoftwareVersion": 0, "maxApplicableSoftwareVersion": 100, "otaURL": "light_ota_v1.ota" },
          { "vendorId": 4619, "productId": 4192, "softwareVersion": 17, "softwareVersionString": "1.1", "cDVersionNumber": 18, "softwareVersionValid": true, "minApplicableSoftwareVersion": 0, "maxApplicableSoftwareVersion": 100, "otaURL": "ota_test_H1_EF4_V11.ota" }
      ]
    }

    After that, I can control devices normally.

  • Hi,

    The OTA Provider does not take PID or VID into account, so there is no way to distinguish between the two devices using this. Additionally, the guide you are following does not use node ID or any other way to identify the devices. The guide in our documentation uses node ID to send the OTA image to a specific device. Node ID is not related to PID or VID in any way, but is a unique identifier for the device on the network.

    Please try using the guide in our documentation for the OTA Provider instead of the guide you have been following previously: Matter - Performing Device Firmware Upgrade in the nRF Connect examples.

    Best regards,
    Marte

  • Thank you so much!

    Actually, I did follow the documentation of nordic, but the matter light would always querying ota file "ota_test_H1_EF4_V11.ota" not "light_v1.ota", just because "ota_test_H1_EF4_V11.ota"  has a higher software version than "light_v1.ota" even "ota_test_H1_EF4_V11.ota" is not the ota firmware for matter light.

    //otaList.json
    { "foo": 1, // ignored by parser
      "deviceSoftwareVersionModel":
      [
          { "vendorId": 65521, "productId": 32773, "softwareVersion": 1, "softwareVersionString": "v1.0", "cDVersionNumber": 18, "softwareVersionValid": true, "minApplicableSoftwareVersion": 0, "maxApplicableSoftwareVersion": 100, "otaURL": "light_ota_v1.ota" },
          { "vendorId": 4619, "productId": 4192, "softwareVersion": 17, "softwareVersionString": "1.1", "cDVersionNumber": 18, "softwareVersionValid": true, "minApplicableSoftwareVersion": 0, "maxApplicableSoftwareVersion": 100, "otaURL": "ota_test_H1_EF4_V11.ota" }
      ]
    }

    I think it is a problem of chip ota provider, because in this case, I can not upgrade my matter light forever. I can only upgrade my matter sensor which fits "ota_test_H1_EF4_V11.ota".

  • Hi,

    Can you link to the guide you followed?

    We are not using JSON files in our guide, and the OTA image is only provided as an argument when running the OTA Provider, so it should not be possible for it to use a different OTA image.

    Best regards,
    Marte

  • Oh, you mean command `chip-ota-provider-app -f matter.ota`? Yes, it works well. 

    I want to think deeply about the situation that devices from different vendors and products. Because I find that it can start ota provider by json not just only one ota image.

    So I want to test whether two devices whose vendor are different can upgrade to their own corresponding ota image by using one json file, which is more convinient that I have no need to specify ota image one by one.

    Do you have any solution about this? 

Related