user3802839
user3802839

Reputation: 11

use REST api to communicate to server using GSM client in arduino

I am new to the arduino platform. I want to use REST api for communication between my web server and GSM/GPRS. i have already created a REST api for communication between my android app and web server, but now i want to fire the same REST api(GET request) using GSM/GPRS client in arduino and want to read the response from the server. FYI i am using arduino uno for atmega328-pu. I tried searching in the web but ultimately ended up getting nothing useful. Any help will be highly appreciated. Thanks in advance.

Upvotes: 1

Views: 4945

Answers (2)

Which GSM/GPRS shield are you using? If it supports the official GSM library you can use that or if it is a Seeedstudio GPRS Shield use my GSMGPRS_Shield. Anyway then use my fork of arduino-restclient or modify it if you use the default GSM library.

Let me know if that helps you. Otherwise I have some more examples etc I can post.

Upvotes: 0

ofrommel
ofrommel

Reputation: 2177

From what you write, it is not entirely clear if you want to use the Arduino as a REST client or server. For setting up a server on it, your best bet will be to use the Webduino library that implements GET and POST methods.

Depending on the type of networking hardware (Wifi, Ethernet) you are using, there will be an implementation of the "Client" interface that you can use for sending HTTP requests. See this example for the Ethernet client: http://arduino.cc/en/Tutorial/WebClient

The code for the GSM client is in the GSM library, that you can find here: http://arduino.cc/en/Reference/GSM

There's also a sample for using the GSM client: http://arduino.cc/en/Tutorial/GSMExamplesWebClient

Upvotes: 2

Related Questions