Updating WizFi360 via AT+CIUPDATE command or SPI

Hello, I have 2 questions:

  1. The WizFi360 documentation states that firmware can be updated directly via UART interface or via cloud. Is there perhaps a yet-undocumented way of sending the firmware with SPI interface? If not, would it be possible for you to add it in future firmware releases?

  2. I’m considering doing the remote updates via AT+CIUPDATE command. Is there a way to check if firmware was downloaded successfully prior to updating the device? I need to be sure that the device won’t flash itself with badly-downloaded firmware, making the whole system not-working. If AT+CIUPDATE already does that, could you please provide me with sample command responses which show that the error has occured, so that I can detect it when handling communication with WizFi module?

Hello @hkm_mn

The SPI interface can also use the same AT commands as the UART interface.

Therefore, firmware update is possible with ‘AT+CIPUPDATE’ through the SPI interface.

For the response to ‘AT+CIUPDATE’, refer to ‘3.3.21 AT+CIUPDATE’ in the document below.

Thank you for your reply. From the documentation, the AT+CIUPDATE does following steps:

1: find the server
2: connect to server
3: get the software version
4: start updating

Could you please confirm that the command also checks integrity of downloaded firmware between steps 3 and 4?

Hi @hkm_mn

Yes, check the integrity in step 4.

Hello again,

I have a problem with OTA firmware update. Using the latest release from Release/Binary at master · wizfi/Release · GitHub , I Issue following command:

AT+CIUPDATE="https://piwnica.ws/hkm/fw_1_1_2_0.img"

and the response I get is as follows:

AT+CIUPDATE="https://piwnica.ws/hkm/fw_1_1_2_0.img"
+CIPUPDATE:1
+CIPUPDATE:2
+CIPUPDATE:3
+CIPUPDATE:1
+CIPUPDATE:1
+CIPUPDATE:1
+CIPUPDATE:1
+CIPUPDATE:1
+CIPUPDATE:1
+CIPUPDATE:1
+CIPUPDATE:1
+CIPUPDATE:1

the module then sends +CIPUPDATE:1 every 5 or so seconds. I’ve tried updating without specifying URL or with AT+CIUPDATE="http://wizwiki.net/download/WizFi360/O11/WizFi360_SDK.img" or with AT+CIUPDATE="http://wizwiki.net/download/WizFi360/WizFi360_SDK.img" but those always result in error after +CIUPDATE:3.

After rebooting the device, I’m still at version 1.1.1.7 like before the update:

AT+GMR
AT version:1.1.1.7(May  4 2021 15:14:59)
SDK version:3.2.0(a0ffff9f)
compile time:May  4 2021 15:14:59

Hi @hkm_mn

Would you like to try OTA by entering this address?

It worked! I’ve analyzed the problem a bit and found out that the culprit was that my web server was using HTTPS instead of HTTP.

Would it be possible for you to add ability to AT+CIUPDATE command to accept firmware from HTTPS sources? Today almost all of web is HTTPS-based and having a HTTP exception in our server’s configuration is troublesome. Also, we really need to host the firmwares ourselves to have strict control on what firmware version our devices are running. We can’t use always-latest firmware from your address because in case of incompatibility on our end we’ll be left with unresponsive devices and need to service them on-site which is costly for us.