SIM_debugger
Newbie level 2
Hello,
I try to send data from a SIM900 module to a remote ftp server with GPRS.
Therefore I use a C-Program with AT-commands which are sent to the module over UART-Connection. In the future I want to use a MC instead of a PC, but the testing is done with a PC.
Everything seem to work fine, but the datafile which should be generated does not appear at the Server.
Although the datafile seems not to be generated, it is possible to create a new directory and to change directories whith the corresponding ftp-commands.
Unfortunately I don´t have access to the Operating system of the ftp server and so I cannot check the logfile of the ftp-Server.
Maybe there is missing only a control chacter in one of the AT-commands, but I have no more idea what to test.
In the following I post the relevant C-Code (AT-command) and the message returned from the SIM900-module:
Does anyone have an idea ?
sprintf(AT_cmd, "AT+CIPMUX=1\r");
SIM900 response cleaned : >"AT+CIPMUX=1 OK "<
sprintf(AT_cmd, "AT+CIPMODE?\r");
SIM900 response cleaned : >"AT+CIPMODE? +CIPMODE: 0 OK "<
sprintf(AT_cmd, "AT+CGATT?\r");
SIM900 response cleaned : >"AT+CGATT? +CGATT: 1 OK "<
sprintf(AT_cmd, "AT+CSTT=\"%s\",\"%s\",\"%s\"\r", "internet.eplus.de", "eplus", "gprs");
SIM900 response cleaned : >"AT+CSTT="internet.eplus.de","eplus","gprs" OK "<
sprintf(AT_cmd, "AT+CIICR\r");
SIM900 response cleaned : >"AT+CIICR OK "<
sprintf(AT_cmd, "AT+CIFSR\r");
SIM900 response cleaned : >"AT+CIFSR 10.196.204.35 "<
sprintf(AT_cmd, "AT+CIPSTART=0,\"%s\",\"%s\",%d\r\n", "TCP", "xxx.xxx.xxx.xxx", 21);
SIM900 response cleaned : >"AT+CIPSTART=0,"TCP","xxx.xxx.xxx.xxx",21 OK 0, CONNECT OK +RECEIVE,0,27: 220 Microsoft FTP Service "<
sprintf(AT_cmd, "AT+CIPSEND=0\r\n");
SIM900 response cleaned : >"AT+CIPSEND=0 >
sprintf(AT_cmd, "user XXXXX\r\n%c", 26); //
SIM900 response cleaned : >"user XXXXX 0, SEND OK +RECEIVE,0,34: 331 Password required for XXXXX. "<
sprintf(AT_cmd, "AT+CIPSEND=0\r\n");
SIM900 response cleaned : >"AT+CIPSEND=0 > "<
sprintf(AT_cmd, "pass YYYYY\r\n%c", 26);
SIM900 response cleaned : >"pass YYYYY 0, SEND OK +RECEIVE,0,23: 230-(BLADEXXXXX FTP +RECEIVE,0,27: 230 User XXXXX logged in. "<
sprintf(AT_cmd, "AT+CIPSEND=0\r\n");
SIM900 response cleaned : >"AT+CIPSEND=0 > "<
sprintf(AT_cmd, "PASV\r\n%c", 26);
SIM900 response cleaned : >"PASV 0, SEND OK +RECEIVE,0,48: 227 Entering Passive Mode (xxx,xxx,xxx,xxx,10,151). "<
sprintf(AT_cmd, "AT+CIPSTART=1,\"%s\",\"%s\",\"%ld\"\r\n", "TCP", str_IP, pasv_ftp_port);
SIM900 response cleaned : >"AT+CIPSTART=1,"TCP","xxx.xxx.xxx.xxx","2711" OK 1, CONNECT OK "<
sprintf(AT_cmd, "AT+CIPSEND=0\r\n");
SIM900 response cleaned : >"AT+CIPSEND=0 > "<
sprintf(AT_cmd, "cwd SIM900\r\n%c", 26);
SIM900 response cleaned : >"cwd SIM900 0, SEND OK +RECEIVE,0,29: 250 CWD command successful. "<
sprintf(AT_cmd, "AT+CIPSEND=0\r");
SIM900 response cleaned : >"AT+CIPSEND=0 > "<
sprintf(AT_cmd, "TYPE A\r\n%c", 26);
SIM900 response cleaned : >"TYPE A 0, SEND OK +RECEIVE,0,20: 200 Type set to A. "<
sprintf(AT_cmd, "AT+CIPSEND=0\r\n");
SIM900 response cleaned : >"AT+CIPSEND=0 > "<
sprintf(AT_cmd, "MKD SIMDIR\r\n%c", 26);
SIM900 response cleaned : >"MKD SIMDIR 0, SEND OK +RECEIVE,0,33: 257 "SIMDIR" directory created. "<
sprintf(AT_cmd, "AT+CIPSEND=0\r\n");
SIM900 response cleaned : >"AT+CIPSEND=0 > "<
sprintf(AT_cmd, "STOR test01.txt\r\n%c", 26);
SIM900 response cleaned : >"STOR test01.txt 0, SEND OK +RECEIVE,0,54: 125 Data connection already open; Transfer starting. "<
sprintf(AT_cmd, "AT+CIPSEND=1\r\n");
SIM900 response cleaned : >"AT+CIPSEND=1 > "<
sprintf(AT_cmd, "inhalt01\r\n%c%c", 4, 26);
SIM900 response cleaned : >"hello inhalt01 1, SEND OK "<
sprintf(AT_cmd, "AT+CIPSEND=0\r\n");
SIM900 response cleaned : >"AT+CIPSEND=0 > "<
sprintf(AT_cmd, "QUIT\r\n%c", 26);
SIM900 response cleaned : >"QUIT 0, SEND OK "<
sprintf(AT_cmd, "AT+CIPCLOSE=0,0\r");
SIM900 response cleaned : >"AT+CIPCLOSE=0,0 0, CLOSE OK "<
sprintf(AT_cmd, "AT+CIPCLOSE=1,0\r");
SIM900 response cleaned : >"AT+CIPCLOSE=1,0 1, CLOSE OK "<
sprintf(AT_cmd, "AT+CIPSHUT\r");
SIM900 response cleaned : >"AT+CIPSHUT SHUT OK "<
---------- Post added at 23:24 ---------- Previous post was at 22:25 ----------
în short form : if the ftp-Server is instructed with the STOR-Command to create a new file, how the data-stream into this file can be stopped that the ftp-Server is able to recognize the end of the data-Steam ?
I thougth this is be done with ASCII 4 (EOF)
sprintf(AT_cmd, "STOR test01.txt\r\n%c", 26);
SIM900 response cleaned : >"STOR test01.txt 0, SEND OK +RECEIVE,0,54:125 Data connection already open; Transfer starting. "<sprintf
(AT_cmd, "inhalt01\r\n%c%c", 4, 26);
SIM900 response cleaned : >"inhalt01 1, SEND OK "<
---------- Post added at 23:28 ---------- Previous post was at 23:24 ----------
în short form : if the ftp-Server is instructed with the STOR-Command to create a new file, how the data-stream into this file can be stopped that the ftp-Server is able to recognize the end of the data-Steam ? I thougth this is be done with ASCII 4 (EOF)
sprintf(AT_cmd, "STOR test01.txt\r\n%c", 26);
SIM900 response cleaned : >"STOR test01.txt 0, SEND OK +RECEIVE,0,54:125 Data connection already open; Transfer starting. "<
sprintf(AT_cmd, "inhalt01\r\n%c%c", 4, 26);
SIM900 response cleaned : >"inhalt01 1, SEND OK "<
I try to send data from a SIM900 module to a remote ftp server with GPRS.
Therefore I use a C-Program with AT-commands which are sent to the module over UART-Connection. In the future I want to use a MC instead of a PC, but the testing is done with a PC.
Everything seem to work fine, but the datafile which should be generated does not appear at the Server.
Although the datafile seems not to be generated, it is possible to create a new directory and to change directories whith the corresponding ftp-commands.
Unfortunately I don´t have access to the Operating system of the ftp server and so I cannot check the logfile of the ftp-Server.
Maybe there is missing only a control chacter in one of the AT-commands, but I have no more idea what to test.
In the following I post the relevant C-Code (AT-command) and the message returned from the SIM900-module:
Does anyone have an idea ?
sprintf(AT_cmd, "AT+CIPMUX=1\r");
SIM900 response cleaned : >"AT+CIPMUX=1 OK "<
sprintf(AT_cmd, "AT+CIPMODE?\r");
SIM900 response cleaned : >"AT+CIPMODE? +CIPMODE: 0 OK "<
sprintf(AT_cmd, "AT+CGATT?\r");
SIM900 response cleaned : >"AT+CGATT? +CGATT: 1 OK "<
sprintf(AT_cmd, "AT+CSTT=\"%s\",\"%s\",\"%s\"\r", "internet.eplus.de", "eplus", "gprs");
SIM900 response cleaned : >"AT+CSTT="internet.eplus.de","eplus","gprs" OK "<
sprintf(AT_cmd, "AT+CIICR\r");
SIM900 response cleaned : >"AT+CIICR OK "<
sprintf(AT_cmd, "AT+CIFSR\r");
SIM900 response cleaned : >"AT+CIFSR 10.196.204.35 "<
sprintf(AT_cmd, "AT+CIPSTART=0,\"%s\",\"%s\",%d\r\n", "TCP", "xxx.xxx.xxx.xxx", 21);
SIM900 response cleaned : >"AT+CIPSTART=0,"TCP","xxx.xxx.xxx.xxx",21 OK 0, CONNECT OK +RECEIVE,0,27: 220 Microsoft FTP Service "<
sprintf(AT_cmd, "AT+CIPSEND=0\r\n");
SIM900 response cleaned : >"AT+CIPSEND=0 >
sprintf(AT_cmd, "user XXXXX\r\n%c", 26); //
SIM900 response cleaned : >"user XXXXX 0, SEND OK +RECEIVE,0,34: 331 Password required for XXXXX. "<
sprintf(AT_cmd, "AT+CIPSEND=0\r\n");
SIM900 response cleaned : >"AT+CIPSEND=0 > "<
sprintf(AT_cmd, "pass YYYYY\r\n%c", 26);
SIM900 response cleaned : >"pass YYYYY 0, SEND OK +RECEIVE,0,23: 230-(BLADEXXXXX FTP +RECEIVE,0,27: 230 User XXXXX logged in. "<
sprintf(AT_cmd, "AT+CIPSEND=0\r\n");
SIM900 response cleaned : >"AT+CIPSEND=0 > "<
sprintf(AT_cmd, "PASV\r\n%c", 26);
SIM900 response cleaned : >"PASV 0, SEND OK +RECEIVE,0,48: 227 Entering Passive Mode (xxx,xxx,xxx,xxx,10,151). "<
sprintf(AT_cmd, "AT+CIPSTART=1,\"%s\",\"%s\",\"%ld\"\r\n", "TCP", str_IP, pasv_ftp_port);
SIM900 response cleaned : >"AT+CIPSTART=1,"TCP","xxx.xxx.xxx.xxx","2711" OK 1, CONNECT OK "<
sprintf(AT_cmd, "AT+CIPSEND=0\r\n");
SIM900 response cleaned : >"AT+CIPSEND=0 > "<
sprintf(AT_cmd, "cwd SIM900\r\n%c", 26);
SIM900 response cleaned : >"cwd SIM900 0, SEND OK +RECEIVE,0,29: 250 CWD command successful. "<
sprintf(AT_cmd, "AT+CIPSEND=0\r");
SIM900 response cleaned : >"AT+CIPSEND=0 > "<
sprintf(AT_cmd, "TYPE A\r\n%c", 26);
SIM900 response cleaned : >"TYPE A 0, SEND OK +RECEIVE,0,20: 200 Type set to A. "<
sprintf(AT_cmd, "AT+CIPSEND=0\r\n");
SIM900 response cleaned : >"AT+CIPSEND=0 > "<
sprintf(AT_cmd, "MKD SIMDIR\r\n%c", 26);
SIM900 response cleaned : >"MKD SIMDIR 0, SEND OK +RECEIVE,0,33: 257 "SIMDIR" directory created. "<
sprintf(AT_cmd, "AT+CIPSEND=0\r\n");
SIM900 response cleaned : >"AT+CIPSEND=0 > "<
sprintf(AT_cmd, "STOR test01.txt\r\n%c", 26);
SIM900 response cleaned : >"STOR test01.txt 0, SEND OK +RECEIVE,0,54: 125 Data connection already open; Transfer starting. "<
sprintf(AT_cmd, "AT+CIPSEND=1\r\n");
SIM900 response cleaned : >"AT+CIPSEND=1 > "<
sprintf(AT_cmd, "inhalt01\r\n%c%c", 4, 26);
SIM900 response cleaned : >"hello inhalt01 1, SEND OK "<
sprintf(AT_cmd, "AT+CIPSEND=0\r\n");
SIM900 response cleaned : >"AT+CIPSEND=0 > "<
sprintf(AT_cmd, "QUIT\r\n%c", 26);
SIM900 response cleaned : >"QUIT 0, SEND OK "<
sprintf(AT_cmd, "AT+CIPCLOSE=0,0\r");
SIM900 response cleaned : >"AT+CIPCLOSE=0,0 0, CLOSE OK "<
sprintf(AT_cmd, "AT+CIPCLOSE=1,0\r");
SIM900 response cleaned : >"AT+CIPCLOSE=1,0 1, CLOSE OK "<
sprintf(AT_cmd, "AT+CIPSHUT\r");
SIM900 response cleaned : >"AT+CIPSHUT SHUT OK "<
---------- Post added at 23:24 ---------- Previous post was at 22:25 ----------
în short form : if the ftp-Server is instructed with the STOR-Command to create a new file, how the data-stream into this file can be stopped that the ftp-Server is able to recognize the end of the data-Steam ?
I thougth this is be done with ASCII 4 (EOF)
sprintf(AT_cmd, "STOR test01.txt\r\n%c", 26);
SIM900 response cleaned : >"STOR test01.txt 0, SEND OK +RECEIVE,0,54:125 Data connection already open; Transfer starting. "<sprintf
(AT_cmd, "inhalt01\r\n%c%c", 4, 26);
SIM900 response cleaned : >"inhalt01 1, SEND OK "<
---------- Post added at 23:28 ---------- Previous post was at 23:24 ----------
în short form : if the ftp-Server is instructed with the STOR-Command to create a new file, how the data-stream into this file can be stopped that the ftp-Server is able to recognize the end of the data-Steam ? I thougth this is be done with ASCII 4 (EOF)
sprintf(AT_cmd, "STOR test01.txt\r\n%c", 26);
SIM900 response cleaned : >"STOR test01.txt 0, SEND OK +RECEIVE,0,54:125 Data connection already open; Transfer starting. "<
sprintf(AT_cmd, "inhalt01\r\n%c%c", 4, 26);
SIM900 response cleaned : >"inhalt01 1, SEND OK "<