lpcware

LPC1115 to send-receive JSON-formatted data through GPRS

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by tbelo on Sat Jan 25 04:49:33 MST 2014
Hi,

The process scenario is as follows:
1) The LPC1115 send AT commands to the GSM/GPRS modem (Huawei MG323-b) for internet connection.
2) Once connected the LPC1115 will construct a JSON formatted serial data from the following like data-->
AT^CMOND
460,01,2540,7ade,3b,722,19,23,33,460,01,2540,7a9a,03,730,18,20,30,460,01,2540,
7a09,32,118,16,19,19,000,000,0000,0000,00,0,0,-,-,000,000,0000,0000,00,0,0,-,-
,000,000,0000,0000,00,0,0,-,-,000,000,0000,0000,00,0,0,-,-


3) After the JSON data will be send to the following URL: https://www.googleapis.com/geolocation/v1/geolocate?key=API_KEY
4) Google will respond with JSON formatted data like -->
{
  "location": {
    "lat": 51.0,
    "lng": -0.1
  },
  "accuracy": 1200.4
}


5) LPC1115 will then parse the Google response and create a struct for further processing.

The question is about the JSON constructor and parser. There are a couple of such open source libraries for C listed in http://json.org like json-c or ajson or jsmn with code size about 1000 lines.
By knowing the limitation of LPC1115 (flash-ram size,redlib library etc)  do you think I can implement such a scenario?

Best regards,
Theodore

Outcomes