Discussion Forum

RTX+HTTP+FTP+Telnet+SNMP. problem with uploading via FTP

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Read-Only
Author
Serge Smith
Posted
31-Aug-2010 15:06 GMT
Toolset
ARM
New! RTX+HTTP+FTP+Telnet+SNMP. problem with uploading via FTP

Good day.

board: MCB1700

I've tried all services from SUBJ separatelly. All of them works fine including FTP uploading to the SD-based file system. Then I've joined all of them into the single project.
Now FTP's work has some limits: I can download files from SD, I can remove files from SD. But, if I'm trying to upload any files to SD via FTP then crated file has length 0 bytes. Probably some settings missed or meshed.

Thank you in advance for any advice.

Read-Only
Author
Serge Smith
Posted
1-Sep-2010 07:16 GMT
Toolset
ARM
New! RE: RTX+HTTP+FTP+Telnet+SNMP. problem with uploading via FTP

No errors indicates in ftp_fclose and ftp_fwrite procedures:

/*--------- ftp_fclose -------------------------*/

void ftp_fclose (void *file) {
  /* Close the file opened for reading or writing. */
  if (fclose (file)==0){
          GLCD_ClearLn (6);
          GLCD_DisplayString(6, 0, "File closed");
  }
  else{
          GLCD_ClearLn (6);
          GLCD_DisplayString(6, 0, "Error in file closing");
  }
}
/*--------------- ftp_fwrite ---------------------*/

U16 ftp_fwrite (void *file, U8 *buf, U16 len) {
  /* Write 'len' bytes from buffer 'buf' to a file. */
  U16 x;
  x=fwrite (buf, 1, len, file);
  if (x<len){
          GLCD_ClearLn (5);
          GLCD_DisplayString(5, 0, "Error in write");
  }
  else{
          GLCD_ClearLn (5);
          GLCD_DisplayString(5, 0, "Write done");
  }

  //return (fwrite (buf, 1, len, file));
  return x;
}

What else could be checked for debugging?

Read-Only
Author
Serge Smith
Posted
1-Sep-2010 08:39 GMT
Toolset
ARM
New! RE: RTX+HTTP+FTP+Telnet+SNMP. problem with uploading via FTP

same problem with RTX+HTTP+TFTP+Telnet+SNMP:
TFTP clent's progress bar of uploading shows process as well. After finishing - reports "Uploaded xxxx blocks. MD sum = yyy".
When I'm checking SD card - file's length = 0

PS. Telnet and SNMP are not effecting to HTTP+FTP or TFTP combination. If I'm using empty SD (so HTTP will not work) - same 0 length of uploaded files.

The project was assembled from Http_demo project by joining files from FTP_demo, TFTP_demo.... projects

Read-Only
Author
Serge Smith
Posted
6-Sep-2010 15:00 GMT
Toolset
ARM
New! RE: RTX+HTTP+FTP+Telnet+SNMP. problem with uploading via FTP

Net_debug showed:

TCP: *** Processing TCP frame ***
TCP:  Src. Port: 4700
TCP:  Dest.Port: 1033
TCP:  Seq. Num.: 412607758
TCP:  Ack. Num.: 305135616
TCP:  Flags    : PSH,ACK
TCP:  Win. Size: 65535
TCP:  Checksum : 9577
TCP:  Frame len: 25 bytes
TCP:  Mapped to Active Socket 6
TCP:  Socket 6, State CONNECT...

11111

TCP: Socket 6, Sending Control
TCP:  Src. Port: 1033
TCP:  Dest.Port: 4700
TCP:  Seq. Num.: 305135616
TCP:  Ack. Num.: 412607763
TCP:  Flags    : ACK
TCP:  Win. Size: 4380
TCP:  Checksum : 17C6
TCP:  Frame len: 20 bytes

where 11111 is a content of file which uploaded to FTP.
In FTP_demo project content of file do not showed during uploading with Net_debug option.

Next Thread | Thread List | Previous Thread Start a Thread | Settings