You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/index.rst
+23-2Lines changed: 23 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -468,14 +468,16 @@ Request to initiate a firmware update passing the full firmware image.
468
468
"fwsize": 926448,
469
469
"cmpsize": 579204,
470
470
"cmphash": <32 bytes>,
471
-
"fwhash": <32 bytes>
471
+
"fwhash": <32 bytes>,
472
+
"extended_replies": false
472
473
}
473
474
}
474
475
475
476
* 'fwsize' is the total length of the final firmware when uncompressed.
476
477
* 'cmpsize' is the length of the compressed firmware image which will be uploaded.
477
478
* 'cmphash' is the sha256 hash of the compressed firmware image.
478
479
* 'fwhash' is the sha256 hash of the final firmware image to be booted.
480
+
* 'extended_replies' is optional, and if set enables rich progress replies (see ota_data_reply_).
479
481
* NOTE: 'fwhash' is a new addition and is optional at this time, although it will become mandatory in a future release.
480
482
481
483
.. _ota_reply:
@@ -490,6 +492,7 @@ ota reply
490
492
"result": true
491
493
}
492
494
495
+
493
496
After this reply is received, the compressed firmware is sent in chunks using 'ota_data' messages. The chunks can be any size up to the `JADE_OTA_MAX_CHUNK` limit (see get_version_info_request_).
494
497
495
498
.. _ota_delta_request:
@@ -508,14 +511,16 @@ Request to initiate a firmware update using a binary diff/patch to be applied on
508
511
"fwsize": 926448,
509
512
"patchsize": 987291,
510
513
"cmpsize": 14006,
511
-
"cmphash": <32 bytes>
514
+
"cmphash": <32 bytes>,
515
+
"extended_replies": false
512
516
}
513
517
}
514
518
515
519
* 'fwsize' is the total length of the final firmware when uncompressed.
516
520
* 'patchsize' is the length of the patch when uncompressed.
517
521
* 'cmpsize' is the length of the compressed firmware patch which will be uploaded.
518
522
* 'cmphash' is the sha256 hash of the compressed firmware patch.
523
+
* 'extended_replies' is optional, and if set enables rich progress replies (see ota_data_reply_).
519
524
520
525
.. _ota_delta_reply:
521
526
@@ -549,6 +554,22 @@ ota_data reply
549
554
"result": true
550
555
}
551
556
557
+
or, if 'extended_replies' was set in the original request, and the Jade fw supports this:
558
+
559
+
.. code-block:: cbor
560
+
561
+
{
562
+
"id": "48",
563
+
"result": {
564
+
"confirmed": true
565
+
"progress": 58
566
+
}
567
+
}
568
+
569
+
* 'confirmed' is initially false, until the user verifies the OTA upload, then all subsequent replies will be true
570
+
* 'progress' is the percentage complete value as shown on Jade (which is based on uncompressed final firmware written, so can differ from the proportion of compressed data uploaded)
571
+
NOTE: 'extended_replies' is supported as of Jade fw 1.0.34
572
+
552
573
We then send the 'ota_complete' message to verify the OTA was successful (before the device reboots).
0 commit comments