cURL / Mailing Lists / curl-library / Single Mail

curl-library

FTP from an axis camera

From: <laurie.gellatly_at_netic.com>
Date: Sun, 10 Aug 2003 23:07:31 +1000

Hi,
I'm new to libcurl.
I'm trying to get libcurl 7.10.6 on Windows NT to talk to my Axis camera to grab snap shots.
Modified the ftp test script to grab an image and here is the ftp code and its response:
  curl_global_init(CURL_GLOBAL_DEFAULT);
  
  curl = curl_easy_init();
  if(curl) {
    curl_easy_setopt(curl, CURLOPT_URL,
                     "ftp://root:password@10.1.1.44/tmp/resolv.conf");
    /* Define our callback to get called when there's data to be written */
    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, my_fwrite);
    curl_easy_setopt(curl, CURLOPT_FTP_USE_EPRT, TRUE);
    /* Set a pointer to our struct to pass to the callback */
    curl_easy_setopt(curl, CURLOPT_FILE, &ftpfile);
    /* Switch on full protocol/debug output */
    curl_easy_setopt(curl, CURLOPT_VERBOSE, TRUE);
    res = curl_easy_perform(curl);
-------------------------------------
Response:
----------------------
* About to connect() to 10.1.1.44:21
* Connected to 10.1.1.44 (10.1.1.44) port 21
> USER root
> PASS password
* We have successfully logged in
> PWD
* Entry path is '/'
> CWD tmp
> EPSV
> PASV
* Connected the data stream with PASV!
But after that it returns with an error code 13.

What's the best way to debug this?
Have I missed setting some option?
When I point the same code at a sun server it works fine.
When I use NT's FTP command the Axis works fine.

Thanks for your advice all. ...Laurie :{)

-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
Received on 2003-08-10