Uploading file from SD Card to FTP server using Quectel M10 based GSM Shield

Hi,

I am trying to upload a simple text file which is located on the root of my SD Card. I have a Quectel M10 based GSM shield and a roboDyn SD Card module.

At the moment, I trying to achieve this by inputting AT commands one-by-one manually to the shield.

The output is below:

AT+QIFGCNT=0
OK
AT+QICSGP=1,"MY_APN"
OK
AT+QFTPUSER="FTP_username"
OK
AT+QFTPPASS="FTP_password"
OK
AT+QFTPOPEN="FTP_hostname",21
OK

+QFTPOPEN:0
AT+QFTPPATH="/files/"
OK

+QFTPPATH:0
AT+QFTPPUT="hello.txt",18,30
OK

CONNECT

+QFTPPUT:0

As you will see from the above the final output really passes nothing at all. It does, however, create a blank file on the FTP location "/files/". The baud rate that I am using is 19200 but also get the same issue with lower rates as well so I am thinking this may not be the problem.

On the FTP side I will see the following logs:

Tue Dec 25 19:22:39 2018 [pid 26162] [FTP_username] FTP command: Client "::ffff:Mobile_IP", "STOR /files/hello.txt"
Tue Dec 25 19:22:39 2018 [pid 26162] [FTP_username] FTP response: Client "::ffff:Mobile_IP", "150 Ok to send data."
Tue Dec 25 19:23:16 2018 [pid 26162] [FTP_username] OK UPLOAD: Client "::ffff:Mobile_IP", "/files/hello.txt", 0.00Kbyte/sec
Tue Dec 25 19:23:16 2018 [pid 26162] [FTP_username] FTP response: Client "::ffff:Mobile_IP", "226 Transfer complete."

I am able to list the contents of the FTP server without issues. Is there something more I need to do get this working?

Let me know if you need more information.

Many thanks.

It looks like you are trying to update “/files/hello.txt” but you stated that hello.txt was in the root directory. Create a files directory on your SD card, move it there and try it.