Arm Mbed OS support forum

Mbed dm update device - command hanging

I’m trying to update a device using developer certificates. However I’m experiencing an issue where by the the campaign never starts.

The device can connect to Pelion and successfully register. I can view the current manifest version via the portal.

Here are the steps I have followed:

  1. Delete any files/folders generated by any previous attempts:
./update-certificates
.manifest_tool.json
update_default_resources.c
.mbed_cloud_config.json
  1. Fully erase internal and external flash storage, verifying the contents are empty after

  2. Configure SDK API

mbed config -G CLOUD_SDK_API_KEY <PrivateAPIKey>
  1. Prepare the manifest
manifest-tool init -a <PrivateAPIKey> -d "<domain>" -m "<model>" -q --force
  1. Build and flash the initial image
mbed compile --profile=./profiles/debug.json --flash
  1. Wait for the device to connect and bootstrap to Pelion cloud service making a note of the DeviceId, also verify you can examine the current ‘PkgVersion - Manifest version’ in the portal

  2. Make changes to source code and compile a new target update image. NOTE: do not flash this image to the device.

mbed compile --profile=./profiles/debug.json
  1. Publish OTA to Pelion
manifest-tool update device -p BUILD/<TARGET>/GCC_ARM-DEBUG/<Project>_update.bin -D <DeviceID>

OR

mbed dm update device -D <DeviceID> --custom-targets ./custom_targets.json --build BUILD/<TARGET>/GCC_ARM-DEBUG
  1. Observe how the tool hangs
...
[INFO] 2020-05-14 01:33:15 - manifesttool.update_device - Manifest ID: 0172109983e60000000000010010019a
[INFO] 2020-05-14 01:33:16 - manifesttool.update_device - Campaign successfully created. Current state: 'draft'
[INFO] 2020-05-14 01:33:16 - manifesttool.update_device - Campaign successfully created. Filter result: {'id': {u'$eq': '01721096058100000000000100169d8d'}}
[INFO] 2020-05-14 01:33:16 - manifesttool.update_device - Starting the update campaign...
[INFO] 2020-05-14 01:33:16 - manifesttool.update_device - Campaign successfully started. Current state: u'scheduled'. Checking updates..
[INFO] 2020-05-14 01:33:16 - manifesttool.update_device - Current state: 'checkedmanifest'
[INFO] 2020-05-14 01:33:16 - manifesttool.update_device - Current state: 'draft'

I see there is an open issues on github. TeeTak mentions an outdated device id, I do not see how this is the case here as I am sending the OTA request shortly after it boot straps and after confirming it is registered successfully. I have also checked the ClassId and VendorId match both within the manifest and the update certificate.

In the portal if I manually start the campaign, I see a short notification saying the campaign has successfully started. Only for the summary to display: Not yet started No quota. :man_shrugging:

I’m out of ideas as to what this could be. I’m reluctant to start a production OTA (using an FCU injected update certificate ) without first successfully completing an OTA via a developer certificate first.

Any ideas, Im not sure where to even begin looking ?

is it cloud issue ?
device client issue ?
is it a tooling/cli issue ?

Thanks,
Ash

Hello Ash,

Are you using a free-tier account or commercial account?

Free-tier accounts have monthly limit of 200 updates and commercial account needs to negotiate a service package for the updates.
The message “Not yet started, No quota” indicates that the quota is used.

My first guess is that you are out of the free-tier quota of 200 updates per month. The bad thing is that you would need to wait to the next month to get the new 200 quota

More info of free-tier limits can be found from https://www.pelion.com/docs/device-management/current/user-account/account-types-and-limits.html

I believe this to be a commercial account. The dashboard reports that:

Firmware updates monthly limit: unlimited

OK, so there seems to be a bug. I will report this to the FW update team immediately

Hello Ash,

We just checked your account and we are wondering if you could try the update again.

Best regards,
Jaakko

1 Like

Hi Team

Thank you for the support, I can confirm I can now successfully publish an OTA campaign.

Ash