1 2 Previous Next 29 Replies Latest reply on Aug 26, 2020 10:46 PM by MuraliR_36

    About malfunction after update

    hiko_4316286

      The following log is output and the program does not work

      Please refer to the confirmation items and answer

       

      ・Log

        ************************************************** **

        ** ERROR: WLAN: could not download clm_blob file

        ** FATAL ERROR: system unusable, CLM blob file not found or corrupted.

        ************************************************** **

       

      ·Checklist

      When updating with OTA, the "Current Application" area is rewritten, but the "File System Image" of "External Flash" is not rewritten (because of ReadOnly).

       

      Therefore, if you update the software that rewrites [\43xxx_Wi-Fi\resources\firmware\4343W\4343WA1.bin]

      I think that the error occurs because "File System Image" of "External Flash" is not rewritten and only "Current Application" is rewritten.

      *Maybe there is an error in wwd_process_clm_data()

       

      Is the understanding correct?

      And is there a solution?

        • 1. Re: About malfunction after update
          MuraliR_36

          Hello hiko_4316286

           

          The ota_fr application by default only performs the application update and doesn't perform the firmware update. So i'm guessing that there are some changes which have been made to update the firmware. Is it possible to share the modified application?

          Also from the logs, i see that the error is with the BLOB file. Whenever an application gets built, the CLM BLOB also goes into the filesystem.bin in the build directory. Correct me if i'm wrong here but i think that you trying to update the firmware with \43xxx_Wi-Fi\resources\firmware\4343W\4343WA1.bin which is the reason i think that you are getting the error. Try updating using the filesystem.bin file and the error should go away.

           

          Thanks

          • 2. Re: About malfunction after update
            hiko_4316286
            The ota_fr application by default only performs the application update and doesn't perform the firmware update. So i'm guessing that there are some changes which have been made to update the firmware. Is it possible to share the modified application?

            ->Hello MuraliR_36

             

            Regarding OTA, there is no change from the default mechanism.

            Performs application updates only, no firmware updates.

             

            In this situation, changing [4343WA1.bin] and updating with the build result (application binary) causes a problem.

             

            I'm guessing that "wwd_process_clm_data ()" causes an error because only the application is updated and the external flash is not updated. Is there a solution?

             

             

            ■ Supplementary information

            -About the difference before and after the update, only the difference of 4343WA1.bin

              Differences between 4343WA1.bin before and after update are as follows

              [1] Before update: 4343WA1.bin was originally included in WICED

              [2] After update: Software that was obtained by another route and changed the heat protection temperature setting from 80℃ to 100℃

             

              (Confirmation status)

              *If the software of [2] is updated by OTA for the module for which the software of [1] is updated, a problem will occur.

              *If the software of [1] is updated in OTA for the module for which the software of [1] is updated, it will start normally.

              *For modules for which the software of [2] has been updated (updated with WICED Studio), if the software of [2] is updated with OTA, it will start normally.

             

            Thanks

            • 3. Re: About malfunction after update
              hiko_4316286

              There is additional confirmation

              On page 3 of WICED-Resource-Filesystem.pdf, "The Resource Filesystem stores data in the FLASH that the Application will use during runtime. It is expected that the data stored in the filesystem is not to be changed over the lifecycle of the device. ."It has been described as.
              -Is "File System Image" an area that cannot be updated?

              -If I ignore the error in wwd_process_clm_data() or disable the function, is there a problem in operation?
              (I do not understand what kind of problem occurs because I do not understand the contents of wwd_process_clm_data())

              • 4. Re: About malfunction after update
                hiko_4316286

                Sorry to bother you again.

                Is there anything else that OTA cannot rewrite like this time?

                If so, is that data likely to be updated due to vulnerability countermeasures?

                • 5. Re: About malfunction after update
                  MuraliR_36

                  Hello hiko_4316286

                   

                  I apologize for the delayed response.

                  I assumed that there were some changes made to receive the .bin file in the firmware update. By default, to do the update in ota_fr, the application stripped.elf needs to used(available at /43xxx_Wi-Fi/build/cleaned build string/binary/cleaned build string.stripped.elf) and not the .bin file. This is because all applications that are downloaded in WICED are downloaded in the striped.elf format

                   

                  Is "File System Image" an area that cannot be updated?

                  --> The ota_fr application can't update the device firmware. What is the host processor being used along with the 4343. This is because if the host processor has sufficient memory, then OTA2 can be considered as an option as this does both the firmware and the application update. Please refer to Over The Air update in CYW43907 , OTA Method for CYW43438+STM32F412 and it may provide further insights.

                   

                  -If I ignore the error in wwd_process_clm_data() or disable the function, is there a problem in operation?

                  --> The wwd_process_clm_data() is responsible for processing the .clm_blob file available at /43xxx_Wi-Fi/resources/firmware/4343W and this file contains critical regulatory information which is needed for the functioning of the WLAN chip. So this function is needed.

                  To get more information on where the issue is being thrown in wwd_process_clm_data() you could enable the below in wiced_defaults.h at /43xxx_Wi-Fi/include

                  #define WPRINT_ENABLE_WWD_INFO       

                  #define WPRINT_ENABLE_WWD_DEBUG

                  #define WPRINT_ENABLE_WWD_ERROR

                   

                  Is there anything else that OTA cannot rewrite like this time?

                  -->The ota_fr app only overwrites the application file.

                   

                  If so, is that data likely to be updated due to vulnerability countermeasures?

                  --> I'm assuming that you are referring to doing a firmware updates as and when vulnerabilities arise. By default, the firmware can't be updated when using OTA. Although looks like this issue was reported earlier and there was a fix provided by the community at Re: Updating 4343W wifi firmware for our module via OTA . The fix may work but hasn't gone through standard testing procedures at cypress.

                   

                  Thanks

                  1 of 1 people found this helpful
                  • 6. Re: About malfunction after update
                    hiko_4316286

                    Hello MuraliR_36

                     

                    Thank you for your answer.

                    And I'm sorry to bother you again.

                     

                    If APPS.bin does not change for external flash data, the following error will not occur even if the filesystem.bin file size changes?

                     

                    ・Error

                    ************************************************** **

                    ** ERROR: WLAN: could not download clm_blob file

                    ** FATAL ERROR: system unusable, CLM blob file not found or corrupted.

                    ************************************************** **

                     

                    Thanks

                    • 7. Re: About malfunction after update
                      MuraliR_36

                      hiko_4316286 No issues. Always happy to help  . Is it possible for you to share the application that you are using and provide me with the steps that you are performing to do the OTA update so that i can clear the doubts that you have and figure out if there are any mistakes in the process in a better way.

                      1 of 1 people found this helpful
                      • 8. Re: About malfunction after update
                        hiko_4316286

                        I'm sorry. The application cannot be shared due to security concerns.

                        The flow of problem occurrence is as follows (Please point out any errors).

                          -4343WA1.bin is replaced and build, filesystem.bin changes.

                          -If you update in this state, only the application part will be updated and the external Flash will remain as it was.

                           *Because the firmware cannot be updated with OTA.

                          -After updating, an error will occur at the same time after restart.

                           * It seems that there is an error because there is a difference between the application and the external Flash address.

                         

                        I think that if APPS.bin does not change, it will work even if the size of filesystem.bin is different. Is this recognition correct?

                        • 9. Re: About malfunction after update
                          hiko_4316286

                          I will supplement the above question.

                          *Edited the contents and added the details.

                           

                          ■Prerequisites

                          It is estimated that APPS.bin has an area that stores the address of "File System Image".

                           

                          At this time, when each module is built, the same APPS.bin is generated in V1 and V3, and different APPS.bin is generated in V1 and V2.

                           

                          The size of filesystem.bin of each module is as follows.

                          ・V1: 437650 bytes(External Flash data)

                          ・V2: 414283 bytes(filesystem.bin in the build directory)

                          ・V3: 437646 bytes(filesystem.bin in the build directory)

                           

                          ■ Guess

                          When updating from V1 to V2, an error will occur, but I think that there are the following factors.

                          -External Flash cannot be updated on OTA

                          -Filesystem.bin size is very different from V1(APPS.bin has changed from V1).

                           

                          ■ Question

                          When updating from V1 to V3, there is a difference in filesystem.bin, but OTA cannot update to external flash. However, the difference in size of filesystem.bin is only 4 bytes from V1, and APPS.bin is not changed, so unlike V2, no error occurs.

                          If APPS.bin does not change, is it OK to assume that no error occurs even if filesystem.bin changes?

                          • 10. Re: About malfunction after update
                            MuraliR_36

                            hiko_4316286 i think that there is some confusion regarding fundamentals of how our OTA (not OTA2) is implemented.

                            Using OTA, only the application can be updated and not the device firmware(filesystem.bin which contains the 4343WA1.bin and the 4343WA1.clm_blob).

                            So if at all you are using the OTA, you can only update the application which is on the internal flash using the stripped.elf file and not the APPS.bin file. Say for example if i want to update my application to perform a scan, i need to use the file snip.scan-<your_platform>.stripped.elf available at /43xxx_Wi-Fi/build/snip.scan-<your_platform>/binary/ . The application update can be anything. The ota_fr.c at /43xxx_Wi-Fi/apps/snip/ota_fr/ gives a brief explanation as to how the OTA needs to be performed.

                            Please go through the WICED-OTA.pdf  at /43xxx_Wi-Fi/doc/ for a clear understanding.

                            • 11. Re: About malfunction after update
                              hiko_4316286
                              So if at all you are using the OTA, you can only update the application which is on the internal flash using the stripped.elf file and not the APPS.bin file.

                                ->I have been successful in updating my internal flash application in OTA using the stripped.elf file.

                               

                              Since it is not transmitted well, I will explain it in order.

                              ■ Background

                              V1 is a product already on the market.

                              Only 4343WA1.bin has been modified from the V1 software, which creates two types of software V2 and V3.

                              (V2 did not work as described in [Result 1], so I modified 3433WA1.bin to create V3.)

                               

                              Commercial product software: V1

                              Software that changed only 4343WA1.bin: V2 (Software comparison result of V1 and V2: APPS.bin and filesystem.bin differ between V1 and V2. There is a difference of 23,367 bytes in filesystem.bin.)

                              Software that changes only 4434WA1.bin: V3 (Software comparison result of V1 and V3: Only filesystem.bin differs between V1 and V3. APPS.bin is the same. filesystem.bin has a difference of 4 bytes.)

                               

                              If you use OTA to update your software, you can only update your application. I think I can't update the filesystem.bin and APPS.bin on the external system.

                              V1 on the market will be updated on OTA.

                              In that case, the following inconsistencies occur between the application and the external flash.

                                 -Updated the application to "Software with only 4433WA1.bin changed"

                                 -External flash filesystem.bin and APPS.bin are not updated from software distributed in the market.

                               

                              ■Confirmation result

                              □ Result ① (when a commercial product (V1) is updated to V2 software by OTA)

                              The commercial product (V1) was successfully updated to V2 software using OTA, but when I started it after the software update, it failed with the following error:

                                ************************************************** **

                                **Error: WLAN: Could not download clm_blob file

                                **Fatal error: The system is unusable or the CLM blob file is missing or corrupted.

                                ************************************************** **

                               

                              □ Result ② (when a commercially available product (V1) is updated to V3 software with OTA)

                              The product on the market (V1) has been successfully updated to V3 software using OTA.

                              We also check the operation after software update.

                              ・Update the application to V3 software

                              ・Filesystem.bin and APPS.bin of external flash remain V1

                              The external Flash hasn't been updated, so I think it has some inconsistencies with the application, but it seems to work fine.

                               

                              ■ Guess

                              According to the above confirmation result, even if there is a difference in filesystem.bin, APPS.bin that stores the address is exactly the same

                              I don't think there is any problem if you update the commercial product (V1) to V3 with OTA.

                              *After updating the commercial product (V1) to V3 with OTA, the filesystem.bin and APPS.bin of the external flash are still V1, but since OTA cannot update the external flash, it is allowed.

                               

                              ■ Question

                              I would like to confirm that the above [Result (2)] does not pose a problem.

                              Using OTA to update the changes in 4343WA1.bin only updates the application, not the external flash.

                              At this point, is it okay to assume that the problem isn't going to happen like the Guess above?

                              • 12. Re: About malfunction after update
                                HiNa_2357246

                                MuraliR_36

                                Hi,

                                 

                                Let me add the background and purpose of hiko_4316286 , and description for each versions.

                                 

                                 

                                [Description for each version]

                                "V1" : WLAN FW Version1 + User app Version1

                                "V2" : WLAN FW Version2 + User app Version2 (The only change in the User app is the version number value.)

                                       ->OTA fails.

                                "V3" : WLAN FW Version3 + User app Version3 (The only change in the User app is the version number value.)

                                       ->OTA looks like succeeded.

                                         However, since the WLAN FW (filesystem.bin) has changed, so it cannot be judged as OTA successful.

                                         At this time, it is not important that the WLAN FW is not updated due to the following background.

                                 

                                 

                                [Background of this Case]

                                - Hundreds of hiko_4316286 products are already on the market with "V1".

                                - Future products will be shipped out with "V3". (Write "V3" at the factory.Not OTA update)

                                - "V3" is stored in the their OTA server due to management the entire product.

                                - Due to product specifications/restrictions, "V1" products will be forced OTA update to server's Version("V3").

                                  -> Customer's concern is here.

                                 

                                 

                                [Key point]

                                Products written with "V1" will be forcibly updated to "V3".

                                This time, we think the timing was bad (The WLAN FW has also changed even though WLAN FW cannot OTA update.)

                                 

                                 

                                According to the hiko_4316286 , the OTA mechanism has not changed from the WICED studio standard.

                                In this case, if there is no issues as a result of the customer's sanity check with OTA updated "V3",

                                is it OK to assume that the OTA has been completed?

                                 

                                 

                                Customer is not asking Cypress to guarantee OTA operation including WLAN FW.

                                Customer is looking for an opinion whether it can be said that this OTA to V3 is no problem as a result.

                                 

                                Best Regards,

                                • 13. Re: About malfunction after update
                                  hiko_4316286

                                  There is a correction to the supplementary explanation from HiNa_2357246

                                   

                                  -Although it says "OTA fails", OTA is successful

                                     OTA only updates the application, not the external Flash.

                                     Therefore, it is presumed that there is an error when loading the external Flash filesystem.bin from the application after restarting after updating.

                                   

                                  -In the previous QA, there was an error in the file name of 4343WA1.bin, so I will re-post it.

                                     Please answer the following [■ Question].

                                   

                                  Repost

                                  ■ Background

                                  V1 is a product already on the market.

                                  Only 4343WA1.bin has been modified from the V1 software, which creates two types of software V2 and V3.

                                  (V2 did not work as described in [Result 1], so I modified 4343WA1.bin to create V3.)

                                   

                                  Commercial product software: V1

                                  Software that changed only 4343WA1.bin: V2 (Software comparison result of V1 and V2: APPS.bin and filesystem.bin differ between V1 and V2. There is a difference of 23,367 bytes in filesystem.bin.)

                                  Software that changes only 4343WA1.bin: V3 (Software comparison result of V1 and V3: Only filesystem.bin differs between V1 and V3. APPS.bin is the same. filesystem.bin has a difference of 4 bytes.)

                                   

                                  If you use OTA to update your software, you can only update your application. I think I can't update the filesystem.bin and APPS.bin on the external system.

                                  V1 on the market will be updated on OTA.

                                  In that case, the following inconsistencies occur between the application and the external flash.

                                     -Updated the application to "Software with only 4343WA1.bin changed"

                                     -External flash filesystem.bin and APPS.bin are not updated from software distributed in the market.

                                   

                                  ■Confirmation result

                                  □ Result ① (when a commercial product (V1) is updated to V2 software by OTA)

                                  The commercial product (V1) was successfully updated to V2 software using OTA, but when I started it after the software update, it failed with the following error:

                                    ************************************************** **

                                    **Error: WLAN: Could not download clm_blob file

                                    **Fatal error: The system is unusable or the CLM blob file is missing or corrupted.

                                    ************************************************** **

                                   

                                  □ Result ② (when a commercially available product (V1) is updated to V3 software with OTA)

                                  The product on the market (V1) has been successfully updated to V3 software using OTA.

                                  We also check the operation after software update.

                                  ・Update the application to V3 software

                                  ・Filesystem.bin and APPS.bin of external flash remain V1

                                  The external Flash hasn't been updated, so I think it has some inconsistencies with the application, but it seems to work fine.

                                   

                                  ■ Guess

                                  According to the above confirmation result, even if there is a difference in filesystem.bin, APPS.bin that stores the address is exactly the same

                                  I don't think there is any problem if you update the commercial product (V1) to V3 with OTA.

                                  *After updating the commercial product (V1) to V3 with OTA, the filesystem.bin and APPS.bin of the external flash are still V1, but since OTA cannot update the external flash, it is allowed.

                                   

                                  ■ Question

                                  I would like to confirm that the above [Result (2)] does not pose a problem.

                                  Using OTA to update the changes in 4343WA1.bin only updates the application, not the external flash.

                                  At this point, is it okay to assume that the problem isn't going to happen like the Guess above?

                                  • 14. Re: About malfunction after update
                                    MuraliR_36

                                    hiko_4316286 HiNa_2357246

                                    Here is what is understood.

                                    Please correct me if i am wrong even now.

                                     

                                    • V1 is a product in the market with a particular application(lets assume this as 'A') using the firmware(4343WA1.bin)(lets assume this as 'X').
                                    • V3 is a an update for V1 built using application(lets assume this as 'B') using another firmware(lets assume this as 'Y').

                                     

                                    You are trying to perform an OTA update for V1 using V3.

                                    The questions are

                                    1. Since V1 is built using 'A' and 'X' and V3 is built using 'B' and 'Y'; will it be an issue if the OTA update of V1 is performed using V3?
                                    2. When V1 was updated using V2, it failed. Will this be an issue?

                                     

                                    Here are my observations.

                                    1. I tried this out in the following way and everything seemed to work fine and i don't see any issues. Although i recommend that you test this thoroughly before rolling out the update to the products on the field.
                                      • I built and downloaded the ota_fr app and then performed an OTA update of the snip.scan app built using a different firmware version.
                                      • I built and downloaded the ota_fr app and then performed an OTA update of the snip.apsta app built using a different firmware version.
                                    2. I'm not sure as to why it failed when using V2 and will be difficult to comment without reproducing the exact issue on my side.

                                     

                                    Now coming to your guess, yes it is correct. The .elf file is designed for that purpose itself. The filesystem.bin resides in the external flash. The OTA update is performed on the main application i.e., APP0.

                                    1 of 1 people found this helpful
                                    1 2 Previous Next