Problem witho OTA GPRS

Using OTA functions with Waspmote
libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Problem witho OTA GPRS

Post by libelium-dev » Mon Jul 17, 2017 9:28 am

Hi,

It is a weird issue. Please try to set the version to 10 and set the version to 11 in the UPGRADE.TXT file.

Code: Select all

  Utils.setProgramVersion(10);
  USB.print(F("Program version: "));
  USB.println(Utils.getProgramVersion(), DEC);
What API are you using?

Could you try to perform OTA using the example code and our FTP test sever?
Server: pruebas.libelium.com
WIFI user: w@libelium.com
GPRS user: tgprs@libelium.com
3G user: t3g@libelium.com
Pass: ftp1234
Port: 21
You can also try to change

Code: Select all

snprintf(FTP_file, sizeof(FTP_file), ".gprs%s", SD_file);

snprintf(buffer_GPRS, sizeof(buffer_GPRS), ".gprs%s", str_aux3);
by this one

Code: Select all

snprintf(FTP_file, sizeof(FTP_file), "%s", SD_file);

snprintf(buffer_GPRS, sizeof(buffer_GPRS), "%s", str_aux3);
inside requestOTA() function in order to not create the -gprs folder in the ftp server

Regards

koki
Posts: 84
Joined: Sun Sep 18, 2016 11:02 am

Re: Problem witho OTA GPRS

Post by koki » Mon Jul 17, 2017 12:10 pm

With regard to the API version, I updated to Waspmote Pro IDE v06 last week. I'm not sure if the latest IDE includes the latest API.
What is the easiest way to check the API version in use?

I tried with the specified program version settings, and with Libelium's FTP server.
I did not touch the source code of requestOTA(). I personally don't feel it a good idea to modify the source code since I'll have to apply the same (and all) modifications every time when a new API is released. I used the existing .gprs folder found on your FTP server, whose data looked old enough (one year old).
Following is the result of one loop. The specified program versions are recognized and even said "Downloading OTA FILE", but it ended with "Same program version, no OTA required" message without downloading the new program.

Code: Select all

E#
REPROGRAMMING ERROR
Program version: 10
Debug mode 1
not_ready: 1
not_ready: 1
not_ready: 0
Send command with 2 answers: AT+CMEE=1
Answer received: 1
Send command with 2 answers: ATE0
Answer received: 1
Send command with 2 answers: AT+CSCLK=0
Answer received: 1
Send command with 2 answers: AT+CFUN=1
Answer received: 1
GPRS_Pro module ready...
Connecting to the network
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Network status: 1
GPRS_Pro module connected to the network
Starting OTA process
Send command with 1 answer: AT+SAPBR=3,1,"CONTYPE","GPRS"
Answer received: 1
Send command with 1 answer: AT+SAPBR=3,1,"APN","internet"
Answer received: 1
Send command with 1 answer: AT+SAPBR=3,1,"USER",""
Answer received: 1
Send command with 1 answer: AT+SAPBR=3,1,"PWD",""
Answer received: 1
Send command with 1 answer: AT+SAPBR=5,1
Answer received: 1
Downloading OTA VER FILE
Send command with 1 answer: AT+CGREG?
Answer received: 1
GPRS status: 1
Send command with 2 answers: AT+SAPBR=1,1
Answer received: 1
Send command with 1 answer: AT+SAPBR=2,1
Answer received: 1
Send command with 2 answers: AT+FTPCID=1
Answer received: 1
Send command with 2 answers: AT+FTPMODE=1
Answer received: 1
Send command with 2 answers: AT+FTPTYPE="I"
Answer received: 1
Send command with 2 answers: AT+FTPSERV="pruebas.libelium.com"
Answer received: 1
Send command with 2 answers: AT+FTPPORT=21
Answer received: 1
Send command with 2 answers: AT+FTPUN="tgprs@libelium.com"
Answer received: 1
Send command with 2 answers: AT+FTPPW="ftp1234"
Answer received: 1
Inside readDataFTP
FTP file: .gprs/UPGRADE.TXT
SD file:/UPGRADE.TXT
Send command with 2 answers: AT+FTPSTATE
Answer received: 1
Inside FTPsize
Send command with 2 answers: AT+FTPSTATE
Answer received: 1
Send command with 2 answers: AT+FTPGETNAME="/UPGRADE.TXT"
Answer received: 1
Send command with 2 answers: AT+FTPGETPATH=".gprs"
Answer received: 1
Send command with 2 answers: AT+FTPSIZE
Answer received: 1
Size in FTP: 46
Send command with 2 answers: AT+FTPGETNAME="/UPGRADE.TXT"
Answer received: 1
Send command with 2 answers: AT+FTPGETPATH=".gprs"
Answer received: 1
Send command with 2 answers: AT+FTPGET=1
Answer received: 1
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 46
Bytes stored: 46/46
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 0
Inside FTPsize
Send command with 2 answers: AT+FTPSTATE
Answer received: 1
Send command with 2 answers: AT+FTPGETNAME="/UPGRADE.TXT"
Answer received: 1
Send command with 2 answers: AT+FTPGETPATH=".gprs"
Answer received: 1
Send command with 2 answers: AT+FTPSIZE
Answer received: 1
Size in FTP: 46
Return from readDataFTP: 1
ftp_size: 46
ftp_retries: 3
file size SD: 46
Send command with 2 answers: AT+SAPBR=0,1
Answer received: 1
OTA file: CLEARSD
File path: /
Version: 11
Downloading OTA FILE
Same program version, no OTA required
REPROGRAMMING ERROR
Program version: 10
Debug mode 1
Regards

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Problem witho OTA GPRS

