Go Down

Topic: Use Arduino GSM/GPRS(SIM900) shield to send and receive data to my web service (Read 14 times) previous topic - next topic

power7net

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.
Web / sms / bluetooth / arduino / android remote control. Home Automation projects.
http://www.power7.net

power7net

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.
Web / sms / bluetooth / arduino / android remote control. Home Automation projects.
http://www.power7.net

vlp_arduino

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#Resources

I 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.

++
vlp

power7net

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?
Web / sms / bluetooth / arduino / android remote control. Home Automation projects.
http://www.power7.net

vlp_arduino

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
vlp

power7net

Web / sms / bluetooth / arduino / android remote control. Home Automation projects.
http://www.power7.net

vlp_arduino

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);

vlp

power7net

Web / sms / bluetooth / arduino / android remote control. Home Automation projects.
http://www.power7.net

vlp_arduino

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 !
vlp

OpenElectronics

You should use our library for SIM900 http://code.google.com/p/gsm-shield-arduino/
This library include GPRS functions

http://www.open-electronics.org

sheldonreddy

I am getting an error after the AT+CIPSEND command.

any ideas why?

OpenElectronics


http://www.open-electronics.org

nikschavan

@vlp_arduino : I can Send data to web server from SIM900, but i want to receive the data from web server.

to use c=mySerial.read();  what is your server side code ?
Can you share some of your server side programming?

OpenElectronics

On open-electronics.org you can find all info
http://www.open-electronics.org/tag/gsm-shield/

http://www.open-electronics.org

OpenElectronics

More example for HTTP connection
http://www.open-electronics.org/the-gsmgprs-gps-shield-some-http-connections-examples/

http://www.open-electronics.org

Go Up