Apk ftp mit inventor error

hello, i tried the taifun ftp ar app i want to write an ftp apk to load data files. only the application crashes my esp8266. it is configured in access point mode, as soon as I connect the apk, the esp reset! whereas with filezilla ouandftp it works very well?
I forgot something? I put my code, it is very simple. thanks for your reading.

#include <ESP8266WiFi.h>
#include <SD.h>
//#include "ESP8266FtpServer.h"
//#include <SimpleFTPServer.h>
const char* ssid = "xxxxxxxxxx";
const char* password = "xxxxxxxxxx";

// config static IP
IPAddress apIP(192,168,xx,xx);  
IPAddress gateway(192,168,xx,xx);
IPAddress subnet(255,255,255,0); 

FtpServer ftpSrv;//set #define FTP_DEBUG in ESP8266FtpServer.h to see ftp verbose on serial
File root;
void setup(void){
  Serial.begin(115200);
  Serial.println("");
  //Setting the Ip address for the WiFi connectivity
  WiFi.config(apIP,gateway,subnet);
  Serial.println();
  Serial.print("Configuring access point...");
  //Setting the esp to softaccess point mode
  WiFi.mode(WIFI_AP);
  WiFi.disconnect();
  delay(100);
  //changing softAP config and starting the Start AP
  WiFi.softAPConfig(apIP,gateway,subnet);
  WiFi.softAP(ssid,password);

  //2 indicates the Chip select pin
  if (SD.begin(15)) {
      Serial.println("SD opened!");
      ftpSrv.begin("xxxxx","xxxxxxx");    //username, password for ftp.  set ports in ESP8266FtpServer.h  (default 21, 50009 for PASV)
  }   

 //  printDirectory(root,0);
}
void loop(void){
  ftpSrv.handleFTP();        //make sure in loop you call handleFTP()!!   
}
1 Like

I know nothing about ESP8266, but have you read this guideline carefully?


include <ESP8266WiFi.h>
#include <SD.h>
//#include "ESP8266FtpServer.h"
//#include <SimpleFTPServer.h>
const char* ssid = "xxxxxxxxxx";
const char* password = "xxxxxxxxxx";

// config static IP
IPAddress apIP(192,168,xx,xx);
IPAddress gateway(192,168,xx,xx);
IPAddress subnet(255,255,255,0);

FtpServer ftpSrv;//set #define FTP_DEBUG in ESP8266FtpServer.h to see ftp verbose on serial
File root;
void setup(void){
Serial.begin(115200);
Serial.println("");
//Setting the Ip address for the WiFi connectivity
WiFi.config(apIP,gateway,subnet);
Serial.println();
Serial.print("Configuring access point...");
//Setting the esp to softaccess point mode
WiFi.mode(WIFI_AP);
WiFi.disconnect();
delay(100);
//changing softAP config and starting the Start AP
WiFi.softAPConfig(apIP,gateway,subnet);
WiFi.softAP(ssid,password);

//2 indicates the Chip select pin
if (SD.begin(15)) {
Serial.println("SD opened!");
ftpSrv.begin("xxxxx","xxxxxxx"); //username, password for ftp. set ports in ESP8266FtpServer.h (default 21, 50009 for PASV)
}

// printDirectory(root,0);
}
void loop(void){
ftpSrv.handleFTP(); //make sure in loop you call handleFTP()!!
}

Have you double checked this code?

2 Likes

As far as i understand, your App Inventor app including the ftp extension works fine? So this seems to be an issue with your esp8266 code? Sorry, I'm not an expert there... btw. your subject is misleading.... you might want to edit it...

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

1 Like

hello, I may have misspoken: (google translate).
I have my esp code which is a basic code. I downloaded the ftp inventor apk.
when i connect the apk do a reset to my esp.
I also downloaded AndFTP on android, it works very well.
I just wanted to know if I forgot anything or anything else before buying the blocks.
I think I will do otherwise.
thank you

what exactly means "when I connect the apk"? when you start the example apk file?
probably you can find out what happens after using logcat?

Taifun

yes when I launch the application, the esp reset each time I communicate with the app.
Whereas with filezilla and andftp no problem.