Post by libelium-dev » Tue Jul 18, 2017 9:21 am

Hi,

Please make the above changes, .gprs is included in the library because it is necessary for perform OTA from Meshlium, but we always recommend delete it when OTA is performed from FTP (not Meshlium).

We have just done some test, we have used the following code and we have got the next output. Please try to run the code we share, not replace the files of the FTP server. What output do you get? Does it work? Just set your APN in the code.

Code: Select all

// include GPRS_Pro library
#include <WaspGPRS_Pro.h>

int answer, counter;
char apn[] = "";
char login[] = "";
char password[] = "";

void setup() {

  //Check if the program has been programmed succesfully
  answer = Utils.checkNewProgram();
  switch (answer)
  {
    case 0:
      USB.println(F("REPROGRAMMING ERROR"));
      break;
    case  1:
      USB.println(F("REPROGRAMMING OK"));
      break;
    default:
      USB.println(F("RESTARTING"));
  }
  USB.print(F("Program version: "));
  USB.println(Utils.getProgramVersion(), DEC);

  Utils.setProgramVersion(10);
  USB.print(F("New program version: "));
  USB.println(Utils.getProgramVersion(), DEC);
  
      USB.println(F("**************************"));
    // 1. sets operator parameters
    GPRS_Pro.set_APN(apn, login, password);
    // And shows them
    GPRS_Pro.show_APN();
    USB.println(F("**************************")); 


  // put your setup code here, to run once:

}


