From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

InetFTPChangeDir problem

I have been using an application on my XP PC built with Labwindows 8.1 for some time now. The application FTP's files to another stand alone Single board computer. Never a problem.

I recently upgraded to Labwindows 2010. I build the application and launch it in either debug or release mode. Now I am having problems with the FTP.

 

When I issue the command:

InetFTPChangeDir (ftp_handle, "cd \\temp");

It just sits there for about 30 seconds and then returns the error:

Return Value = -4

System Socket Error

 

If I go back to using the app built with Labwindows 8.1 it works fine.

 

Any help would be greatly appreciated.

 

Thanks!

John W.

.

 

0 Kudos
Message 1 of 4
(3,447 Views)

Hi,

 

based on the information I have seen, there are two of the most common reasons for a System Socket Error.

 

First, a port conflict or similar issue:

http://digital.ni.com/public.nsf/allkb/862567530005F09C862565ED0047E029?OpenDocument

 

or accidental use of a termination character.

Evan See
National Instruments
0 Kudos
Message 2 of 4
(3,425 Views)

Thanks for the reply. I don't think that is the cause of my problem.

In the original post I stated that my application works fine if built on Labwindows 8.1

When I build it on Labwindows 2010, I get the error when trying to change the directory on the SBC that my program is controlling

 

Thanks

John W.

0 Kudos
Message 3 of 4
(3,382 Views)

When running 8.1 are you on the same computer, if so can you send the exact same string "cd \\temp" successfully? It appears the cd may be redundant as the command is expecting a const char * of the path.

 

A way to troubleshoot this could be through the use of the included FTP example which uses the same InetFTPChangeDir command to ensure the connection and function are working properly to narrow down where the issue lies.

 

The example can be found under:

<examples>\internet\ftpclnt\ftpclnt.cws

Evan See
National Instruments
0 Kudos
Message 4 of 4
(3,369 Views)