5 Replies Latest reply on Jan 30, 2019 12:14 AM by ZhengbaoZ_96

    Modifying OTA2_example to run without console

    chuntkincaid_3807591

      Im looking for some guidance to modify the existing OTA2_example files shipped with WICED to run without a console. I'm hoping that I can get the system to navigate to an IP/filename that is static. Can someone familiar with the OTA2 system point me to the modifications I can make so this system can be integrated into my app? Thanks.

        • 1. Re: Modifying OTA2_example to run without console
          ZhengbaoZ_96

          hello:

          Actually, I don't understand this description " without a console " very clearly.

          Can you tell which step of console will be removed and replaced in your app ?

          thanks.

          • 2. Re: Modifying OTA2_example to run without console
            chuntkincaid_3807591

            Hello ZhengbaoZ_96:

             

            In the ota2_test example, once the code is downloaded to the eval board, it turns on the command console and adds a list of commands, but doesn't do the actual update. Instead, you have to open up a terminal emulator like putty and issue a "get_update <host>/ota2_image_file" command over uart. I'm hoping to be able to remove this console entirely - in production we wont have access to the board to connect over uart and issue commands. Instead, I was hoping for the host/filename to be set somewhere else in the code and have the get_update functionality as a simple set of functions.

            • 3. Re: Modifying OTA2_example to run without console
              ZhengbaoZ_96

              hello:

               

                 actually, I did OTA2 with below steps, didn't use command_console to get a image.

               

              snip.ota2_extract-CYW954907AEVAL1F

              snip.ota2_example-CYW954907AEVAL1F ota2_factory_download

              snip.ota2_example-CYW954907AEVAL1F ota2_image download_apps download run

              snip.apsta-CYW954907AEVAL1F ota2_image

              // This is the image which will be updated.

              //  after reset key pressed,  press button 1 for 5 seconds

              do the update process by using web server provided in ota_extract .

               

              and I did the same process twice, It was finished successfully .

               

              maybe you can have a check on this thread , to check if a SOFTAP, web server mode can be used in your test.

              1 of 1 people found this helpful
              • 4. Re: Modifying OTA2_example to run without console
                chuntkincaid_3807591

                hey ZhengbaoZ_96:

                 

                Thanks for the reply - unfortunately the application will not have any user buttons or anyone to push them, and even so the softAP flow for the OTA upgrade doesn't work for us. This leads me back to the modification of the regular console model to have the get_update functionality completely software defined.

                 

                Really what i'm looking for is some quick/simple guide of which variables to set to make the get_update function automatically and additionally how to remove the console application from the example without breaking anything.

                • 5. Re: Modifying OTA2_example to run without console
                  ZhengbaoZ_96

                  Hello:

                     

                      I think you can call ota2_console_command(int argc, char *argv[])  directly ,  to emulate the command input if you want to skip the UART input.  Assume below steps are used in your factory:

                  1.  download all images by JTAG interface, and run the system test.

                  2.  after test done you need to switch the image into normal production one.

                   

                  So  my suggestions are to download normal production one into staging area,

                  then to call command interface to "update_reboot" in factory image ,we did not do update step actually,  just need to set  flags to :

                  WICED_OTA2_IMAGE_EXTRACT_ON_NEXT_BOOT.

                  just for your reference. .

                  2 of 2 people found this helpful