ghtfgtr

Dependencies:   FTPClient SDFileSystem WIZnetInterface_Ricky mbed

Files at this revision

API Documentation at this revision

Comitter:
wiznetw7500
Date:
Tue Nov 28 09:47:16 2017 +0000
Commit message:
ghytfrf

Changed in this revision

FTPClient.lib Show annotated file Show diff for this revision Revisions of this file
SDFileSystem.lib Show annotated file Show diff for this revision Revisions of this file
WIZnetInterface.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/FTPClient.lib	Tue Nov 28 09:47:16 2017 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/users/Ricky_Kwon/code/FTPClient/#4fd8e5cd6307
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SDFileSystem.lib	Tue Nov 28 09:47:16 2017 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/wiznetw7500/code/SDFileSystem/#ae429fce36c2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/WIZnetInterface.lib	Tue Nov 28 09:47:16 2017 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/teams/WIZnet/code/WIZnetInterface_Ricky/#5a1969320666
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Nov 28 09:47:16 2017 +0000
@@ -0,0 +1,60 @@
+#include "mbed.h"
+#include "SDFileSystem.h"
+#include "EthernetInterface.h"
+#include "FTPClient.h"
+#include <string.h>
+#include <stdio.h>
+#define FTP_SERVER_PORT     21
+ static char buf[256];
+static char ID[]={"user"};                   //Set FTPServer Login ID
+static char PASSWORD[]={"1234"};             //Set FTPServer Login Password
+FTPClient FTP(PB_3, PB_2, PB_1, PB_0, "sd"); // WIZwiki-W7500 
+Serial pc(USBTX, USBRX);
+int main() {
+     pc.baud(9600);
+    
+    pc.printf("------------------------------FTP Client Example-------------------------------------------!\r\n"); 
+      
+  
+    char ftpServer_control_ip_addr[] = "demo.wftpserver.com"; // FTP Server location
+    char* userid = "demo-user"; //FTP Server User ID
+    char* password = "demo-user"; //FTP Server Password
+      EthernetInterface eth;
+      uint8_t mac_addr[6] = {0x00, 0x08, 0xdc, 0x12, 0x34, 0x45};
+      char IP_Addr[] = "192.168.0.100";
+char IP_Subnet[] = "255.255.255.0";
+char IP_Gateway[] = "192.168.0.1";
+    eth.init(mac_addr, IP_Addr, IP_Subnet, IP_Gateway); //Use Static
+    eth.connect();
+    pc.printf("The IP address of the client is %s\r\n",eth.getIPAddress());
+    
+    while(1) {
+       char Msg_c = pc.getc();
+            
+    if(Msg_c==0x31){
+               
+                    pc.printf("Connecting...FTPServer\r\nIP:%s, PORT:%d\r\n", ftpServer_control_ip_addr, FTP_SERVER_PORT);
+                   int n  = FTP.open("demo.wftpserver.com", 21,"demo-user","demo-user");
+                    pc.printf("%d\r\n",n);
+                     wait(10);
+                    printf("The Files and folders available in the server are :\r\n");
+                    FTP.ls();
+                    printf("\r\n");
+                     wait(10);
+                    printf("The Files in upload folder are :\r\n");
+                    FTP.cd("/upload");
+                    FTP.ls();
+                    wait(10);
+                    printf("The Files in download folder are :\r\n");
+                    FTP.cd("/download");
+                    FTP.ls();
+                    printf("\r\n");
+                   wait(10);
+                     
+            }    
+
+             
+     }    
+            
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Nov 28 09:47:16 2017 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/fb8e0ae1cceb
\ No newline at end of file