First of all there are couple of bugs in QCLI_demo/src/ota/plugins/http/ota_http.c
- In plugin_Http_Recv_Data function instead of while(0) it must be while(1) otherwise it won't download the whole file
- 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?
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 ?
@raja_pedada
Here is the output of fwd command
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
@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_E) error 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.