View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000138easycwmp[All Projects] Helppublic2016-05-27 09:342016-06-17 09:32
Assigned To 
PlatformOpenwrtOSLinuxOS Version3.10.14
Summary0000138: Firmware update continues even if file is incomplete
DescriptionWhen we update our devices using acs server and if acs server suddenly stopped, download will be incomplete but firmware update continues and it destroys our devices. Do you have hash code checks before updating the device? Please help.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
mohamed.kallel (manager)
2016-05-27 09:51

we do not have code that check the validity of the firmware. I think that the job of the update command.
But I think you can use md5 Checksum check of the OpenWRT firmware before calling sysupgrade. I tihnk the luci page do that before calling the sysupgrade command. I think that you can develop a check function that calculate the firmware checksum and then compare it to the firmware checksum.
Please keep me updated with your advancement and please share your check function if you are going to develop it
superkid (reporter)
2016-05-30 05:50

But you are checking if the downloaded file matches the correct file size and if it doesn't, you will download it again before proceeding to firmware update right? I just don't understand why it continue to update even if the file is incomplete.
mohamed.kallel (manager)
2016-05-30 10:16

could you please provide your traffic capture and your firmware
superkid (reporter)
2016-06-17 09:32

i fixed by comparing the file size before continuing update

 if [ "$dl_size" -lt "$size_check" ]; then
        let fault_code=9000+$E_DOWNLOAD_FAILURE
        common_json_output_fault "" "$fault_code"
        /sbin/sysupgrade $DOWNLOAD_FILE

- Issue History
Date Modified Username Field Change
2016-05-27 09:34 superkid New Issue
2016-05-27 09:51 mohamed.kallel Note Added: 0000479
2016-05-30 05:50 superkid Note Added: 0000480
2016-05-30 10:16 mohamed.kallel Note Added: 0000481
2016-06-17 09:32 superkid Note Added: 0000485

Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker