This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

OTA Error Retrying

Hi everybody,

I'm trying to run an "ota_update" example following the instructions set in "Over-The-Air (OTA) Update" document. I did Dropbox app and  I builded the appropiate directory, but when i run the application, appears the next message "Error Retrying"

My code at otaconfig.h is:

#define OTA_SERVER_NAME                 "api.dropbox.com"
#define OTA_SERVER_IP_ADDRESS           0x00000000
#define OTA_SERVER_SECURED              1
#define OTA_SERVER_REST_UPDATE_CHK      "/1/metadata/auto/" // returns files/folder list
#define OTA_SERVER_REST_RSRC_METADATA   "/1/media/auto"     // returns A url that serves the media directly
#define OTA_SERVER_REST_HDR             "Authorization: Bearer "
#define OTA_SERVER_REST_HDR_VAL         "My acces token is here"
#define LOG_SERVER_NAME                 "api-content.dropbox.com"
#define OTA_SERVER_REST_FILES_PUT       "/1/files_put/auto/"
#define OTA_VENDOR_STRING               "Vid01_Pid00_Ver00"

And my three folders in the Dropbox api are:


Vid01_Pid00_Ver0087
Vid01_Pid00_Ver0088
Vid01_Pid00_Ver0188

I'm sure that something of these things are wrong. Could you help me?

