Loading...
Pages: [1]   Go Down
Author Topic: Use Arduino GSM/GPRS(SIM900) shield to send and receive data to my web service  (Read 5558 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 2
Posts: 163
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

Offline Offline
Full Member
***
Karma: 2
Posts: 163
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

France
Offline Offline
Newbie
*
Karma: 0
Posts: 20
Mess with the best, die like the rest...
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

++
Logged

--

vlp

Offline Offline
Full Member
***
Karma: 2
Posts: 163
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

France
Offline Offline
Newbie
*
Karma: 0
Posts: 20
Mess with the best, die like the rest...
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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 Offline
Full Member
***
Karma: 2
Posts: 163
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok.Nice.If you want to receive data?What code neeeded?Thanks.
Logged

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

France
Offline Offline
Newbie
*
Karma: 0
Posts: 20
Mess with the best, die like the rest...
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Full Member
***
Karma: 2
Posts: 163
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok.I find this http://projects.sindrelindstad.com/how-to-led-arduino-php-proc/ .How convert his code for connect arduino with gprs shield?
Logged

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

France
Offline Offline
Newbie
*
Karma: 0
Posts: 20
Mess with the best, die like the rest...
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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 Offline
Full Member
***
Karma: 1
Posts: 164
http://www.open-electronics.org
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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


Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

any ideas why?
Logged

0
Offline Offline
Full Member
***
Karma: 1
Posts: 164
http://www.open-electronics.org
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Are you using the last version?
Logged


Pages: [1]   Go Up
Print
 
Jump to: