Offline
Full Member
Karma: 2
Posts: 166
|
 |
« on: October 09, 2012, 12:37:05 pm » |
Hello.I know how to make calls and send SMS using a GSM/GPRS(SIM900) shield for Arduino.But I have a web service at the location http://mydomain.com/rest/receiveSensorData, and I want to send sensor data (or receive) to this URL using a GSM/GPRS shield.How to do this?Code?Ideas?Thanks.
|
|
|
|
« Last Edit: October 10, 2012, 12:03:11 am by antkan »
|
Logged
|
|
|
|
|
Offline
Full Member
Karma: 2
Posts: 166
|
 |
« Reply #1 on: October 10, 2012, 12:15:47 am » |
I want control a led on/off from my site and read temperature sensor from arduino.I want to make this with SIM900 via gprs.What code i need?AT + HTTPACTION?Http operation with get and post?Thanks.
|
|
|
|
|
Logged
|
|
|
|
|
France
Offline
Newbie
Karma: 0
Posts: 20
Mess with the best, die like the rest...
|
 |
« Reply #2 on: October 10, 2012, 09:17:01 am » |
Hello Antkan, I'm on a similar project. And I've found this example: http://www.seeedstudio.com/wiki/index.php?title=GPRS_Shield_v0.9b#ResourcesI have tested it and it works. I can send data to my server. However my next step is to keep this connection active and send/receive data at anytime. ++
|
|
|
|
|
Logged
|
--
vlp
|
|
|
|
Offline
Full Member
Karma: 2
Posts: 166
|
 |
« Reply #3 on: October 10, 2012, 12:57:41 pm » |
Ok.Good example.If i want control a led on/off what code needed?Must read the state of button on site every second?AT + HTTPACTION must be used?
|
|
|
|
|
Logged
|
|
|
|
|
France
Offline
Newbie
Karma: 0
Posts: 20
Mess with the best, die like the rest...
|
 |
« Reply #4 on: October 11, 2012, 06:00:33 am » |
It depends of your server.
In my exemple I have hosted a simple TCP server listening on port 9000 so I use:
mySerial.println("AT+CIPSTART=\"tcp\",\"my-personal-server.com\",\"9000\"");//start up the connection mySerial.println("AT+CIPSEND");//begin send data to remote server
mySerial.println("my_DATA_I_want_to_send");
mySerial.println((char)26);//sending
mySerial.println("AT+CIPCLOSE");//close the connection
|
|
|
|
|
Logged
|
--
vlp
|
|
|
|
Offline
Full Member
Karma: 2
Posts: 166
|
 |
« Reply #5 on: October 11, 2012, 06:05:53 am » |
Ok.Nice.If you want to receive data?What code neeeded?Thanks.
|
|
|
|
|
Logged
|
|
|
|
|
France
Offline
Newbie
Karma: 0
Posts: 20
Mess with the best, die like the rest...
|
 |
« Reply #6 on: October 12, 2012, 04:36:45 am » |
I successfully read data for the first time yesterday :-) !
// into the setup function mySerial.println("AT+CIPSTART=\"tcp\",\"my-personal-server.com\",\"9000\"");//start up the connection
// into the loop function c=mySerial.read(); //
serial.println(c);
|
|
|
|
|
Logged
|
--
vlp
|
|
|
|
|
|
France
Offline
Newbie
Karma: 0
Posts: 20
Mess with the best, die like the rest...
|
 |
« Reply #8 on: October 13, 2012, 07:50:48 am » |
Yes, you can use Processing to interface your project ! Here my first test with websocket: http://lulzepp.tumblr.com/I control 2 servor with a websocket interface. At the moment I use ethenet connection but my goal is to use GPRS !
|
|
|
|
|
Logged
|
--
vlp
|
|
|
|
0
Offline
Full Member
Karma: 1
Posts: 164
http://www.open-electronics.org
|
 |
« Reply #9 on: October 26, 2012, 10:52:04 am » |
You should use our library for SIM900 http://code.google.com/p/gsm-shield-arduino/This library include GPRS functions
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 7
|
 |
« Reply #10 on: March 13, 2013, 08:37:07 am » |
I am getting an error after the AT+CIPSEND command.
any ideas why?
|
|
|
|
|
Logged
|
|
|
|
|
0
Offline
Full Member
Karma: 1
Posts: 164
http://www.open-electronics.org
|
 |
« Reply #11 on: March 13, 2013, 08:38:45 am » |
Are you using the last version?
|
|
|
|
|
Logged
|
|
|
|
|
|