Thanks,

  • Hi Oscar,

    Can you please confirm that you have right application/service pack files in right folders in the drop box? Please follow section '4.3 Configuring the application for new Dropbox account' in the OTA application Note.

    Regards,
    Raghavendra
  • Thanks Raghavendra,

    Below you can see the files that I put into every folder. Specifically I'm not sure about the content of the first folder, although any of them would be incorrect.

    Vid01_Pid00_Ver0087
    - f00_sys_servicepack.sig
    - f43_sys_servicepack.ucf

    Vid01_Pid00_Ver0088
    - f80_sys_mcuimgA.bin

    Vid01_Pid00_Ver0188
    - f80_sys_mcuimgA.bin

    Regards,
    Oscar.
  • I am having the same problem.

    The application note is not even close to properly explaining what to place in each folder and needs to be revised.

    I have followed all steps as described but the example does not work.

    Could you provide us with some extended information.

    To be more precise, what should be placed in the Vid01_Pid00_Ver0087 folder ? The binary of the latest service pack exactly as it is downloaded ? Should it be renamed to something ?

    And one more thing I didn't understand.

    In the OTA example, why do we upload the binary with application version 1 in Vid01_Pid00_Ver0088 and the binary with application version 0 to Vid01_Pid00_Ver0188 , shouldn't it be the other way around ?

  • Looking at the documentation again and according to the service pack version (showed at the console), I realize that my dropbox folders should be different name and first folder should contain only the f43_sys_servicepack.ucf file. So, I changed my dropbox directory as below:

    Vid01_Pid00_Ver0002
    - f43_sys_servicepack.ucf

    Vid01_Pid00_Ver0003
    - f80_sys_mcuimgA.bin

    Vid01_Pid00_Ver003
    - f80_sys_mcuimgA.bin

    But it still doesn't work. What will be wrong?

    Thanks and regards.

    Oscar.
  • Hi Oscar, Pavlos,

    1. Before placing the new service pack (version "88" as illustrated in the example) in Vid01_Pid00_Ver0087, you should make sure that the current service pack on the device is indeed with version "87". (The 4th byte in the version should be 87). Is it 87 in your case? If not, you should host the new service pack in a folder "Vid01_Pid00_Ver00<4th byte of sp version>".

    2. In folder "Vid01_Pid00_Ver00<4th byte of sp version>", you should place the servicepack and signature file corresponding to next version (i.e, 88 as per example). As rightly done above, it should be
    - f00_sys_servicepack.sig
    - f43_sys_servicepack.ucf

    3. You upload the next version of the application binary in "Vid01_Pid00_Ver0088" because, the device still has application with version "00" in it. But the servicepack is now updated to the newer version "88". After this, the new application is updated and the new application version is "01" and the service pack version is "88". And hence from now on you will start looking into "Vid01_Pid00_Ver0188" for the next service pack version / application version. Steps 5 to 8 in section 4.3 is just for illustration.

    If you have both service pack and application to be updated, you should first update service pack and then update the application image. If you do not have the service pack to be updated, update only the application image.

    Please check the sequence diagram in section 4.4.3 for clear understanding.

    Regards,
    Raghavendra
  • I managed to make the example work. Here is what I did.

    First of all, I have downloaded and burned the latest service pack to the device.

    Now I have the following folders and contents on Dropbox.

    Vid01_Pid00_Ver0001
    - f43_sys_servicepack.ucf  

    (this is the latest service pack which is already burned on the device, version of latest service pack is 02 so this will be programmed only if service pack with ver 01 is in the device)

    Vid01_Pid00_Ver0002
    - f80_sys_mcuimgA.bin  

    this is the binary that will be updated from version 00, it is not the one burned on the device , this has  the definitions

    #define OTA_VENDOR_STRING               "Vid01_Pid00_Ver01"

    #define APP_VER_BUILD           1


    Vid01_Pid00_Ver0102
    - f80_sys_mcuimgA.bin

    this is the binary that is burned on the device , it will be update only if device is running firmware version 01, this has the definitions

    #define OTA_VENDOR_STRING               "Vid01_Pid00_Ver00"

    #define APP_VER_BUILD           0

    Using these binaries and folder structure, you should be able to achieve OTA updates. When device is programmed with ver 00 binary , on first update it will update to ver 01 binary. When updating again it will go to ver 00 binary, so sequential updates ping-pong between version 00 and 01 of the binaries.

    Hope this helps.

  • I believe that the confusion was due to the fact that the latest service I have downloaded does is not version 87 nor 88. It's 02.

    To be exact, I downloaded the and installed the service that corresponds to this folder : CC31xx_CC32xx_ServicePack_1.0.0.10.0

    This service pack has Nwp version : 2.4.0.2.31.1.3.0.1.1.0.3.34.

    However in the installation folder of the service pack I am unable to find a .sig file.

    Can I download that from somewhere ?
  • Hi Pavlos,

    In the service pack release package, you can see 'ota_1.0.0.10.0.ucf.signed.bin'. This is the signature file. Please rename it accordingly.

    Regards,
    Raghavendra
  • Many thanks to both of you.

    I changed my folder names for the same of you, Pavlos, because according to "Nwp Version" field in the console, my service pack version is also 2. Acording to this changes, my folder and files are the below:

    Vid01_Pid00_Ver0001

    - f00_sys_servicepack.sig

    - f43_sys_servicepack.ucf

    Vid01_Pid00_Ver0002

    - f80_sys_mcuimgA.bin

    Vid01_Pid00_Ver0102

    - f80_sys_mcuimgA.bin

    But the resault is the same, at the console you can see "Error Retrying..." message alternating with "In Progress..." message.

    It will be a problem with Dropbox account? or with the token?

    Thank you once again, Oscar.

  • Did you try creating a new token?

    I had the same issue but it was resolved once I created a new token.

  • Thanks Pavlos,

    I already had this change, but just in case, I've just do again. Unfortunately everything stays the same.
  • Hi Raghavendra, Pablos

    This is the aspect of my settings in Dropbox

    Do you have the same configuration? Or there are something wrong?

    Thanks and regards.

  • Hi,

    Please enable 'DEBUG_PRINT' in extlibs_common.h to understand at what step this is failing for you.

    Regards,
    Raghavendra
  • Hi Raghavendra,

    I've just enable DEBUG_PRINT adding line #define DEBUG_PRINT at the file extlibs_common.h. But in my code, this line only enable the "Report" function,  and this only prints the same lines that printed before (the same as you can see in my console screenshots). So, is this correct? or Have I some errors in my example code?

    Below, the result of search "Report" references at the project:

    Should "Report" function show more lines?

    Thanks and regards.

  • Hi Oscar,

    This would enable logs inside the OTA library. That is, it enables logs for source code inside 'cc3200-sdk\simplelink_extlib\ota'.

    Regards,
    Raghavendra
  • Thanks Raghavendra,

    I enabled logs inside the OTA library and disable function call "TaskCreate(DisplayTask, NULL)" in the main.c of the example code. So now the console show this lines:

    sl_extLib_OtaInit: OTA lib version = 1.00
    _ReadStatFile: ERROR in sl_FsOpen, status=-11
    sl_extLib_OtaRun: call OtaClient_ConnectServer OTA server=api.dropbox.com
    OtaClient_ConnectServer: http_connect_server api.dropbox.com
    sl_extLib_OtaRun: OtaClient_UpdateCheck, vendorStr=Vid01_Pid00_Ver0002
    OtaClient_UpdateCheck: call http_build_request /1/metadata/auto/
    _OtaCleanToIdle: close OTA client and CDN client and back to IDLE
    sl_extLib_OtaRun ERROR: OtaClient_UpdateCheck

    According to fs.h file, ERROR in sl_FsOpen, status=-11 is SL_FS_ERR_FILE_NOT_EXISTS. So it could be some problem with the files at dropbox?
  • Hi Oscar,

    It must be mismatch with either folder name or the files. Please reconfirm that folder "Vid01_Pid00_Ver0002" is indeed present on the dropbox.
    Error -11 is not the issue here. The OtaClient_UpdateCheck has failed, which indicates that there is an issue with folder/files on the dropbox.

    Please add the below log in the beginning of 'json_parse_dropbox_metadata' to get more information about the data returned by dropbox server. And run the test again.
    Report("Buf: %s\n\r", read_buf);

    Regards,
    Raghavendra
  • Hi Raghavendra,

    After reconfirm "Vid01_Pid00_Ver0002" folder was present on the dropbox, I put the additional report on the 'json_parse_dropbox_metadata'. This report showed the next information:

    "error": "The given OAuth 2 access token doesn't exist or has expired."

    So, I decided to retry with another token (again), and finally the aplication runs correctly.

    Thank you for all your support! Regards.

    Oscar.
  • Hi,


    I followed all procedure as you mentioned above but it is giving problem like RUN_STAT_ERROR_RESOURCE_LIST -4 problem can you help me what can I may had done the mistake.

    I used CC31xx_CC32xx_ServicePack_1.0.0.10.0

    which is lead to use the folder last extension with application version XX and service pack version YY

    Vid01_Pid00_VerXXYY

    ex:

    Vid01_Pid00_Ver0002

    Vid01_Pid00_Ver0102

    Service pack folder as like you used above same

    Vid01_Pid00_Ver0001

    Naming and all conversion as same as you mentioned above. But I am facing ( -4 ) RUN_STAT_ERROR_RESOURCE_LIST.

    Please help me.

    Thanks in advance.

  • Hi Pavlos Stavrou,

    new token? Do you mean what is the new token?
    Thanks.