void loop() {

  //*****************************************************************
  //    User loop program
  //*****************************************************************

  // put your main code here, to run repeatedly:


  //*****************************************************************
  //    OTA standart loop
  //*****************************************************************

  //Starts the GPRS_Pro module
  answer = GPRS_Pro.ON();

  //Checks the start sequence: 1 for correct start and -3 for correct start with low battery level
  if ((answer == 1) || (answer == -3))
  {
    USB.println(F("GPRS_Pro module ready..."));
    USB.println(F("Connecting to the network"));

    answer = GPRS_Pro.check(60);

    if (answer == 1)
    {
      USB.println(F("GPRS_Pro module connected to the network"));
      USB.println(F("Starting OTA process"));

      answer = GPRS_Pro.requestOTA("pruebas.libelium.com", "21", "tgprs@libelium.com", "ftp1234");

      // If OTA process fails, show the error code
      USB.print(F("Error code:"));
      USB.println( answer, DEC);
    }
    else
    {
      USB.println(F("Error connecting to the network"));
    }
  }
  else
  {
    USB.println(F("Error starting the GPRS_Pro module"));
  }

  GPRS_Pro.OFF();
}
E#
REPROGRAMMING ERROR
Program version: 18
New program version: 10
**************************
APN: gprs-service.com
LOGIN:
PASSWORD:
**************************
Debug mode 1
not_ready: 1
not_ready: 1
not_ready: 0
Send command with 2 answers: AT+CMEE=1
Answer received: 1
Send command with 2 answers: ATE0
Answer received: 1
Send command with 2 answers: AT+CSCLK=0
Answer received: 1
Send command with 2 answers: AT+CFUN=1
Answer received: 1
GPRS_Pro module ready...
Connecting to the network
Send command with 1 answer: AT+CREG?
Answer received: 1
Network status: 1
GPRS_Pro module connected to the network
Starting OTA process
Send command with 1 answer: AT+SAPBR=3,1,"CONTYPE","GPRS"
Answer received: 1
Send command with 1 answer: AT+SAPBR=3,1,"APN","gprs-service.com"
Answer received: 1
Send command with 1 answer: AT+SAPBR=3,1,"USER",""
Answer received: 1
Send command with 1 answer: AT+SAPBR=3,1,"PWD",""
Answer received: 1
Send command with 1 answer: AT+SAPBR=5,1
Answer received: 1
Downloading OTA VER FILE
Send command with 1 answer: AT+CGREG?
Answer received: 1
Send command with 1 answer: AT+CGREG?
Answer received: 1
Send command with 1 answer: AT+CGREG?
Answer received: 1
GPRS status: 1
Send command with 2 answers: AT+SAPBR=1,1
Answer received: 1
Send command with 1 answer: AT+SAPBR=2,1
Answer received: 1
Send command with 2 answers: AT+FTPCID=1
Answer received: 1
Send command with 2 answers: AT+FTPMODE=1
Answer received: 1
Send command with 2 answers: AT+FTPTYPE="I"
Answer received: 1
Send command with 2 answers: AT+FTPSERV="pruebas.libelium.com"
Answer received: 1
Send command with 2 answers: AT+FTPPORT=21
Answer received: 1
Send command with 2 answers: AT+FTPUN="tgprs@libelium.com"
Answer received: 1
Send command with 2 answers: AT+FTPPW="ftp1234"
Answer received: 1
Inside readDataFTP
FTP file: /UPGRADE.TXT
SD file:/UPGRADE.TXT
Send command with 2 answers: AT+FTPSTATE
Answer received: 1
Inside FTPsize
Send command with 2 answers: AT+FTPSTATE
Answer received: 1
Send command with 2 answers: AT+FTPGETNAME="/UPGRADE.TXT"
Answer received: 1
Send command with 2 answers: AT+FTPGETPATH="/"
Answer received: 1
Send command with 2 answers: AT+FTPSIZE
Answer received: 1
Size in FTP: 42
Send command with 2 answers: AT+FTPGETNAME="/UPGRADE.TXT"
Answer received: 1
Send command with 2 answers: AT+FTPGETPATH="/"
Answer received: 1
Send command with 2 answers: AT+FTPGET=1
Answer received: 1
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 42
Bytes stored: 42/42
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 0
Inside FTPsize
Send command with 2 answers: AT+FTPSTATE
Answer received: 1
Send command with 2 answers: AT+FTPGETNAME="/UPGRADE.TXT"
Answer received: 1
Send command with 2 answers: AT+FTPGETPATH="/"
Answer received: 1
Send command with 2 answers: AT+FTPSIZE
Answer received: 1
Size in FTP: 42
Return from readDataFTP: 1
ftp_size: 42
ftp_retries: 3
file size SD: 42
Send command with 2 answers: AT+SAPBR=0,1
Answer received: 1
OTA file: UT_02_U
File path: /
Version: 11
Downloading OTA FILE
Send command with 1 answer: AT+CGREG?
Answer received: 1
GPRS status: 1
Send command with 2 answers: AT+SAPBR=1,1
Answer received: 1
Send command with 1 answer: AT+SAPBR=2,1
Answer received: 1
Send command with 2 answers: AT+FTPCID=1
Answer received: 1
Send command with 2 answers: AT+FTPMODE=1
Answer received: 1
Send command with 2 answers: AT+FTPTYPE="I"
Answer received: 1
Send command with 2 answers: AT+FTPSERV="pruebas.libelium.com"
Answer received: 1
Send command with 2 answers: AT+FTPPORT=21
Answer received: 1
Send command with 2 answers: AT+FTPUN="tgprs@libelium.com"
Answer received: 1
Send command with 2 answers: AT+FTPPW="ftp1234"
Answer received: 1
Inside readDataFTP
FTP file: //UT_02_U
SD file:UT_02_U
Send command with 2 answers: AT+FTPSTATE
Answer received: 1
Inside FTPsize
Send command with 2 answers: AT+FTPSTATE
Answer received: 1
Send command with 2 answers: AT+FTPGETNAME="/UT_02_U"
Answer received: 1
Send command with 2 answers: AT+FTPGETPATH="/"
Answer received: 1
Send command with 2 answers: AT+FTPSIZE
Answer received: 1
Size in FTP: 15950
Send command with 2 answers: AT+FTPGETNAME="/UT_02_U"
Answer received: 1
Send command with 2 answers: AT+FTPGETPATH="/"
Answer received: 1
Send command with 2 answers: AT+FTPGET=1
Answer received: 1
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 250/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 500/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 750/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 1000/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 1250/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 1500/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 1750/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 2000/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 2250/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 2500/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 2750/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 3000/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 3250/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 3500/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 3750/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 4000/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 4250/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 4500/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 4750/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 5000/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 5250/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 5500/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 5750/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 6000/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 6250/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 6500/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 6750/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 7000/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 7250/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 7500/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 7750/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 8000/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 8250/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 8500/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 8750/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 9000/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 9250/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 9500/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 9750/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 10000/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 10250/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 10500/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 10750/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 11000/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 11250/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 11500/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 11750/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 12000/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 12250/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 12500/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 12750/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 13000/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 13250/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 13500/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 13750/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 14000/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 14250/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 14500/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 14750/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 15000/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 15250/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 15500/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 15750/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 200
Bytes stored: 15950/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 0
Inside FTPsize
Send command with 2 answers: AT+FTPSTATE
Answer received: 1
Send command with 2 answers: AT+FTPGETNAME="/UT_02_U"
Answer received: 1
Send command with 2 answers: AT+FTPGETPATH="/"
Answer received: 1
Send command with 2 answers: AT+FTPSIZE
Answer received: 1
Size in FTP: 15950
Return from readDataFTP: 1
ftp_size: 15950
ftp_retries: 3
file size SD: 15950
Send command with 2 answers: AT+SAPBR=0,1
Answer received: 1
FILE1.TXT 0
FILE3.TXT 60
FILE4.TXT 279
FOLDER1/
FOLD1/
WA0000 12025
WA0001 0
WA0002 0
WA0003 0
WA0004 0
WA0005 0
WA0006 0
WA0007 0
WA0008 0
WA0009 0
WA0010 0
WA0011 0
WA0012 0
WA0013 0
WA0014 0
WA0015 0
WA0016 0
WA0017 0
WA0018 0
WA0019 16680
WA0020 0
WA0021 16680
WA0022 16680
WA0023 16680
WA0024 0
WA0025 0
WA0026 16680
WA0027 0
WA0028 0
WA0029 0
WA0030 0
WA0031 0
EPHEM.TXT 7
UPGRADE.TXT 42
UT_02_U 15950
E#
Regards

