FTP App Failing

I have been having trouble with modules appearing to “lock up”. I have traced the problem to an errant build (or brand new modules) presenting the setup dialog prompt at startup, and my app on the other CPU sending data during this time, putting the module into the menu. In trying to fix this, I managed to hose a few modules, so I need to recover them with the short pins/TFTP method.

So, I’m trying to rebuild my app to remove the dialog, and in the process ESP prompts me to install updates, and I do. I also build a new FTP server sample project to use for the TFTP program to get a base install that should be close to what’s in a brand new module.

I power up with the pins shorted, the TFTPD32 program shows the module connect and download the image.bin of the FTP sample, and I release the short and wait for the module to reboot. So far, so good, this all works as expected.

However, when the module reboots and I connect via FTP and try to send the image.bin of my app (or any other app, including old versions), I get an FTP error.

For example, using the Windows command line FTP:

Connected to 129.63.31.5.
220 NET+OS 7.4.2 FTP server ready.
User (129.63.31.5:(none)): root
331 User root OK, send password.
Password:
230 Password OK.
ftp> bin
200 Type set to I.
ftp> put image.bin
200 PORT command Ok.
425 Unable to open data connection, network error
ftp> bye
221 Goodbye.

There is probably 20 seconds of delay between the 200 line and the 425 line.

What could be the problem here? DigiESP is up to date on 7.4 as of yesterday.

Jeff.

Ideas:

  1. Make sure you don’t have a firewall between your PC and the Digi. FTP creates a second channel for data. Try doing a “dir” and see if that works. (Open port 25 on your PC.)
  2. You don’t need the “binary” command.
  3. Although it appears to be a network connection issue, check for remaining memory.
  4. Try the -a flag with FTP in Windows.
  5. Manually debug the ftp connection with the “-d” command.

-Erik

  1. Make sure you don’t have a firewall between your PC and the Digi. FTP creates a second channel for data. Try doing a “dir” and see if that works. (Open port 25 on your PC.)

I’m fairly certain that isn’t the case. I’ve been updating devices on this PC since it was built almost a year ago. This is something new.

  1. You don’t need the “binary” command.

Ok. Since I was sending binary data and not text, I thought it was required. I’ve been doing it that way since 6.0f and it hasn’t caused any issues.

  1. Although it appears to be a network connection issue, check for remaining memory.

Remaining memory where, and how to check?

  1. Try the -a flag with FTP in Windows.
  2. Manually debug the ftp connection with the “-d” command.

I’ll give these a try this morning. I’ll also try to capture it with Wireshark.

Thanks for the pointers,
Jeff.

Apparently corporate changed my firewall settings without telling me. Opening up FTP again seems to have worked.