Send data with gprs shiel
Posted: Mon Jan 23, 2017 10:58 am
Hello, several amonths ago I bought the GPRS Shiel SIM900 from geeetech is this http://www.geeetech.com/wiki/index.php/ ... PRS_Shield
I tried the connection with this program "For gprs networking test.rar" and works well, now i decide to use your example to send data to cosm, using the pachube and here is the result of monitor.
AT+CGATT?
+CGATT: 1
OK
AT+CSTT="internet.ideasclaro"
+CME ERROR: 3
AT+CIICR
+CME ERROR: 3
AT+CIFSR
10.66.76.32
AT+CIPSPRT=0
OK
AT+CIPSTART="tcp","104.218.50.146","80"
OK
AT+CIPSEND
+CME ERROR: 3
CONNECT OK
{"method": "put","resource": "/feeds/42742/","params": {},"headers": {"X-PachubeApiKey": "_cXwr5LE8qW4a296O-cDwOUvfddFer5pGmaRigPsiO0jEB9OjK-W6vej56j9ItaSlIac-hgbQjxExuveD95yc8BttXcZ7_seZqLVjeCOmNbEXUva45t6FL8AxOcuNSsQS"},"body": {"version": "1.0.0","datastreams": [{"id": "01","current_value": "60.56"},
ERROR
{"id": "02","current_value": "1031"},
{"id": "03","current_value": "1242"},
{"id": "04","current_value": "30"}]},"token": "lee"}
AT+CIPCLOSE
CLOSE OK
AT+CGATT?
+CGATT: 1
OK
AT+CSTT="internet.ideasclaro"
+CME ERROR: 3
AT+CIICR
+CME ERROR: 3
AT+CIFSR
10.66.76.32
AT+CIPSPRT=0
OK
AT+CIPSTART="tcp","104.218.50.146","80"
OK
CONNECT OK
AT+CIPSEND
{"method": "put","resource": "/feeds/42742/","params": {},"headers": {"X-PachubeApiKey": "_cXwr5LE8qW4a296O-cDwOUvfddFer5pGmaRigPsiO0jEB9OjK-W6vej56j9ItaSlIac-hgbQjxExuveD95yc8BttXcZ7_seZqLVjeCOmNbEXUva45t6FL8AxOcuNSsQS"},"body": {"version": "1.0.0","datastreams": [{"id": "01","current_value": "60.56"},
{"id": "02","current_value": "1031"},
{"id": "03","current_value": "1242"},
{"id": "04","current_value": "30"}]},"token": "lee"}
SEND OK
AT+CIPCLOSE
CLOSE OK
As you can see I sent the data twice, the first one show me a "CME+ERROR 3" marked with red and the second no problem at all!!!!...
I'm getting crazy with that, why with the first time gave a problem and the second no problem, with the same source code. could you help me?!
I tried the connection with this program "For gprs networking test.rar" and works well, now i decide to use your example to send data to cosm, using the pachube and here is the result of monitor.
AT+CGATT?
+CGATT: 1
OK
AT+CSTT="internet.ideasclaro"
+CME ERROR: 3
AT+CIICR
+CME ERROR: 3
AT+CIFSR
10.66.76.32
AT+CIPSPRT=0
OK
AT+CIPSTART="tcp","104.218.50.146","80"
OK
AT+CIPSEND
+CME ERROR: 3
CONNECT OK
{"method": "put","resource": "/feeds/42742/","params": {},"headers": {"X-PachubeApiKey": "_cXwr5LE8qW4a296O-cDwOUvfddFer5pGmaRigPsiO0jEB9OjK-W6vej56j9ItaSlIac-hgbQjxExuveD95yc8BttXcZ7_seZqLVjeCOmNbEXUva45t6FL8AxOcuNSsQS"},"body": {"version": "1.0.0","datastreams": [{"id": "01","current_value": "60.56"},
ERROR
{"id": "02","current_value": "1031"},
{"id": "03","current_value": "1242"},
{"id": "04","current_value": "30"}]},"token": "lee"}
AT+CIPCLOSE
CLOSE OK
AT+CGATT?
+CGATT: 1
OK
AT+CSTT="internet.ideasclaro"
+CME ERROR: 3
AT+CIICR
+CME ERROR: 3
AT+CIFSR
10.66.76.32
AT+CIPSPRT=0
OK
AT+CIPSTART="tcp","104.218.50.146","80"
OK
CONNECT OK
AT+CIPSEND
{"method": "put","resource": "/feeds/42742/","params": {},"headers": {"X-PachubeApiKey": "_cXwr5LE8qW4a296O-cDwOUvfddFer5pGmaRigPsiO0jEB9OjK-W6vej56j9ItaSlIac-hgbQjxExuveD95yc8BttXcZ7_seZqLVjeCOmNbEXUva45t6FL8AxOcuNSsQS"},"body": {"version": "1.0.0","datastreams": [{"id": "01","current_value": "60.56"},
{"id": "02","current_value": "1031"},
{"id": "03","current_value": "1242"},
{"id": "04","current_value": "30"}]},"token": "lee"}
SEND OK
AT+CIPCLOSE
CLOSE OK
As you can see I sent the data twice, the first one show me a "CME+ERROR 3" marked with red and the second no problem at all!!!!...
I'm getting crazy with that, why with the first time gave a problem and the second no problem, with the same source code. could you help me?!