I have to upgrade a GT202-GI3013 - v.3.3.4 to firmware version 3.3.5 from my application.
I've created a const uint8_t firmware_buffer[] = {.....} which contains the binary code found in ota_image_AR400X_REV4_IOT_SP144_hosted_singleband.bin downloaded from your website.
This bin I think contains the header (firsts 24 Bytes) and the Firmware to write to the module.
I cannot find a procedure to use, but I think the steps would be:
1_ qcom_ota_session_start(QCOM_OTA_TARGET_FIRMWARE_UPGRADE, OTA_PARTITION_AUTO);
//If I set 0 is the same as OTA_PARTITION_AUTO, if I set 1 I think I can set the first partition, how many partitions have I in GT202-GI3013 QCA4002 ?
//Is there a way to know which partition has been automatically selected?
2_ uint32_t offset = 0 ;
qcom_ota_parse_image_header(firmware_buffer, &offset);
3_ qcom_ota_partition_erase(); //What's the difference between using qcom_ota_partition_format(idx) and which index could I use?
4_ uint32_t ret_size = 0;
qcom_ota_partition_write_data(offset, firmware_buffer, firmware_buffer_size, &ret_size);
5_ qcom_ota_partition_verify_checksum();
6_ qcom_ota_session_end(1);
The problem is that after the qcom_ota_partition_write_data(..) I cannot connect anymore with the device.
There's a way to flash the right firmware directly on the GT202 microprocessor?
What's the problem and what's the right process to update the firmware?
Thanks