Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment in Device Update for IoT Hub is Failed with NETX DUO 6.4.1 #259

Closed
chenhui-zhao opened this issue Mar 14, 2024 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@chenhui-zhao
Copy link

I encountered a Device Update failure issue with NETX DUO 6.4.1. I used NXP MCUXpresso SDK on i.MX RT MCU and updated the RTOS version to 6.4.1.

My test environment is:
MCU SDK: NXP MCUXpresso SDK 2.5.0
toolchian: Arm GNU Toolchian 12.3.Rel1 20230626
board: MIMXRT1060 EVKC
Eclips ThreadX: Version 6.4.1
project: azure_iot_embedded_sdk_adu (boards/evkcmimxrt1060/azure_rtos_examples/azure_iot_embedded_sdk_adu)

When testing the Device Update example project (azure_iot_embedded_sdk_adu), the original project works well. But, after upgrading RTOS to the version 6.4.1, deploying new image failed. I have created a device in IoT hub and uploaded a new binary image and manifest file to Azure IoT hub, and created a new update successfully. When deploying the new update to device in Azure IoT hub, it showed the deployment is undergoing, but the device can not receive the update information and there is no deployment information in the device twin.

In addition, I found the difference of agent information in the device twin. The original one is:

"agent": {
          "compatPropertyNames": "manufacturer,model",
          "deviceProperties":
          {
               "interfaceId": "dtmi:azure:iot:deviceUpdate;1",
               "manufacturer": "NXP",
               "model": "MIMXRT1xxx"
          }
}

The version 6.4.1 is:

"agent": {
          "compatPropertyNames": "manufacturer,model",
          "deviceProperties":
          {
                "aduVer": "AzureRTOS;agent/6.4.1",
                "contractModelId": "dtmi:azure:iot:deviceUpdateContractModel;2",
                "manufacturer": "NXP",
                "model": "MIMXRT1xxx"
           }
}

Could you help me fix the problem?

@chenhui-zhao chenhui-zhao added the bug Something isn't working label Mar 14, 2024
@bo-ms
Copy link
Contributor

bo-ms commented Mar 15, 2024

Hi @chenhui-zhao Thanks for asking. ADU agent initial release is 6.2.0. The interfaceId has been updated to contractModelId in 6.2.1 for ADU Service GA.

On ADU service side, both interfaceId and contractModelId are supported, user need to make sure that the sample uses the corresponding mode id with the source file, for example: using contractModelId for “dtmi:azure:iot:deviceUpdateModel;2” in 6.2.1 and later (refer to the sample and dtdl file thermostat-4.json), and using interfaceId for “dtmi:azure:iot:deviceUpdateModel;1” in 6.2.0 (check the sample and dtdl fle thermostat-3.json).

contractModelId as 'dtmi:azure:iot:deviceUpdateContractModel;2'
interfaceId as 'dtmi:azure:iot:deviceUpdateContractModel;1'

In your case, using 6.4.1, you only need to update the correct pnp model id (contractModelId for 'dtmi:azure:iot:deviceUpdateContractModel;2') in the sample, refer to this sample.

FYI: same GitHub issue here: [ADU not functional after removing 'interfaceId' device properties · Issue #208

@bo-ms bo-ms closed this as completed Mar 15, 2024
@chenhui-zhao
Copy link
Author

Hi @bo-ms Thank you for the quick support. I have resolved it by the following steps:

  1. Change the PNP model ID to
#define SAMPLE_PNP_MODEL_ID           "dtmi:com:example:Thermostat;4"
  1. Change deviceManufacturer and deviceModel to manufacturer and model in the update manifest file as below:
    "compatibility": [ 
      {   
        "manufacturer": "NXP",
        "model": "MIMXRT1xxx"
      }

@bo-ms
Copy link
Contributor

bo-ms commented Mar 18, 2024

Hi @chenhui-zhao Good to know you resolved the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants