FTP connection

  • Q: Type of module? A:
    Q: Firmware version? A:
    Q: Type of starter kit you have?
    (S1, S1B, S2, S3, S4, EVK1, EVK2, none, other)


    I connect ok to a remote server using the FTP command:


    AT#FTPOPEN ...........


    OK


    when I ask for a remote server listing ie AT#FTPLIST
    or upload or down load, I get nothing, until after 2 minutes I get ERROR. I can then shut down the connection fine.


    Any ideas please?


    thanks
    mb

  • Thanks Wilhelm,


    more information as follows:


    QM862 QUAD
    Not sure about firmware - about 5 years old


    The code is written in VBasic. Each private .... is basically a subroutine that sends the command to my PC serial port. The key line is command = ".......", which is the command sent to the Telit.


    So I call the FTP OPen routine with button 21
    Get with 23
    Close with 22
    etc



    Quotes are need to send the data from VBasic, but are not printed - to actually send a quote charater to the Telit a Chr(34) is added.


    I get an IP connection fine, with an OK reply and the same form my FTP host connection. A command to say, list the server directory just nothing for about 2 mins, but then replies with ERROR.



    CODE SNIPPETS


    Private Sub Button20_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button20.Click
    command = "AT#FTPTO=1000"
    send_command()
    End Sub


    Private Sub Button21_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button21.Click
    command = "AT#FTPOPEN=" + Chr(34) + "ftp.my server.co.uk" + Chr(34) + "," + Chr(34) + "myusername" + Chr(34) + "," + Chr(34) + "mypassword" + Chr(34) + ",0"
    send_command()
    End Sub


    Private Sub Button22_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button22.Click


    command = "AT#FTPCLOSE"
    send_command()
    End Sub


    Private Sub Button23_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button23.Click
    'command = "AT#FTPGET =" + Chr(34) + "test.txt" + Chr(34)
    command = "AT#FTPGET =" + "test.txt" ' without quotes
    'command = "AT#FTPLIST"
    send_command()
    End Sub

  • firmware is 07.02.603


    Also, as a double check, do I send the GET filename in quotes


    ie "test.txt" or text.txt?


    Last night I got a CONNECT after a GET but then after many attempts it did not connect again.


    Thanks for your help

  • Ok - I have updated QUAD with software version 07.02.605.


    I have been through the same sequence and get the same result ie - I make the connection ok with ftp server. I ask for say a listing and get nothing for 2 minutes, whereupon I receive an ERROR.


    I can close the IP connection with FTPCLOSE, and open with FTPOPEN without any problems - its just when I give a GET PUT LIST command that the link goes quiet.


    Just to double check. should the filename be enclosed in quotations ie "test.txt" or plain ie test.txt.


    thnkx
    mike

  • In Easy GPRS page 51, the file type is set to 0 and it appears that an ASCII file is to be received, but in the previous page, the command to set ASCII file type is 1.


    Can you specify which one it is please?


    rgds


    mb

  • I based my code on the example on page 51 and this shows TEXT=0 - anyway I now know TEXT=1 ...


    I shall give it a try tomorrow. I have read all of the FTP posts, so I must be near - plainly many other people have got this to work.


    Thanks for your support, I would be lost without it.


    rgds


    mb

  • Ok ... its working!


    I needed "AT#FTPOPEN=" xxxxxxxxxxxxxxx , mode 1 - I think it is called active mode - my server did not like passive mode.


    Thank you for a really great Tech Support Service, Wilhelm.


    rgds


    mb