koki
Posts: 84
Joined: Sun Sep 18, 2016 11:02 am

Re: Problem witho OTA GPRS

Post by koki » Tue Jul 18, 2017 11:33 am

After I have deleted the ".gprs" paths in WaspGPRS_Pro_core.cpp, OTA seems to work. Here is the log message.
E#
REPROGRAMMING ERROR
Program version: 1
New program version: 10
**************************
APN: internet
LOGIN:
PASSWORD:
**************************
Debug mode 1
not_ready: 1
not_ready: 1
not_ready: 0
Send command with 2 answers: AT+CMEE=1
Answer received: 1
Send command with 2 answers: ATE0
Answer received: 1
Send command with 2 answers: AT+CSCLK=0
Answer received: 1
Send command with 2 answers: AT+CFUN=1
Answer received: 1
GPRS_Pro module ready...
Connecting to the network
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Network status: 1
GPRS_Pro module connected to the network
Starting OTA process
Send command with 1 answer: AT+SAPBR=3,1,"CONTYPE","GPRS"
Answer received: 1
Send command with 1 answer: AT+SAPBR=3,1,"APN","internet"
Answer received: 1
Send command with 1 answer: AT+SAPBR=3,1,"USER",""
Answer received: 1
Send command with 1 answer: AT+SAPBR=3,1,"PWD",""
Answer received: 1
Send command with 1 answer: AT+SAPBR=5,1
Answer received: 1
Downloading OTA VER FILE
Send command with 1 answer: AT+CGREG?
Answer received: 1
GPRS status: 1
Send command with 2 answers: AT+SAPBR=1,1
Answer received: 1
Send command with 1 answer: AT+SAPBR=2,1
Answer received: 1
Send command with 2 answers: AT+FTPCID=1
Answer received: 1
Send command with 2 answers: AT+FTPMODE=1
Answer received: 1
Send command with 2 answers: AT+FTPTYPE="I"
Answer received: 1
Send command with 2 answers: AT+FTPSERV="pruebas.libelium.com"
Answer received: 1
Send command with 2 answers: AT+FTPPORT=21
Answer received: 1
Send command with 2 answers: AT+FTPUN="tgprs@libelium.com"
Answer received: 1
Send command with 2 answers: AT+FTPPW="ftp1234"
Answer received: 1
Inside readDataFTP
FTP file: /UPGRADE.TXT
SD file:/UPGRADE.TXT
Send command with 2 answers: AT+FTPSTATE
Answer received: 1
Inside FTPsize
Send command with 2 answers: AT+FTPSTATE
Answer received: 1
Send command with 2 answers: AT+FTPGETNAME="/UPGRADE.TXT"
Answer received: 1
Send command with 2 answers: AT+FTPGETPATH="/"
Answer received: 1
Send command with 2 answers: AT+FTPSIZE
Answer received: 1
Size in FTP: 42
Send command with 2 answers: AT+FTPGETNAME="/UPGRADE.TXT"
Answer received: 1
Send command with 2 answers: AT+FTPGETPATH="/"
Answer received: 1
Send command with 2 answers: AT+FTPGET=1
Answer received: 1
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 42
Bytes stored: 42/42
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 0
Inside FTPsize
Send command with 2 answers: AT+FTPSTATE
Answer received: 1
Send command with 2 answers: AT+FTPGETNAME="/UPGRADE.TXT"
Answer received: 1
Send command with 2 answers: AT+FTPGETPATH="/"
Answer received: 1
Send command with 2 answers: AT+FTPSIZE
Answer received: 1
Size in FTP: 42
Return from readDataFTP: 1
ftp_size: 42
ftp_retries: 3
file size SD: 42
Send command with 2 answers: AT+SAPBR=0,1
Answer received: 1
OTA file: UT_02_U
File path: /
Version: 11
Downloading OTA FILE
Send command with 1 answer: AT+CGREG?
Answer received: 1
GPRS status: 1
Send command with 2 answers: AT+SAPBR=1,1
Answer received: 1
Send command with 1 answer: AT+SAPBR=2,1
Answer received: 1
Send command with 2 answers: AT+FTPCID=1
Answer received: 1
Send command with 2 answers: AT+FTPMODE=1
Answer received: 1
Send command with 2 answers: AT+FTPTYPE="I"
Answer received: 1
Send command with 2 answers: AT+FTPSERV="pruebas.libelium.com"
Answer received: 1
Send command with 2 answers: AT+FTPPORT=21
Answer received: 1
Send command with 2 answers: AT+FTPUN="tgprs@libelium.com"
Answer received: 1
Send command with 2 answers: AT+FTPPW="ftp1234"
Answer received: 1
Inside readDataFTP
FTP file: //UT_02_U
SD file:UT_02_U
Send command with 2 answers: AT+FTPSTATE
Answer received: 1
Inside FTPsize
Send command with 2 answers: AT+FTPSTATE
Answer received: 1
Send command with 2 answers: AT+FTPGETNAME="/UT_02_U"
Answer received: 1
Send command with 2 answers: AT+FTPGETPATH="/"
Answer received: 1
Send command with 2 answers: AT+FTPSIZE
Answer received: 1
Size in FTP: 15950
Send command with 2 answers: AT+FTPGETNAME="/UT_02_U"
Answer received: 1
Send command with 2 answers: AT+FTPGETPATH="/"
Answer received: 1
Send command with 2 answers: AT+FTPGET=1
Answer received: 1
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 250/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 500/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 750/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 1000/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 1250/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 1500/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 1750/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 2000/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 2250/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 2500/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 2750/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 3000/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 3250/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 3500/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 3750/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 4000/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 4250/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 4500/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 4750/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 5000/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 5250/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 5500/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 5750/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 6000/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 6250/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 6500/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 6750/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 7000/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 7250/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 7500/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 7750/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 8000/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 8250/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 8500/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 8750/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 9000/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 9250/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 9500/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 9750/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 10000/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 10250/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 10500/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 10750/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 11000/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 11250/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 11500/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 11750/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 12000/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 12250/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 12500/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 12750/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 13000/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 13250/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 13500/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 13750/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 14000/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 14250/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 14500/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 14750/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 15000/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 15250/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 15500/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 250
Bytes stored: 15750/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 200
Bytes stored: 15950/15950
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 0
Inside FTPsize
Send command with 2 answers: AT+FTPSTATE
Answer received: 1
Send command with 2 answers: AT+FTPGETNAME="/UT_02_U"
Answer received: 1
Send command with 2 answers: AT+FTPGETPATH="/"
Answer received: 1
Send command with 2 answers: AT+FTPSIZE
Answer received: 1
Size in FTP: 15950
Return from readDataFTP: 1
ftp_size: 15950
ftp_retries: 3
file size SD: 15950
Send command with 2 answers: AT+SAPBR=0,1
Answer received: 1
LOG.TXT 129
UPGRADE.TXT 42
DEVICE.TXT 0
LOCATION.TXT 32
UT_02_U 15950
E#
REPROGRAMMING OK
Program version: 11
New program version: 10
**************************
APN: internet
LOGIN:
PASSWORD:
**************************
...
The message from the restarted program (UT_02_U) looks as the same with the first one. Should it be like that?

