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:
- Delete any files/folders generated by any previous attempts:
./update-certificates
.manifest_tool.json
update_default_resources.c
.mbed_cloud_config.json
-
Fully erase internal and external flash storage, verifying the contents are empty after
-
Configure SDK API
mbed config -G CLOUD_SDK_API_KEY <PrivateAPIKey>
- Prepare the manifest
manifest-tool init -a <PrivateAPIKey> -d "<domain>" -m "<model>" -q --force
- Build and flash the initial image
mbed compile --profile=./profiles/debug.json --flash
-
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
-
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
- 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
- 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.
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