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

Failed to update firmware on Renesas EK-RA6M3 target #73

Closed
toyowata opened this issue Aug 5, 2020 · 2 comments
Closed

Failed to update firmware on Renesas EK-RA6M3 target #73

toyowata opened this issue Aug 5, 2020 · 2 comments

Comments

@toyowata
Copy link

toyowata commented Aug 5, 2020

Firmware update failed on Renesas EK-RA6M3 target using manifest-tool v2.0.0.

Step to reproduce

$ cd mbed-cloud-client-example
$ manifest-dev-tool init -a <API Key> -f
  • Build example code
  • Inject signature using imgtool.py script
  • Flash seure bootloader and firmware
  • Touch and re-build example code
  • Inject signature using imgtool.py script
  • Apply the command below:
$ manifest-dev-tool update-v1 -p .\mbedCloudClientExample_signed.bin -i <Device ID> -s -w

Logs

[Manifest-tool log]

(.venv366) PS C:\work\mbed-cloud-client-example> manifest-dev-tool update-v1 -p .\mbedCloudClientExample_signed.bin -i 0173bc91f8d5000000000001001033ae -s -w
2020-08-05 12:04:45,703 INFO FW version: 1596596685
2020-08-05 12:04:45,709 INFO Uploading FW payload mbedCloudClientExample_signed.bin
2020-08-05 12:04:49,344 INFO Uploaded FW payload http://firmware-catalog-media-ca57.s3.dualstack.us-east-1.amazonaws.com/mbedCloudClientExample_signed_d0c938bbc1a649d689e7a07e4376cc12.bin
2020-08-05 12:04:49,348 INFO Vendor-ID: 99f002b9a15e458aa543d0e10c34e17c
2020-08-05 12:04:49,349 INFO Class-ID: 41aaa1faa52d4a06a37f55dd3d9df35e
2020-08-05 12:04:49,783 INFO Uploaded Manifest ID: 0173bc9417a100000000000100100048
2020-08-05 12:04:50,100 INFO Campaign successfully created ID: 0173bc9418db00000000000100100237
2020-08-05 12:04:50,100 INFO Current state: draft
2020-08-05 12:04:50,422 INFO Started Campaign ID: 0173bc9418db00000000000100100237
2020-08-05 12:04:50,679 INFO Campaign state: checkedmanifest
2020-08-05 12:04:50,937 INFO Campaign state: publishing
2020-08-05 12:04:52,194 INFO Campaign state: autostopped
2020-08-05 12:04:52,195 INFO Campaign is finished in state: autostopped
2020-08-05 12:04:52,198 INFO Cleaning up resources.
2020-08-05 12:04:52,198 INFO Deleting campaign 0173bc9418db00000000000100100237
2020-08-05 12:04:52,455 INFO Deleting FW manifest 0173bc9417a100000000000100100048
2020-08-05 12:04:52,797 INFO Deleting FW image 0173bc9415d400000000000100100047
(.venv366) PS C:\work\mbed-cloud-client-example>

[Device log]

00> Setting VTOR: 0x10400
00> Start Device Management Client
00> Using hardcoded Root of Trust, not suitable for production use.
00> Starting developer flow
00> Application ready. Build at: Aug  5 2020 11:53:41
00> Initializing network.
00> TCP/IP initialized.
00> Started DCHP request ()
00> Current DHCP State : (6)
00> Current DHCP State : (6)
00> Current DHCP State : (6)
00> Current DHCP State : (8)
00> Current DHCP State : (8)
00> Current DHCP State : (8)
00> Current DHCP State : (8)
00> Current DHCP State : (8)
00> Interface is up : 10
00> IP 192.168.11.22
00> NM 255.255.255.0
00> GW 192.168.11.1
00> DHCP state, activating interface (10)
00> Network initialized, registering...
00> Client registered
00> Endpoint Name: 0173bc91f8d5000000000001001033ae
00> Device ID: 0173bc91f8d5000000000001001033ae
00> Button resource automatically updated. Value 1

(snip)

00> Button resource manually updated. Value 33
00> 
00> Error occurred : UNKNOWN
00> Error code : 1053
00> Error details : Update has failed, check MbedCloudClient::Error
00> Button resource automatically updated. Value 34
00> Button resource automatically updated. Value 35

[Device event log from portal]

id,date_time,device_id,event_type,event_type_description,event_type_category,state_change,description,changes,data.campaign_id,data.campaign_name,object,etag,created_at,highlighted,data.manifest_hash,data.manifest_version,data
0173bc9420f0000000000001001033cf,2020-08-05T03:04:51.157475Z,0173bc91f8d5000000000001001033ae,SYS_111,FAIL,FAIL_SERVICE,FALSE,Device failed to reach desired state,,0173bc9418db00000000000100100237,campaign-2020_08_05-12_04_45-mbedCloudClientExample_signed.bin,device-event,2020-08-05T03:04:51.157475Z,2020-08-05T03:04:51.157475Z,FALSE,,,
0173bc9420f6000000000001001033d0,2020-08-05T03:04:51.112064Z,0173bc91f8d5000000000001001033ae,UPD4_FAIL_218,FAIL,FAIL_REJECTED,FALSE,"Manifest rejected, invalid manifest format (DER format)",,0173bc9418db00000000000100100237,campaign-2020_08_05-12_04_45-mbedCloudClientExample_signed.bin,device-event,2020-08-05T03:04:51.112064Z,2020-08-05T03:04:51.112064Z,FALSE,,,
0173bc9420b9000000000001001033ce,2020-08-05T03:04:51.059714Z,0173bc91f8d5000000000001001033ae,UPD2_STATE_1,INFO,STATE_IDLE,FALSE,Idle,,0173bc9418db00000000000100100237,campaign-2020_08_05-12_04_45-mbedCloudClientExample_signed.bin,device-event,2020-08-05T03:04:51.059714Z,2020-08-05T03:04:51.059714Z,FALSE,,,
0173bc941b67000000000001001033cd,2020-08-05T03:04:49.752000Z,0173bc91f8d5000000000001001033ae,SYS_108,INFO,CAM_DEVICE_ADD,FALSE,Device added to campaign,,0173bc9418db00000000000100100237,campaign-2020_08_05-12_04_45-mbedCloudClientExample_signed.bin,device-event,2020-08-05T03:04:49.752000Z,2020-08-05T03:04:49.752000Z,FALSE,,,
0173bc921572000000000001001033b6,2020-08-05T03:02:37.113007Z,0173bc91f8d5000000000001001033ae,UPD2_REPORT_HASH,INFO,STATE_HASH_1,FALSE,Asset hash reported,,,,device-event,2020-08-05T03:02:37.113007Z,2020-08-05T03:02:37.113007Z,FALSE,9bb989a1131d6a6f2b6d34f2c0be3fed553b29574681f719ba00ec106194052a,,
0173bc92154b000000000001001033b5,2020-08-05T03:02:37.075254Z,0173bc91f8d5000000000001001033ae,UPD2_REPORT_VERSION,INFO,STATE_VERSION_1,FALSE,Manifest version reported,,,,device-event,2020-08-05T03:02:37.075254Z,2020-08-05T03:02:37.075254Z,FALSE,,0,
0173bc9213dc000000000001001033b4,2020-08-05T03:02:36.710411Z,0173bc91f8d5000000000001001033ae,UPD2_STATE_1,INFO,STATE_IDLE,FALSE,Idle,,,,device-event,2020-08-05T03:02:36.710411Z,2020-08-05T03:02:36.710411Z,FALSE,,,
0173bc921279000000000001001033b1,2020-08-05T03:02:36.363000Z,0173bc91f8d5000000000001001033ae,UPD2_REPORT_VERSION,INFO,STATE_VERSION_1,FALSE,Manifest version reported,,,,device-event,2020-08-05T03:02:36.363000Z,2020-08-05T03:02:36.363000Z,FALSE,,0,
0173bc921279000000000001001033b2,2020-08-05T03:02:36.363000Z,0173bc91f8d5000000000001001033ae,UPD2_REPORT_HASH,INFO,STATE_HASH_1,FALSE,Asset hash reported,,,,device-event,2020-08-05T03:02:36.363000Z,2020-08-05T03:02:36.363000Z,FALSE,9bb989a1131d6a6f2b6d34f2c0be3fed553b29574681f719ba00ec106194052a,,
0173bc921279000000000001001033b3,2020-08-05T03:02:36.363000Z,0173bc91f8d5000000000001001033ae,UPD2_STATE_1,INFO,STATE_IDLE,FALSE,Idle,,,,device-event,2020-08-05T03:02:36.363000Z,2020-08-05T03:02:36.363000Z,FALSE,9bb989a1131d6a6f2b6d34f2c0be3fed553b29574681f719ba00ec106194052a,,
0173bc92126d000000000001001033b0,2020-08-05T03:02:36.282000Z,0173bc91f8d5000000000001001033ae,SYS_106,INFO,DD_DEVICE_REGISTERED,FALSE,Device registered,,,,device-event,2020-08-05T03:02:36.282000Z,2020-08-05T03:02:36.282000Z,FALSE,,,
0173bc91f8ed000000000001001033af,2020-08-05T03:02:29.851540Z,0173bc91f8d5000000000001001033ae,SYS_107,INFO,DD_DEVICE_BOOTSTRAPPED,FALSE,Device bootstrapped,,,,device-event,2020-08-05T03:02:29.851540Z,2020-08-05T03:02:29.851540Z,FALSE,,,

