storing variables in single array for transmission

Dependencies:   SDFileSystem dspmodified mbed

Fork of FTPGET_Merged by Pravin Magar

Revision:
13:73d6de10d15c
Parent:
12:0ab0a2578025
Child:
14:83b823fdcdd0
--- a/merged_code.cpp	Wed Mar 11 11:42:19 2015 +0000
+++ b/merged_code.cpp	Thu Mar 19 09:13:56 2015 +0000
@@ -9,7 +9,7 @@
 #define freq 1
 #define fft_points 16384
 #define dur_sec 16.384
-#define module_name "TST3"                         //enter module name here
+#define module_name "NTFT"                         //enter module name here
 
 Serial pc(USBTX, USBRX);
 Serial gsm(D1, D0);
@@ -176,7 +176,7 @@
             sprintf(hour_dir,"%s/%s%02d%02d%02d%02d",date_dir,sitename,year,month,date,hour);
             sprintf(filepath,"%s/%s%02d%02d%02d%02d%02d%02d",hour_dir,sitename,year,month,date,hour,minute,second);
             sprintf(filename,"%s%02d%02d%02d%02d%02d%02d",sitename,year,month,date,hour,minute,second);
-            sprintf(ftpputpathname,"%s/%02d%02d/%02d%02d%02d",module_name,year,month,year,month,date);   //  For FTPPUTPATHNAME feature
+            sprintf(ftpputpathname,"%s/%02d%02d/%02d/%02d",module_name,year,month,date,hour);    //  For FTPPUTPATHNAME feature
             //pc.printf("Ftpputpathname is %s\r\n",ftpputpathname);   //    For FTPPUTPATHNAME feature
             gsmerr=0;
             mkdir(main_dir,0777);
@@ -666,11 +666,11 @@
     wait(3);
     if(sendATcommand("AT+FTPTYPE=\"I\"", "OK", 5,0))
     {
-        if(sendATcommand("AT+FTPSERV=\"ftp.ipage.com\"", "OK", 10,0))
+        if(sendATcommand("AT+FTPSERV=\"ftp.panchsheel.biz\"", "OK", 10,0))
         {
-            if(sendATcommand("AT+FTPUN=\"hdwwrite\"", "OK\r", 10,0))
+            if(sendATcommand("AT+FTPUN=\"hardware@panchsheel.biz\"", "OK\r", 10,0))
             {
-                if(sendATcommand("AT+FTPPW=\"Ghdu@3i\"", "OK\r", 10,0)) return 1;      
+                if(sendATcommand("AT+FTPPW=\"DAStest123\"", "OK\r", 10,0)) return 1;      
             }
         }
     }