Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

Commit

Permalink
Update firmware.options signature_size from 48 to 65
Browse files Browse the repository at this point in the history
  • Loading branch information
ssarhan-amz committed Nov 12, 2019
1 parent 825de24 commit face92d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions ConnectionHelpers/BLE/Handshake/tx.c
Expand Up @@ -266,11 +266,16 @@ packet_list_t *createCommandApplyFirmware() {
ApplyFirmware *applyFirmware = &controlEnvelope.payload.apply_firmware;
applyFirmware->restart_required = true;
applyFirmware->firmware_information.version = 12;
applyFirmware->firmware_information.components_count = 1;
strcpy(applyFirmware->firmware_information.name, "FirmwareName");
strcpy(applyFirmware->firmware_information.locale, "enUS");
strcpy(applyFirmware->firmware_information.version_name, "Version 12");
strcpy(applyFirmware->firmware_information.components[0].name, "ComponentName");

applyFirmware->firmware_information.components_count = 1;
FirmwareComponent * firmwareComponent = &applyFirmware->firmware_information.components[0];
strcpy(firmwareComponent->name, "ComponentName");
// note: cannot overwrite the last byte of the signature because nanopb needs null termination.
memset(firmwareComponent->signature, 0xBB, sizeof(firmwareComponent->signature) - 1);


printf("Creating command: %s\n", commandToString(controlEnvelope.command));
return createControlPacket(&controlEnvelope, true);
Expand Down
4 changes: 2 additions & 2 deletions ConnectionHelpers/BLE/Proto/firmware.options
Expand Up @@ -7,10 +7,10 @@
//

FirmwareComponent.name max_size:16
FirmwareComponent.signature max_size:48
FirmwareComponent.signature max_size:65
FirmwareInformation.name max_size:16
FirmwareInformation.components max_count:1
FirmwareInformation.locale max_size:8
FirmwareInformation.version_name max_size:16
UpdateComponentSegment.component_name max_size:16
UpdateComponentSegment.segment_signature max_size:48
UpdateComponentSegment.segment_signature max_size:65

0 comments on commit face92d

Please sign in to comment.