device_0173bc91f8d5000000000001001033ae-events-2020-08-05-12-17-48.zip

Tool version

Python 3.6.6

(.venv366) PS C:\work\mbed-cloud-client-example> pip list
Package            Version
------------------ -------------
appdirs            1.4.4
asn1ate            0.6.0
asn1crypto         1.3.0
beautifulsoup4     4.6.3
cbor               1.0.0
certifi            2020.6.20
cffi               1.14.0
chardet            3.0.4
Click              7.0
cmsis-pack-manager 0.2.10
colorama           0.3.9
cryptography       2.9.2
ecdsa              0.15
fasteners          0.15
future             0.16.0
hidapi             0.7.99.post21
icetea             1.2.4
idna               2.7
intelhex           2.2.1
Jinja2             2.10.3
jsonmerge          1.7.0
jsonschema         2.6.0
junit-xml          1.8
lockfile           0.12.2
manifest-tool      2.0.0
MarkupSafe         1.1.1
mbed-cli           1.10.4
mbed-cloud-sdk     2.0.8
mbed-flasher       0.10.1
mbed-greentea      1.7.4
mbed-host-tests    1.5.10
mbed-ls            1.7.12
mbed-os-tools      0.0.15
milksnake          0.1.5
monotonic          1.5
pip                20.1.1
prettytable        0.7.2
protobuf           3.5.2.post1
psutil             5.6.6
pyasn1             0.3.1
pycparser          2.20
pycryptodome       3.9.8
pyelftools         0.25
pyparsing          2.4.7
pyserial           3.4
python-dateutil    2.8.1
python-dotenv      0.14.0
pyusb              1.0.2
pywin32            224
PyYAML             4.2b1
requests           2.20.1
semver             2.10.2
setuptools         39.0.1
six                1.12.0
soupsieve          2.0.1
urllib3            1.24.2
WMI                1.4.9
yattag             1.13.2

Other info

I could not see any error with other target such as FRDM-K64F (Fimrware update successful by manifest-tool v2.0.0).
Previous version (manifest-tool v1.5.2) works fine with Renesas EK-RA6M3 target.

@ciarmcom
Copy link

ciarmcom commented Aug 5, 2020

ARM Internal Ref: IOTCLT-4385

@yogpan01
Copy link

yogpan01 commented Aug 5, 2020

manifest-tool 2.0.0 is major version change and is supporting manifest v3 which is not a part of PDMC update.
PDMC will continue using manifest tool v1.5.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants