Skip to main content
Z.Oleg
Associate
January 14, 2019
Question

Problem with AT+S.HTTPDFSUPDATE for SPWF01

  • January 14, 2019
  • 4 replies
  • 1063 views

Hello all

I have a problem with updating the filesystem over http

AT+S.HTTPDFSUPDATE=192.168.3.2,/fs.img,8079

this is the command i use to update the fs.

The logs of the local webserver tell

192.168.3.1 - - [14/Jan/2019:13:29:51 +0300] "GET /fs.img HTTP/1.0" 200 14600 "-" "SPWF01SC1"

so the download happens. on the spwf01 console i see

Image length 20694 (offset 0x00080000, block len 4096)

Write len 2694 -> 0x80000 (final)

Wrote 2694 bytes

Error (-3 @ 2690/20696), cleaning up..

so i get an error and the filesystem is not updated.

the firmware of the wifi module is the latest (updated a week ago)

    This topic has been closed for replies.

    4 replies

    Elio Cometti
    Visitor II
    January 14, 2019

    ​Hello,

    it seems the SPWF01 is running low on memory.

    Could you please:

    • report the WIND:1: content (to get the release number)
    • type AT+S.STS=free_heap and AT+S.STS=min_heap just before and just after the HTTPDFSUPDATE command to check the memory level

    Thanks,

    Regards,

    Elio

    Z.Oleg
    Z.OlegAuthor
    Associate
    January 14, 2019

    Hello,

    > RELEASE

    +WIND:1:Poweron (170111-665d284-SPWF01S)

    > BEFORE

    # free_heap = 15600

    # min_heap = 10848

    > UPDATE

    Image length 20694 (offset 0x00080000, block len 4096)

    Write len 3424 -> 0x80000 (final)

    Wrote 3424 bytes

    Error (-3 @ 3420/20696), cleaning up..

    > AFTER

    # free_heap = 17232

    # min_heap = 6040

    Z.Oleg
    Z.OlegAuthor
    Associate
    January 14, 2019

    Just to add,

    sometimes, very rarely, 1 of many tries, the update IS succeseful

    # free_heap = 17152

    # min_heap = 7624

    Image length 20694 (offset 0x00080000, block len 4096)

    Write len 4096 -> 0x80000

    Write len 4096 -> 0x81000

    Write len 4096 -> 0x82000

    Write len 4096 -> 0x83000

    Write len 4096 -> 0x84000

    Write len 220 -> 0x85000 (final)

    Wrote 20700 bytes

    Complete! Please reboot. (at+cfun=1)

    # free_heap = 17152

    # min_heap = 7592

    Elio Cometti
    Visitor II
    January 14, 2019

    ​Hello,

    actually the HTTPDFSUPDATE command will fail if the available memory is too low or too fragmented.

    If your use case allow it, I suggest to perform the FS update as soon as possible after a boot.

    Regards,

    Elio