Java (Jar and Jad integrity algorithm) | Telit Cinterion IoT Developer Community
July 18, 2019 - 2:44pm, 1894 views
Hello,
I'm finalizing a project using the PLS62-W module, and I intend to update the java software through a private FTP server, which I'm even having problems on another topic. However after downloading the files there is a safe way to check the integrity of the files (.JAD and JAR) before starting the update process.
Hi Italo,
Maybe you can compute CRC of downloaded file and compare it with CRC of file on the server?
You can do it using command AT^SFSA="CRC","file_name"
Algporithm description you can find in AT spec in AT^SFSA command.
Best regards,
Adam
Hi Adam,
This foir the first possibility I thought, however, not to need to traffic the crc in I thought there was an algorithm that checked the .jar similar to the .hex below
http://www.keil.com/support/docs/1584/
https://www.fischl.de/hex_checksum_calculator/
I would check the integrity line by line of the jar and if everything was ok I would start the upgrade process.
Remember that I will do this process after downloading via FTP
Hi Italo,
If I understood correctly, in Intel hex file format every line of file ends with CRC. You would like to use the same approach with jar file? Honestly speaking, I'm not sure if the structure of jar file allows to such approach.
I still suggest to reconsider SFSA="crc" command to calculate CRC of whole downloaded file. I'm sure you can implement it in many ways, e.g.:
-you can store on FTP server two files - one will be .jar file and second will store CRC of jar. file.
-you can download both files, calculate CRC of .jar file and compare it with second downloaded file.
Best regards,
Adam
Hi Adam,
Thanks for your help
Yes, this approach that we using in others plataforms for garantee, because our equipament need ever was available
I searched in internet, for a algorithm like this Intel hex file, but i don't finded nothing for .JAR.
I'm belive that your suggest currently be the best for while
best regards,
Italo