• Tags
  • Documentation
  • Order
  • Register
  • Login
Duet3D Logo Duet3D
  • Tags
  • Documentation
  • Order
  • Register
  • Login

FTP and Telnet: working yet ?

Scheduled Pinned Locked Moved
General Discussion
6
16
3.6k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • undefined
    llamatrails
    last edited by 22 Aug 2017, 16:01

    Firmware Name: RepRapFirmware for Duet WiFi
    Firmware Electronics: Duet WiFi 1.0
    Firmware Version: 1.19 (2017-08-14)
    WiFi Server Version: 1.19
    Web Interface Version: 1.19

    M586
    [11:40:55:072] HTTP is enabled on port 80␊
    [11:40:55:072] FTP is enabled on port 21␊
    [11:40:55:072] TELNET is enabled on port 23␊
    [11:40:55:072] ok␊

    I can log in to FTP with any username, using the default password defined in the config.g but no commands return any output.
    0:0 rick ! > ftp 192.168.1.195
    Connected to 192.168.1.195.
    220 RepRapFirmware FTP server
    Name (192.168.1.195:rick):
    331 Please specify the password.
    Password:
    230 Login successful.
    Remote system type is UNIX.
    Using binary mode to transfer files.
    ftp> ls
    500 Unknown command.
    ftp: bind: Address already in use
    ftp>quit
    221 Goodbye
    0:0 rick !>

    If I telnet in, it never asks for a login or password or any output, but an 'ls' returns 'ok'.
    0:0 rick ! > telnet 192.168.1.195
    Trying 192.168.1.195…
    Connected to 192.168.1.195.
    Escape character is '^]'.

    ls
    ok
    ^]
    telnet> quit
    Connection closed.
    0:1 rick ! >

    Are ftp and telnet supposed to work?
    If so, what am I doing wrong? Googling hasn't helped, sigh.

    TIA,
    Rick

    1 Reply Last reply Reply Quote 0
    • undefined
      Dougal1957
      last edited by 22 Aug 2017, 16:14

      FTP Does work I have used FileZilla to transfer files quite recently on 1.19.

      1 Reply Last reply Reply Quote 0
      • undefined
        dc42 administrators
        last edited by 22 Aug 2017, 16:29

        "ls" is not a recognised FTP command. See https://en.wikipedia.org/wiki/List_of_FTP_commands. Only some of the commands in that table are supported.

        Likewise "ls" is not a valid command for sending over telnet, you need to send GCode commands.

        Duet WiFi hardware designer and firmware engineer
        Please do not ask me for Duet support via PM or email, use the forum
        http://www.escher3d.com, https://miscsolutions.wordpress.com

        1 Reply Last reply Reply Quote 0
        • undefined
          sigxcpu
          last edited by 22 Aug 2017, 20:56

          Both "dir" and "ls" are working because they are actually "LIST" in FTP protocol.

          1 Reply Last reply Reply Quote 0
          • undefined
            dc42 administrators
            last edited by 22 Aug 2017, 21:04

            @sigxcpu:

            Both "dir" and "ls" are working because they are actually "LIST" in FTP protocol.

            That will depend on your FTP client.

            Duet WiFi hardware designer and firmware engineer
            Please do not ask me for Duet support via PM or email, use the forum
            http://www.escher3d.com, https://miscsolutions.wordpress.com

            1 Reply Last reply Reply Quote 0
            • undefined
              llamatrails
              last edited by 22 Aug 2017, 22:49

              Ok, so telnet will only accept gcode commands. No wonder there isn't any output when connecting.

              Is there a list of ftp supported commands?

              Googling didn't help with docs on using ftp or telnet in reprap firmware. Sigh.

              1 Reply Last reply Reply Quote 0
              • undefined
                dc42 administrators
                last edited by 23 Aug 2017, 07:38

                I've documented the list of supported FTP commands at https://duet3d.com/wiki/FTP_commands_supported.

                Duet WiFi hardware designer and firmware engineer
                Please do not ask me for Duet support via PM or email, use the forum
                http://www.escher3d.com, https://miscsolutions.wordpress.com

                1 Reply Last reply Reply Quote 0
                • undefined
                  llamatrails
                  last edited by 23 Aug 2017, 12:18

                  Thanks !!! 8-)

                  1 Reply Last reply Reply Quote 0
                  • undefined
                    DADIY
                    last edited by 23 Aug 2017, 13:46

                    @dc42:

                    I've documented the list of supported FTP commands at https://duet3d.com/wiki/FTP_commands_supported.

                    I must be doing something wrong as on my Duet 0.6 only the following commands work (the rest just show invalid command)

                    DELE
                    MKD
                    TYPE
                    USER

                    GET and PUT are excepted but not in your list, but they require PASV which also doesn't work 😞

                    1 Reply Last reply Reply Quote 0
                    • undefined
                      dc42 administrators
                      last edited by 23 Aug 2017, 14:59

                      PASV does work, but you can only have one connection to the main port plus one connection to the passive port. Some FTP clients default to using multiple connections if you don't configure them. The client I use is FileZilla.

                      Duet WiFi hardware designer and firmware engineer
                      Please do not ask me for Duet support via PM or email, use the forum
                      http://www.escher3d.com, https://miscsolutions.wordpress.com

                      1 Reply Last reply Reply Quote 0
                      • undefined
                        llamatrails
                        last edited by 23 Aug 2017, 18:17

                        Yep, FileZilla works for me. too.

                        I was using WinSCP which can't get a directory listing on connect. Looks like FileZilla is my new client program …

                        Rick

                        1 Reply Last reply Reply Quote 0
                        • undefined
                          llamatrails
                          last edited by 23 Aug 2017, 18:37

                          Got WinSCP to work.

                          Had to disable UTF-8 encoding for filenames, Use MLSD for filenames, and Support for hidden filenames.

                          All three options were set to Auto.

                          Rick

                          1 Reply Last reply Reply Quote 1
                          • undefined
                            dc42 administrators
                            last edited by 23 Aug 2017, 18:47

                            Strange, the firmware uses UTF8 throughout.

                            Duet WiFi hardware designer and firmware engineer
                            Please do not ask me for Duet support via PM or email, use the forum
                            http://www.escher3d.com, https://miscsolutions.wordpress.com

                            1 Reply Last reply Reply Quote 0
                            • undefined
                              sigxcpu
                              last edited by 23 Aug 2017, 19:00

                              @dc42:

                              @sigxcpu:

                              Both "dir" and "ls" are working because they are actually "LIST" in FTP protocol.

                              That will depend on your FTP client.

                              How exactly depends on the FTP client? What can a FTP client send instead of LIST to request a list of files/folders?

                              1 Reply Last reply Reply Quote 0
                              • undefined
                                dc42 administrators
                                last edited by 23 Aug 2017, 19:48

                                Because the FTP client needs to recognise dir and ls as commands that it recognises and translates to LIST.

                                Duet WiFi hardware designer and firmware engineer
                                Please do not ask me for Duet support via PM or email, use the forum
                                http://www.escher3d.com, https://miscsolutions.wordpress.com

                                1 Reply Last reply Reply Quote 0
                                • undefined
                                  hacker
                                  last edited by 26 Aug 2017, 16:50

                                  Honestly, I haven't used ftp for years, so I don't remember all the details, but I think the [c]Unknown command[/c] may have to do with the full command [c]ls[/c] or [c]dir[/c] translates to (by the client). For instance, I have an habit of entering [c]ls -l[/c] even though I know I shouldn't. And after I do that, pretty much nothing works

                                  [[language]]
                                  ftp> ls -l
                                  ---> PASV
                                  ---> LIST -l
                                  Unknown command.
                                  ftp> ls
                                  ---> PASV
                                  Unknown command.
                                  ---> PORT 192,168,4,14,230,94
                                  Unknown command.
                                  ---> LIST
                                  1 Reply Last reply Reply Quote 0
                                  4 out of 16
                                  • First post
                                    4/16
                                    Last post
                                  Unless otherwise noted, all forum content is licensed under CC-BY-SA