Skip to main content
sne_123
Associate III
January 23, 2019
Question

GSM & STM32 file download via FTP

  • January 23, 2019
  • 4 replies
  • 1887 views

GSM modem is attached to STM32. Using FTP AT commands I am able to download a particular file from FTP server. Now I don't know where this downloaded file is saved inside the GSM modem. My goal is to transfer that file into STM32 and upgrade the firmware. Can anyone help how to do this??? 

    This topic has been closed for replies.

    4 replies

    After Forever
    Senior III
    January 23, 2019

    All depends on your particular GSM modem model. Read its documentation about the supported AT commands.

    For example, SIM900 has this application note with an example (section 3 - FTP Application) - http://mt-system.ru/sites/default/files/sim900_ip_application_note_v1.03.pdf

    sne_123
    sne_123Author
    Associate III
    January 23, 2019

    Thank you.I am able to get the file through FTP process and view its contents , but I am not sure where it is saving or how to save the file in the modem.

    After Forever
    Senior III
    January 23, 2019

    The modem doesn't have the whole file per se. What if the file is 1GB or more? You wouldn't expect the modem to have a 1GB of storage space to download the file for you.

    You must download the file by parts (chunks) using the AT+FTPGET command, then use/store wherever you want to. I.e. download first 1024 bytes, check the checksum, if it's OK, write to flash. Process to the next 1024 bytes, etc.

    sne_123
    sne_123Author
    Associate III
    April 9, 2019

    @After Forever​  Do you mean I should save the file on SD card or EEprom via FTP commands of GSM modem and then allow stm32 to access the file from SD card??