EHS5-E Firmware update fails | Thales IoT Developer Community
January 12, 2020 - 9:56am, 2937 views
I'm trying to update the EHS5-E firmware to the latest version. I ftp the three files onto the FFS, disable the previous JAR followed by a SFDL=2 command.
After 5 minutes, ATI1 shows that the latest firmware has been loaded.
I try to load the JAD file using the AT^SJAM=0,A:/JRC-1.56.58.jad command and get an error after a timeout of about 30 seconds, error unknown,
When I try to upgrade using the gWinSwup application to perform the same upgrade I get the error message
"ERROR: Installing MIDlet[JRC-1.56.58.jad] fail, check that there is no signature conflict!".
I can recover by going back to 3.001-14 which works well.
I did find a reference to this error in google but the issue there does not seem to apply here.
Hello,
Please write what exact firmware version you are tying to install (ATI1 reply). Please also check the free space on the module's file system.
Do you experience this problem on a single module or you have more? If the old firmware installs the module is most probably not failing here.
Regards,
Bartłomiej
I'm trying to update from 3.01-14 to 3.01-55.
I have all three files, usf, jad/jar, on the FFS but little room left ~700K.
The ATI1 command does show the the correct 3.01-55 version is present I just can't load and run the 1.56.58 java file which gives me the error above.
So far only performed this upgrade on a single test unit using FTP to load the file and commands executed via ASC0
Hello,
I think that free FFS space might be the case here even though the error description does not state that. JRC for ARN55 is a bit bigger than that for ARN14. During the installation the files are copied to a hidden space of the file system. So 700K free space is not enough. Please try to increase it.
Regards,
Bartłomiej
HI Bartłomiej,
How?
the file sizes are
USF 8,402,972 bytes
JAD 1,923 bytes
JAR 757,760 bytes
I can't try this with 3.01-14 because I only have the gWinSwup.exe but not the USF file.
With nothing on the FFS I get the following
appl> modem at^sfsa=gstat,a:/
appl> URC: at^sfsa=gstat,a:/
URC: ^SFSA: 11081728
URC: ^SFSA: 10344448
URC: ^SFSA: 0
URC: OK
so about 1M is gone before I start
Hello,
I think that you have to download these files separately. For instance download and update usf first and then after reboot delet usf and download JRC. Then reinstall JRC.
This module's FFS is not big enough for downloading all 3 of them for update purpose.
Regards,
Bartłomiej
The point is I'm trying to do a FOTA upgrade using the modem FFS. I follow all the steps in the FOTA spec yet get this error. I have limited storage in my micro and currently I'm using ASC0 for all the commands. Where has almost 1MB of the FFS gone? can I recover this? why does using the ARN55_gWinSWUP.exe fail with the error I indicated below, surely that should work ?
"ERROR: Installing MIDlet[JRC-1.56.58.jad] fail, check that there is no signature conflict!"
Also how do you perform the crc on the file, I've tried various CRC16 but all generate a different value than the one using the at^sfsa=crc,a:/SAM_6260.usf command. Do you have sample code for the calculation?
Hello,
at^sfsa=gstat,a:/ returns the storage size and free space. Even if you delete all data from a: drive there is some data on FFS that you can't see - installed applications (including JRC and SLAE factory apps) also resides on the flash file system, if these apps use record store (see java API) it also is stored on FFS and not visible on a: drive, some small amount of space is also used for certificates etc. So you will never see the free space equal to the storage space. As I have written before for remote firmware update scenario on this module you should download and install usf and JRC separately.
Please try to follow this scenario to test if it works. As for gWinSwup problem I don't know why there's this problem. Please try to empty FFS and do the test to exclude free space issue. Please also attach the log from gWinSwup - it should be created in the same folder.
As for CRC16 I have found an example:
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <sys/stat.h>
#define CRC_POLY 0x8408
#define FILE_NAME "test1.txt"
off_t fsize(const char *filename) {
struct stat st;
if (stat(filename, &st) == 0)
return st.st_size;
return -1;
}
uint16_t calculate_CRC16(char* pData, uint16_t wLength)
{
char i;
uint16_t wData;
uint16_t wCrc = 0xffff;
if (wLength == 0)
return (~wCrc);
do
{
for (i=0, wData=(unsigned int)0xff & *pData++; i < 8; i++, wData >>= 1)
{
if ((wCrc & 0x0001) ^ (wData & 0x0001))
wCrc = (wCrc >> 1) ^ CRC_POLY;
else wCrc >>= 1;
}
} while (--wLength);
wCrc = ~wCrc;
wData = wCrc;
return (wCrc);
}
int main()
{
uint16_t size = fsize(FILE_NAME);
//checking size of file
printf("Size of file is: %d \n", size);
//reading file
FILE *fp = NULL;
uint8_t * buff = NULL;
buff = (uint8_t *) malloc(size);
fp = fopen(FILE_NAME, "rb");
if (fp)
{
int k = 0;
int c;
while ((c = getc(fp)) != EOF)
{
buff[k] = c;
k++;
}
fclose(fp);
}
printf("\n");
fclose(fp);
//Calculating CRC
printf("Calculated crc: %d \n", calculate_CRC16(buff, size));
////////////////////////////////////////////
free(buff);
buff = NULL;
return 0;
}
Regards,
Bartłomiej