Giter Site home page Giter Site logo

Bad PASV Answer about esp32_ftpclient HOT 7 CLOSED

ldab avatar ldab commented on May 23, 2024
Bad PASV Answer

from esp32_ftpclient.

Comments (7)

ldab avatar ldab commented on May 23, 2024 1

I didn't write a question, my comment earlier was a suggestion aiming to help you to understand how your server behaves. After knowing how your server behaves, you can work on implementing the solution for it.

If you search for the keyword "Offline" under issues, you will find few other users mentioned different problems and different solutions.

The library is intended to run on a less powerfull CPU then compared to your PC, it also have a lot less resources and features, it is not comparable.

from esp32_ftpclient.

3Dietrich avatar 3Dietrich commented on May 23, 2024 1

ok, I found 'one' solution:
Before every InitFile or similiar I need to add
ftp.OpenConnection();
Now everything works!
Ok, I need also to change the folder from root to /working folder ftp.ChangeWorkDir("/working folder"); every time.
Strange. But it works!

from esp32_ftpclient.

hike6688 avatar hike6688 commented on May 23, 2024 1

Hi Idab,
nice library to save my bme280 logfiles from my esp32 device to my NAS system.
Had the same problem (Bad PASV Answer Connection closed .. ) as 3Dietrich when transfering the second log-file.
Solution is the same as 3Dietrich stated.
I followed the hint from 3Dietrich , now it works.

I keep the current workingDirPath in a static and call openConnectionAndChangeWorkingDir () right before each InitFile() call.

static String mWorkingDirPath = "";

void setWorkingDirPath(String pWorkingDirPath){
  Serial.println("my_ftpHelper::setWorkingDirPath: " + pWorkingDirPath);
  mWorkingDirPath = pWorkingDirPath;
}
String getWorkingDirPath(){
  return mWorkingDirPath;
}
String getBaseWorkingDirPath(){
  String result = "/full_path_of_base_directory_on_ftpserver/" ;
  return result;
}
boolean openConnectionAndChangeWorkingDir (){
  boolean result = false;
  ftp.OpenConnection();
  Serial.println ("my_ftphelper::openConnectionAndChangeWorkingDir-> try to change working dir to: " + mWorkingDirPath);
  ftp.ChangeWorkDir(getWorkingDirPath().c_str());
  if (ftp.isConnected()) {
    Serial.println("CWD set to done : " + mWorkingDirPath);
    result = true;
  } 
  return result;
}```

from esp32_ftpclient.

ldab avatar ldab commented on May 23, 2024

try to install a FTP Client like FileZilla, enabled the detailed log and inspect how your server behaves.

from esp32_ftpclient.

3Dietrich avatar 3Dietrich commented on May 23, 2024

If this Lib is for using ESP32 as Client, why I should use FileZilla? I used Finder, Cyberduck, NimbleCommander and VSCode (on MacOS) and works ok, no errors using this clients. But I want to use ESP32 this is why I tried the Arduino ESP32_FTPClient and I get no working connection when I use ESP32 with ESP32_FTPClient. At least it outputs some Errors - but this is not detailed enough? I really don't get your question.

from esp32_ftpclient.

3Dietrich avatar 3Dietrich commented on May 23, 2024

in FileZilla I get on PASV this response:

2021-09-08 13:28:48 39435 1 Command: PASV
2021-09-08 13:28:48 39435 1 Response: 227 Entering Passive Mode (192,168,0,1,187,98)

What is bad in this response?

from esp32_ftpclient.

ldab avatar ldab commented on May 23, 2024

It does not seem to be a bad answer, but in order to replicate the problem I would recommend manual sending all the commands included on the ESP32 log shared earlier.

from esp32_ftpclient.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.