<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>LPC MicrocontrollersのトピックRe: LPC1115 to send-receive JSON-formatted data through GPRS</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1115-to-send-receive-JSON-formatted-data-through-GPRS/m-p/534813#M10895</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by celephicus on Thu Jan 30 22:43:07 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using JSON-RPC to talk to an app running on an Android. I used jsmn (Search on Google) as a starting point, and ended up a parser using about 800 bytes of Flash and 256 bytes of RAM, and a JSON data formatter using 400 bytes of Flash.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mind you it does use a stripped down printf() and strncmp(), and the both the parser and the dumper call themselves recursively, which puts some people right off.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So you can. The JSON-RPC server is the most reliable part of the project. JSON is great as we can fake either end of the link using Python on a PC to generate/parse JSON.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 19:35:43 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T19:35:43Z</dc:date>
    <item>
      <title>LPC1115 to send-receive JSON-formatted data through GPRS</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1115-to-send-receive-JSON-formatted-data-through-GPRS/m-p/534812#M10894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tbelo on Sat Jan 25 04:49:33 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The process scenario is as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1) The LPC1115 send AT commands to the GSM/GPRS modem (Huawei MG323-b) for internet connection.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) Once connected the LPC1115 will construct a JSON formatted serial data from the following like data--&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;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,-,-&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;3) After the JSON data will be send to the following URL: &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fwww.googleapis.com%2Fgeolocation%2Fv1%2Fgeolocate%3Fkey%3DAPI_KEY" rel="nofollow noopener noreferrer" target="_blank"&gt;https://www.googleapis.com/geolocation/v1/geolocate?key=API_KEY&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4) Google will respond with JSON formatted data like --&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;{
&amp;nbsp; "location": {
&amp;nbsp;&amp;nbsp;&amp;nbsp; "lat": 51.0,
&amp;nbsp;&amp;nbsp;&amp;nbsp; "lng": -0.1
&amp;nbsp; },
&amp;nbsp; "accuracy": 1200.4
}&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;5) LPC1115 will then parse the Google response and create a struct for further processing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;The question is about the JSON constructor and parser. There are a couple of such open source libraries for C listed in &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fjson.org" rel="nofollow noopener noreferrer" target="_blank"&gt;http://json.org&lt;/A&gt;&lt;SPAN&gt; like json-c or ajson or jsmn with code size about 1000 lines.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;By knowing the limitation of LPC1115 (flash-ram size,redlib library etc)&amp;nbsp; do you think I can implement such a scenario?&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Theodore&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:35:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1115-to-send-receive-JSON-formatted-data-through-GPRS/m-p/534812#M10894</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1115 to send-receive JSON-formatted data through GPRS</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1115-to-send-receive-JSON-formatted-data-through-GPRS/m-p/534813#M10895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by celephicus on Thu Jan 30 22:43:07 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using JSON-RPC to talk to an app running on an Android. I used jsmn (Search on Google) as a starting point, and ended up a parser using about 800 bytes of Flash and 256 bytes of RAM, and a JSON data formatter using 400 bytes of Flash.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mind you it does use a stripped down printf() and strncmp(), and the both the parser and the dumper call themselves recursively, which puts some people right off.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So you can. The JSON-RPC server is the most reliable part of the project. JSON is great as we can fake either end of the link using Python on a PC to generate/parse JSON.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:35:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1115-to-send-receive-JSON-formatted-data-through-GPRS/m-p/534813#M10895</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:35:43Z</dc:date>
    </item>
  </channel>
</rss>

