2016-04-22 08:06 AM
Hi Gerry,
I need to update the firmware of my devices (not the firmware of the module) over the air. Can you give an example which commands the firmware update with at+s.fwupdate uses and how the firmware update works? Regards, Flow2016-04-24 02:53 AM
Hi Flow,
FWUPDATE command must be used to update module's FW over the air. If you want to update your MCU application, you can use the FSUPDATE command. Something like this: 1 - download new MCU FW image by FSUPDATE command. Include new FW inside a *.img file 2 - switch MCU to ''bootloader'' mode (if STM32, followAN2557
) 3 - call FSR command, and collect bytes to write #1 MCU ''main application'' flash page (if STM32F1, 2048 bytes) 4 - repeat step 3, till whole application is replaced (page by page) 5 - switch MCU to ''application'' mode If SPWF02S is used, without FWUPDATE and FSUPDATE commands, use raw sockets to download new FW image. Hope it helps j2016-04-24 04:46 AM
Hi Gerry,
thank you - that helps :) The image of my firmware will be up to 1MByte, so the module memory is not big enough, so I will need to use raw sockets... I watched the traffic during a FWUPDATE. Can you tell me which AT commands are behind the FWUPDATE. First a httpget and then something with TCP... Best regards, Flow2016-04-25 09:14 AM
Use all available socket's commands.
HTTP is based on TCP, so, open a TCP socket client, and write your http request to remote webserver. Then read and store received bytes into some external flash, or flash MCU application on the fly. Your decision. Enjoy.2016-04-27 08:51 AM
Hi Gerry,
thank you for your reply. I use following commands AT+S.SOCKON=www.example.com,80,t,ind AT+S.SOCKW=00,98 GET /downloads/examples HTTP/1.1 .... and so on and then I read the socket. But if my file contains 0x0D 0x0A I receive only 0x0A... I tried different content-types in the header, but with no success. Do you have an idea? Cheers, Flow