Site icon Renzo Mischianti

simpleFTPserver in AP mode

Hi, First of all, thanks for all of your work, this is great ! I am using an esp12e board, and i use it as a WiFi access point, and i implmented you simpleFTPserver in my code. As i read it, it is pretty simple to do it, i only had to update local IP address, because in AP mode, the lib does not do it. The FTP server couldn't work correctly because of 0.0.0.0 local IP address.
  IPAddress myIP = WiFi.softAPIP();
   IPAddress gateway(0, 0, 0, 0); // set gateway to match your network -> but i do not use :)
  IPAddress subnet(255, 255, 255, 0); // set subnet mask to match your network
  WiFi.config(myIP, gateway, subnet);
I am using serial interface to grab some datas and write it on SD card. But for some reason, FTP server seems to stop working correctly when working with serial. So i am mannaged to stop sending serial datas when client connected to ftpServer, it seems better but i still have some issues. So my question (at least ! ;) ) is : is it possible to stop the FTP server for a while (i would like to stop it when no client is connected on WiFi AP) and start it when a WiFi client gets connected ? Have a nice day, Dominique
Exit mobile version