Giter Site home page Giter Site logo

FTP error: Offline about esp32_ftpclient HOT 19 CLOSED

ldab avatar ldab commented on May 23, 2024
FTP error: Offline

from esp32_ftpclient.

Comments (19)

ldab avatar ldab commented on May 23, 2024

Have you tried on different servers as I recommended? It sounds like the client was not available.

from esp32_ftpclient.

kinba3000 avatar kinba3000 commented on May 23, 2024

I tried a diffrent server now. I used 000webhost.com. But it still gives me the same error. Do you know how i will get some more information out of the error? I even tried diffrent libaries versions.

from esp32_ftpclient.

ldab avatar ldab commented on May 23, 2024

I tried just now with the example provided on this library + 000webhost.com and it works just fine. Maybe the problem is with your ISP?

ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 188777542, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:8896
load:0x40080400,len:5828
entry 0x400806ac
Connecting Wifi...
....
IP address: 192.168.0.29
Connecting to: files.000webhost.com
Command connected
Send USER
Send PASSWORD
Send SYST
Send TYPE
Type A
Send PASV
Data port: 52285
Data connection established
Send CWD
Send MLSD
Result start
Result: 150 Connecting to port 31886
226-Options: -a -l
226 2 matches total
Result end

Directory info:
type=cdir;sizd=6;modify=20190811114938;UNIX.mode=0755;UNIX.uid=10183013;UNIX.gid=10183013;unique=804g6fc6ce21; .
type=pdir;sizd=4096;modify=20190712101201;UNIX.mode=0755;UNIX.uid=10183013;UNIX.gid=10183013;unique=804g6fc69002; ..
Send TYPE
Type A
Send PASV
Data port: 52183
Data connection established
Send MKD
Send CWD
Send TYPE
Type I
Send PASV
Data port: 30966
Data connection established
Send STOR
Writing
Close File
Send TYPE
Type A
Send PASV
Data port: 40375
Data connection established
Send STOR
Write File
Close File
Connection closed

from esp32_ftpclient.

kinba3000 avatar kinba3000 commented on May 23, 2024

I will try it real quick

from esp32_ftpclient.

kinba3000 avatar kinba3000 commented on May 23, 2024

I uploaded your example. Same error with 000webhost.com. I now even tried a diffrent esp32 cam. Wich model are you using? Do you insert a SD card?

from esp32_ftpclient.

ldab avatar ldab commented on May 23, 2024

Please share the results from your test. I tried with a ESP32 pico.

from esp32_ftpclient.

kinba3000 avatar kinba3000 commented on May 23, 2024
Connecting Wifi...
22:43:21.904 -> .
22:43:21.904 -> IP address: 192.168.0.73
22:43:21.904 -> Connecting to: files.000webhost.com
22:43:30.902 -> FTP error: Offline
22:43:30.902 -> Send USER
22:43:35.911 -> FTP error: Offline
22:43:35.911 -> Send PASSWORD
22:43:40.912 -> FTP error: Offline
22:43:40.912 -> Send SYST
22:43:45.888 -> FTP error: Offline
22:43:45.888 -> Send TYPE
22:43:45.888 -> FTP error: Offline
22:43:45.958 -> Send CWD
22:43:45.958 -> FTP error: Offline
22:43:45.958 -> Send MLSD
22:43:45.958 -> FTP error: Offline

I use a ESP32-cam AI Thinker

from esp32_ftpclient.

ldab avatar ldab commented on May 23, 2024

Also share the code used on the test

from esp32_ftpclient.

kinba3000 avatar kinba3000 commented on May 23, 2024
/******************************************************************************
ESP32-CAM remote image access via FTP. Take pictures with ESP32 and upload it via FTP making it accessible for the outisde network. 
Leonardo Bispo
July - 2019
https://github.com/ldab/ESP32_FTPClient
Distributed as-is; no warranty is given.
******************************************************************************/
#include "Arduino.h"
#include <WiFi.h>
#include <WiFiClient.h> 
#include <ESP32_FTPClient.h>
#include "octocat.h"

#define WIFI_SSID "Hobi 2.4Ghz"
#define WIFI_PASS "password"

char ftp_server[] = "files.000webhost.com";
char ftp_user[]   = "fam-holinger";
char ftp_pass[]   = "password";

// you can pass a FTP timeout and debbug mode on the last 2 arguments
ESP32_FTPClient ftp (ftp_server,ftp_user,ftp_pass, 5000, 2);

