naftpapp Problem

I’ve embedded naftpapp into my application, built with Net+OS 6.0. However, I’m having some problems actually using it. If I power up my system and connect via FTP, it connects just fine, presents me with the password prompt, and allows me to update my firmware. If I perform any network processing with another socket (originated by my app), then I cannot use FTP. Incoming network connections (as in from the web server) doesn’t cause any problems. When the problem occurs, the FPT app connects, but the device never gives the username prompt and the FTP program eventually times out. Power cycle, and I can again upload firmware via FTP. My client code can’t be using the same socket, can it? I have no control over the FTP server, since the main code is built in and there is no source.

Has anyone else seen this kind of behavior? Any ideas how to fix it?

One additional bit of info. It appears that only stream (TCP) outbound connections cause this. UDP does not. I have all debug type printf statements replaced with Syslog via UDP output, and these can go out without causing FTP to quit working.

Right, I stop every thread when I need to upload a new firmware. Otherwise it doesn’t work.


Do you use the first packet to trigger this? Is it a full stop, or just a loop checking a flag set by ftp?

No, the user need to press a button in the WEB page, then all threads are stopped and the FTP server is enabled. Ok it is not very tricky, so if you have an other suggestion…