Forums - OTA over http

6 posts / 0 new
Last post
OTA over http
ashotkhachatryanh
Join Date: 29 Jan 20
Posts: 5
Posted: Fri, 2020-05-15 01:27

First of all there are couple of bugs in QCLI_demo/src/ota/plugins/http/ota_http.c

  1. In plugin_Http_Recv_Data function instead of while(0) it must be while(1) otherwise it won't download the whole file
  2. if (signals & HTTPC_RX_DATA_FINISH_SIG_MASK) here needs to be break; because the signal means whole data is received. Otherwise it will wait forever.

Now the actual question.

I use FwUp demo to upgrade firmware. 
Here is the command I use
9 wlan1 10:http://45.77.88.109 ImgConfig.bin

At the end I am getting an error

Firmware Upgrade Image Download Failed ERR:1025 which means QAPI_FW_UPGRADE_ERR_INCORRECT_IMAGE_HDR_E

Could someone help me to understand how this config file should look like? Is there any example how to create that config file?

  • Up0
  • Down0
c_rpedad
Profile picture
Join Date: 18 Jun 18
Location: San Jose
Posts: 317
Posted: Fri, 2020-05-15 18:02

Kindly provide us your "FwUp fwd" command output to verify if there are total 6 images:

> FwUp fwd
FwUp: Active FWD: Current  index:0, present:2
FwUp: Total Images: 0x6
FwUp:         Image ID: 0xA
FwUp:         Image ID: 0xB
FwUp:         Image ID: 0xD
FwUp:         Image ID: 0x5
FwUp:         Image ID: 0x80
FwUp:         Image ID: 0x81


Can you share us the instructions on how you are verify the OTA setup ?

  • Up0
  • Down0
ashotkhachatryanh
Join Date: 29 Jan 20
Posts: 5
Posted: Sun, 2020-05-17 11:58

@raja_pedada

Here is the output of fwd command

FwUp: Active FWD: Current  index:0, present:2
FwUp: FWD 0
FwUp: Magic: 0x54445746
FwUp: Rank: 0x1
FwUp: Version: 0x1
FwUp: Status: 0x1
FwUp: Total Images: 0x6
FwUp:         Image ID: 0xA
FwUp:    Image Version: 0x0
FwUp:      Image Start: 0x23000
FwUp:       Image Size: 0x1BF000
FwUp:         Image ID: 0xB
FwUp:    Image Version: 0x0
FwUp:      Image Start: 0x1E2000
FwUp:       Image Size: 0x16000
FwUp:         Image ID: 0xD
FwUp:    Image Version: 0x0
FwUp:      Image Start: 0x1F8000
FwUp:       Image Size: 0x1F000
FwUp:         Image ID: 0x5
FwUp:    Image Version: 0x0
FwUp:      Image Start: 0x3000
FwUp:       Image Size: 0x10000
FwUp:         Image ID: 0x80
FwUp:    Image Version: 0x0
FwUp:      Image Start: 0x13000
FwUp:       Image Size: 0x10000
FwUp:         Image ID: 0x81
FwUp:    Image Version: 0x0
FwUp:      Image Start: 0x1000
FwUp:       Image Size: 0x2000
FwUp: 
FwUp: FWD 1
FwUp: Magic: 0xFFFFFFFF
FwUp: Rank: 0xFFFFFFFF
FwUp: Version: 0xFFFFFFFF
FwUp: Status: 0xFF
FwUp: Total Images: 0xFF
FwUp: 
FwUp: FWD 2
FwUp: Magic: 0xFFFFFFFF
FwUp: Rank: 0xFFFFFFFF
FwUp: Version: 0xFFFFFFFF
FwUp: Status: 0xFF
FwUp: Total Images: 0xFF
 
Can you point me the steps I need to do for ota upgrade?
  • Up0
  • Down0
c_rpedad
Profile picture
Join Date: 18 Jun 18
Location: San Jose
Posts: 317
Posted: Mon, 2020-05-18 13:15


Below are the commands to verify WLAN OTA update:

>> Copy M0, M4 and WLAN binary images to firmware folder:

    cp output\Quartz_HASHED.elf  ..\..\..\..\..\build\tools\fwupgrade\
    cp ..\..\..\..\..\bin\wlan\wlan_fw_img.bin  ..\..\..\..\..\build\tools\fwupgrade\
    cp ..\..\..\..\..\bin\cortex-m0\threadx\ioe_ram_m0_threadx_ipt.mbn ..\..\..\..\..\build\tools\fwupgrade\
>> Generate OTA binary image
    cd ..\..\..\..\..\build\tools\fwupgrade\
    pwd
    python gen_fw_upgrade_img.py --xml fw_upgrade.xml --output=ota.bin
>> By default fw_upgrade.xml file supports "Partial Update" where we need to copy ota.bin along with binary images.
However, fw_upgrade.xml to modify format as "2" and generate ota.bin ofr full upgrade.

>> once the ota.bin is generated, copy the ota.bin to remote server in case of full upgrade, in case of partial upgrade copy ota.bin along with M0, M4 and WLAN binary to remote server.

> ON CDB20 serial console, connect to AP, acquire IP address and perform OTA upgrade.
FwUp http wlan1 1000:192.168.188.121:1234 ota.bin
FwUp trial 1 1 // to accept the trial image and reboot the device

  • Up0
  • Down0
ashotkhachatryanh
Join Date: 29 Jan 20
Posts: 5
Posted: Tue, 2020-05-19 06:41

@raja_pedada

Thanks for your message.

I tried both full and partial updates and both failed.
For full update I am getting '1025' (
QAPI_FW_UPGRADE_ERR_INCORRECT_IMAGE_HDR_Eerror after fully downloading .bin file.
For partial update I am getting '1015' (QAPI_FW_UPGRADE_ERR_FLASH_NOT_ENOUGH_SPACE_E) from the beginning.

By the way you can access my images here
http://45.77.88.109 ota.bin
http://45.77.88.109 ota_full.bin
And other images are there too. This is just QCLI_demo.

Do I need to modify fw_upgrade.xml file because I left it as it is.
There is this line in that file which I don't understand. That just says empty filename.
<partition filename="" signature="0x54445746" image_id="5" ver="1" size_in_kb="64" HASH_TYPE="1"/ >

I also want you to confirm the above mentioned bugs because without that fix it won't even go to the errors I mentioned, it will just hang. while(0) in the file mentioned above means that it will read just one chunk from file, if the file is less then the chunk which maybe the case for partial update it will go further but for full update it will never work. 
So I wonder how this feature even tested. The bug exists in 3.2 version as well.

  • Up0
  • Down0
Sjessus60
Join Date: 3 Oct 22
Posts: 28
Posted: Tue, 2023-07-25 13:11
QCLI_demo/src/ota/plugins/http/ota_http.c
  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.