void setup()
{
  Serial.begin( 115200 );

  WiFi.begin( WIFI_SSID, WIFI_PASS );
  
  Serial.println("Connecting Wifi...");
  while (WiFi.status() != WL_CONNECTED) {
      delay(500);
      Serial.print(".");
  }
  Serial.println("");
  Serial.print("IP address: ");
  Serial.println(WiFi.localIP());

  ftp.OpenConnection();

  // Get directory content
  ftp.InitFile("Type A");
  String list[128];
  ftp.ChangeWorkDir("/public_html/zyro/gallery_gen/");
  ftp.ContentList("", list);
  Serial.println("\nDirectory info: ");
  for(int i = 0; i < sizeof(list); i++)
  {
    if(list[i].length() > 0)
      Serial.println(list[i]);
    else
      break;
  }

  // Make a new directory
  ftp.InitFile("Type A");
  ftp.MakeDir("my_new_dir");

  // Create the new file and send the image
  ftp.ChangeWorkDir("my_new_dir");
  ftp.InitFile("Type I");
  ftp.NewFile("octocat.jpg");
  ftp.WriteData( octocat_pic, sizeof(octocat_pic) );
  ftp.CloseFile();

  // Create the file new and write a string into it
  ftp.InitFile("Type A");
  ftp.NewFile("hello_world.txt");
  ftp.Write("Hello World");
  ftp.CloseFile();

  ftp.CloseConnection();
}

void loop()
{

}`

from esp32_ftpclient.

ldab avatar ldab commented on May 23, 2024

My guess is that your router or internet provider blocks port 21. You can try to use your smartphone as a hotspot or other network, or other port and see if it works.

from esp32_ftpclient.

kinba3000 avatar kinba3000 commented on May 23, 2024

No, my server stands at home. Port 21 is forwarded and i even tried connecting via LAN. There souldn't be any issues with my network. But i will try it real quick with my smartphone.

from esp32_ftpclient.

kinba3000 avatar kinba3000 commented on May 23, 2024

sorry, can't test it with a diffrent network at the moment. Esp won't connect to my iPhone. But i am sure the network or the provider dosen't make any issues. With FileZilla it works fine to connect to 000webhost.com. Coneccting via CMD works to.

from esp32_ftpclient.

ldab avatar ldab commented on May 23, 2024

I will close the issue as there's not enough evidence showing there is an issue with the library. I can reopen once the test was done on a different network.

from esp32_ftpclient.

kinba3000 avatar kinba3000 commented on May 23, 2024

okay, i will try it soon on a diffrent network. Thanks for you work and help!

from esp32_ftpclient.

kinba3000 avatar kinba3000 commented on May 23, 2024

You were right. Diffrent network/ provider and it works. Not with my own ftp server, but with 000webhostng.com. There is surely no issue with your libary. Thanks for the greate work and the advices. I will now search the problem on my network.

Edit: I had my own dns settings in router settings. Ftp won't handel this right. The issue with my own FTP server was: DelayEngine was on and the server waitet some moments befor answering. In this time, the esp run in a timeout. After turning this off, all worked great.

from esp32_ftpclient.

ldab avatar ldab commented on May 23, 2024

Try enabling the core and other debug to see if it shines a light. If using Arduino IDE I believe it's under tools->coredebug or something like that

from esp32_ftpclient.

Grandoni98 avatar Grandoni98 commented on May 23, 2024

You were right. Diffrent network/ provider and it works. Not with my own ftp server, but with 000webhostng.com. There is surely no issue with your libary. Thanks for the greate work and the advices. I will now search the problem on my network.

Edit: I had my own dns settings in router settings. Ftp won't handel this right. The issue with my own FTP server was: DelayEngine was on and the server waitet some moments befor answering. In this time, the esp run in a timeout. After turning this off, all worked great.

Hello good evening. You know that I am testing the same code with an FTP server that I have created with Windows 10. I get the same error that you had but I have not been able to solve it yet. Could you explain to me how I deactivate the DelayEngine option of my server please.
Beforehand thank you very much.

from esp32_ftpclient.

kinba3000 avatar kinba3000 commented on May 23, 2024

Hey, check your dns settings. I had pihole installed on my linux server. This made some issues wit the libarry if i remember correctly. Like shown above, try a diffrent FTP server outside your network. Hope its helps.

from esp32_ftpclient.

Grandoni98 avatar Grandoni98 commented on May 23, 2024

Hey, check your dns settings. I had pihole installed on my linux server. This made some issues wit the libarry if i remember correctly. Like shown above, try a diffrent FTP server outside your network. Hope its helps.

Thank you very much for your answer. I will try to review and make both suggestions.
Have a nice day.

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.