Search code examples
gsmat-command

GSM AT COMMAND | How to upload .amr audio file


I can list the directory using below command. AT+FSLS=\

i found AT+FSCREATE="1.amr",3 command to crate files in directory but the problem is, how to upload the file from my local drive.


Solution

  • I don't have any modem that supports AT+FSWRITE command. But based on SIMcom AT-command manual, AT+FSWRITE= command responds with prompt: >. Manual does not clearly tell how to use the command.

    But it might work similar way than AT+CMGS= command:

    1. Send AT+FSWRITE=1.arm,0,512,10 command to modem.
    2. Wait > from the modem.
    3. Write content of the file (512 bytes) to the modem.
    4. Send Ctrl-Z char (0x1A hex) to the modem.
    5. Wait OK/ERROR from the modem.

    Step 4. may not be needed, because size of the file is in the command.