koki
Posts: 84
Joined: Sun Sep 18, 2016 11:02 am

Re: Problem witho OTA GPRS

Post by koki » Tue Jul 18, 2017 7:50 pm

When I try with our own FTP server, I get the following message when downloading the OTA file, and OTA does not complete.
OTA file: CLEARSD
File path: /
Version: 12
Downloading OTA FILE
Send command with 1 answer: AT
Answer received: 0
Send command with 1 answer: AT
Answer received: 0
...
Comparing to my previous message (with Libelium's FTP server), I observe the first command is changed from "AT+CGREG?" to "AT".
How can I solve this problem?

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Problem witho OTA GPRS

Post by libelium-dev » Wed Jul 19, 2017 10:47 am

Hi,

It is a weird issue. UT_02_U is the following code, so it shouldn't show anything through the serial monitor.

Code: Select all

void setup()
{
}

void loop()
{
  ////////////////////////////////////////////////////////
  // 1. Setting LEDs ON
  ////////////////////////////////////////////////////////  
  Utils.setLED(LED0, LED_ON);
  Utils.setLED(LED1, LED_ON);  
  delay(2000);

  ////////////////////////////////////////////////////////    
  // 2. Setting LEDs OFF
  ////////////////////////////////////////////////////////  
  Utils.setLED(LED0, LED_OFF);
  delay(1000);
  Utils.setLED(LED1, LED_OFF);
  delay(1000);
  
  ////////////////////////////////////////////////////////  
  // 3. Blink both LEDs once (during 1 second)
  ////////////////////////////////////////////////////////  
  Utils.blinkLEDs(1000);
  
  //////////////////////////////////////////////////////// 
  // 4. Blink LEDs separately for 5 times, during 200ms each time
  ////////////////////////////////////////////////////////  
  Utils.blinkGreenLED(200, 5);
  Utils.blinkRedLED(200, 5);
}
Please try to format the SD card (SD 12: Format SD) and try to perform OTA using our server and files again. First we want to solve the issue to performing OTA and then we will try to solve the issue with your ftp server.

Regards

koki
Posts: 84
Joined: Sun Sep 18, 2016 11:02 am

Re: Problem witho OTA GPRS

Post by koki » Wed Jul 19, 2017 11:27 am

OK, when I checked the contents in the SD card, I found some garbled file names...
I formatted the card, and then ran the example OTA code with Libelium's FTP server. It worked (the log messages were same as before), and the firmware was also updated properly. I observed the LED of the device blinking. Thank you so far.

Then I formatted the SD card again, and tried OTA with our FTP server. I observed the same result as before, i.e.
Downloading OTA FILE
Send command with 1 answer: AT
Answer received: 0
...
Next step?

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Problem witho OTA GPRS

Post by libelium-dev » Wed Jul 19, 2017 11:46 am

Hi,

Please post all output you get using your ftp server.

Regards

koki
Posts: 84
Joined: Sun Sep 18, 2016 11:02 am

Re: Problem witho OTA GPRS

Post by koki » Wed Jul 19, 2017 12:08 pm

Now I have compiled UT_02_U, and set up the same environment at our FTP server.
The content in UPGRADE.TXT file is also same except the SIZE, which is 15918 in my OTA_FILE folder.
Please find the OTA program log below. It now says "Same program version, no OTA required" and just restart the program itself.
E#
REPROGRAMMING ERROR
Program version: 10
New program version: 10
**************************
APN: internet
LOGIN:
PASSWORD:
**************************
Debug mode 1
not_ready: 1
not_ready: 1
not_ready: 0
Send command with 2 answers: AT+CMEE=1
Answer received: 1
Send command with 2 answers: ATE0
Answer received: 1
Send command with 2 answers: AT+CSCLK=0
Answer received: 1
Send command with 2 answers: AT+CFUN=1
Answer received: 1
GPRS_Pro module ready...
Connecting to the network
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Send command with 1 answer: AT+CREG?
Answer received: 1
Network status: 1
GPRS_Pro module connected to the network
Starting OTA process
Send command with 1 answer: AT+SAPBR=3,1,"CONTYPE","GPRS"
Answer received: 1
Send command with 1 answer: AT+SAPBR=3,1,"APN","internet"
Answer received: 1
Send command with 1 answer: AT+SAPBR=3,1,"USER",""
Answer received: 1
Send command with 1 answer: AT+SAPBR=3,1,"PWD",""
Answer received: 1
Send command with 1 answer: AT+SAPBR=5,1
Answer received: 1
Downloading OTA VER FILE
Send command with 1 answer: AT+CGREG?
Answer received: 1
Send command with 1 answer: AT+CGREG?
Answer received: 1
Send command with 1 answer: AT+CGREG?
Answer received: 1
Send command with 1 answer: AT+CGREG?
Answer received: 1
Send command with 1 answer: AT+CGREG?
Answer received: 1
Send command with 1 answer: AT+CGREG?
Answer received: 1
Send command with 1 answer: AT+CGREG?
Answer received: 1
Send command with 1 answer: AT+CGREG?
Answer received: 1
Send command with 1 answer: AT+CGREG?
Answer received: 1
GPRS status: 1
Send command with 2 answers: AT+SAPBR=1,1
Answer received: 1
Send command with 1 answer: AT+SAPBR=2,1
Answer received: 1
Send command with 2 answers: AT+FTPCID=1
Answer received: 1
Send command with 2 answers: AT+FTPMODE=1
Answer received: 1
Send command with 2 answers: AT+FTPTYPE="I"
Answer received: 1
Send command with 2 answers: AT+FTPSERV="ftp_server_name"
Answer received: 1
Send command with 2 answers: AT+FTPPORT=21
Answer received: 1
Send command with 2 answers: AT+FTPUN="ftp_user_name"
Answer received: 1
Send command with 2 answers: AT+FTPPW="ftp_password"
Answer received: 1
Inside readDataFTP
FTP file: /UPGRADE.TXT
SD file:/UPGRADE.TXT
Send command with 2 answers: AT+FTPSTATE
Answer received: 1
Inside FTPsize
Send command with 2 answers: AT+FTPSTATE
Answer received: 1
Send command with 2 answers: AT+FTPGETNAME="/UPGRADE.TXT"
Answer received: 1
Send command with 2 answers: AT+FTPGETPATH="/"
Answer received: 1
Send command with 2 answers: AT+FTPSIZE
Answer received: 1
Size in FTP: 41
Send command with 2 answers: AT+FTPGETNAME="/UPGRADE.TXT"
Answer received: 1
Send command with 2 answers: AT+FTPGETPATH="/"
Answer received: 1
Send command with 2 answers: AT+FTPGET=1
Answer received: 1
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 41
Bytes stored: 41/41
Send command with 2 answers: AT+FTPGET=2,250
Answer received: 1
FTP data: 0
Inside FTPsize
Send command with 2 answers: AT+FTPSTATE
Answer received: 1
Send command with 2 answers: AT+FTPGETNAME="/UPGRADE.TXT"
Answer received: 1
Send command with 2 answers: AT+FTPGETPATH="/"
Answer received: 1
Send command with 2 answers: AT+FTPSIZE
Answer received: 1
Size in FTP: 41
Return from readDataFTP: 1
ftp_size: 41
ftp_retries: 3
file size SD: 41
Send command with 2 answers: AT+SAPBR=0,1
Answer received: 1
OTA file: UT_02_U
File path: /
Version: 11
Downloading OTA FILE
Same program version, no OTA required
RESTARTING
Program version: 10
New program version: 10
**************************
APN: internet
LOGIN:
PASSWORD:
**************************

libelium-dev
Posts: 27967
Joined: Mon Sep 28, 2009 1:06 pm

Re: Problem witho OTA GPRS

Post by libelium-dev » Thu Jul 20, 2017 11:47 am

Hi,

Please include the following lines of code inside WaspGPRS_Prp_core.cpp file in order to see more debug details and copy the output again. You have to include this in requestOTA() function between Utils.getProgramID(programID); (line 7096) and // check if the program have a new version or if it is a different code

Code: Select all

						....
						
							Utils.getProgramID(programID);
							
							#if GPRS_debug_mode>0
								USB.print(F("aux_name: "));
								USB.println(aux_name);
								USB.print(F("programID: "));
								USB.println(programID);
								USB.print(F("version: "));
								USB.println(version, DEC);
								USB.print(F("Utils.getProgramVersion(): "));
								USB.println(Utils.getProgramVersion(), DEC);
							#endif
							
							// check if the program have a new version or if it is a different code
							if (((strcmp(aux_name, programID) == 0) && (version > Utils.getProgramVersion())) || (strcmp(aux_name, programID) != 0))
							{
							....
Regards

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest