{"id":136,"date":"2014-11-23T16:27:29","date_gmt":"2014-11-23T14:27:29","guid":{"rendered":"http:\/\/gronlier.fr\/blog\/?p=136"},"modified":"2020-03-30T12:43:45","modified_gmt":"2020-03-30T09:43:45","slug":"seeeduino-arch-gprs-v2","status":"publish","type":"post","link":"https:\/\/gronlier.fr\/blog\/2014\/11\/seeeduino-arch-gprs-v2\/","title":{"rendered":"Seeeduino Arch GPRS V2"},"content":{"rendered":"<p>I just received my <a href=\"http:\/\/www.seeedstudio.com\/wiki\/Arch_GPRS_V2\" target=\"_blank\" rel=\"noopener noreferrer\">Seeeduino Arch GPRS V2<\/a>. The doc is as light as the price \ud83d\ude42 So don't be afraid and open the Eagle file and the bottom of the product wiki page.<\/p>\n<p>You'll also need the <a href=\"http:\/\/www.nxp.com\/documents\/data_sheet\/LPC11U3X.pdf\" target=\"_blank\" rel=\"noopener noreferrer\">LPC11U37<\/a> datasheet and <a href=\"http:\/\/wm.sim.com\/downloaden.aspx?id=2808\"><span class=\"n2\">AN_SIM900 Reference Design Guide_V1.02 <\/span><\/a>(you might find an online copy of the pdf is you don't want to register yourself).<\/p>\n<p><!--more--><\/p>\n<h2>Power the SIM900<\/h2>\n<p><a href=\"http:\/\/gronlier.fr\/blog\/2014\/11\/seeeduino-arch-gprs-v2\/sim900_power01\/\" rel=\"attachment wp-att-139\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-139 size-thumbnail\" src=\"http:\/\/gronlier.fr\/blog\/wp-content\/uploads\/2014\/11\/sim900_power01-150x150.jpg\" alt=\"sim900_power01\" width=\"150\" height=\"150\" \/><\/a><\/p>\n<p>Looking at the schematic,\u00a0<span class=\"lang:default highlight:0 decode:true  crayon-inline \">POI1_7<\/span>\u00a0\u00a0 is driving\u00a0 the\u00a0<span class=\"lang:default highlight:0 decode:true  crayon-inline \">PWRKEY<\/span>\u00a0 pin of the SIM900. And from the Reference guide, we can read:<\/p>\n<blockquote><p>The simplest way to turn on\/off SIM900 is to drive the PWRKEY to a low level for 1 second then release.<\/p><\/blockquote>\n<p><a href=\"http:\/\/gronlier.fr\/blog\/2014\/11\/seeeduino-arch-gprs-v2\/sim900_power02\/\" rel=\"attachment wp-att-141\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-141 size-thumbnail\" src=\"http:\/\/gronlier.fr\/blog\/wp-content\/uploads\/2014\/11\/sim900_power02-150x150.jpg\" alt=\"sim900_power02\" width=\"150\" height=\"150\" \/><\/a><\/p>\n<p><span class=\"lang:default highlight:0 decode:true  crayon-inline \">POI_2<\/span>\u00a0\u00a0is also used to enable the EG10 power switch. The trigger is done by changing the pin from HIGH to LOW as depicted on the schematic.<\/p>\n<p>That gives you the following code:<\/p>\n<pre class=\"lang:c++ decode:true \">#define PINPWR                  P1_2\r\n#define PINONOFF                P1_7 \r\n\r\nDigitalOut eg10_pwr(PINPWR);\r\nDigitalOut eg10_on(PINONOFF);\r\n\r\n\r\nvoid EG10PowerUp(void)\r\n{\r\n    eg10_pwr = 1;\r\n    eg10_on  = 1;\r\n    wait(0.5);\r\n    eg10_pwr = 0;\r\n    eg10_on = 0;\r\n    wait(1);\r\n    eg10_on = 1;\r\n    wait(0.5);\r\n}<\/pre>\n<h2>Simple GSM test<\/h2>\n<p>Now you can upload the following code.<\/p>\n<p>It'll switch on the SIM900, send the AT command to the modem, read whatever the modem sent back and forward it on the USBSerial console.<\/p>\n<p>If it works correctly, you should see the red STATUS led switching on and the green NETLIGHT led blinking.<\/p>\n<p>Also, if you open a terminal emulator on your PC, you should see:<\/p>\n<pre class=\"theme:dark-terminal lang:default decode:true\">I am a virtual serial port\r\nAT\r\n\r\nOK\r\n<\/pre>\n<p>&nbsp;<\/p>\n<pre class=\"lang:c++ decode:true \" title=\"sample_echo_gprs\">#include \"mbed.h\"\r\n#include \"USBSerial.h\"\r\n\r\n#define TX_GSM P1_27\r\n#define RX_GSM P1_26\r\n\r\n#define TX_DEBUG P1_18\r\n#define RX_DEBUG P1_17\r\n\r\n\r\nDigitalOut myled1(LED1); \/\/left most LED if board is held as shown in Pinout diagram above\r\nDigitalOut myled2(LED4); \/\/2nd from left\r\nDigitalOut myled3(LED3); \/\/3rd from left\r\nDigitalOut myled4(LED2); \/\/4th from left (right most)\r\n\r\n\r\nSerial gprs(TX_GSM, RX_GSM);\r\nTimer timer;\r\n\r\nUSBSerial usb;\r\n\r\n#define PINPWR                  P1_2 \/\/ power on EG 10, low enable\r\n#define PINONOFF                P1_7 \/\/ switch of EG10, low enable, low for 2s to turn on EG10\r\n\r\nDigitalOut eg10_pwr(PINPWR);\r\nDigitalOut eg10_on(PINONOFF);\r\n\r\n\r\nvoid EG10PowerUp(void)\r\n{\r\n    eg10_pwr = 1;\r\n    eg10_on  = 1;\r\n    wait(0.5);\r\n    eg10_pwr = 0;\r\n    eg10_on = 0;\r\n    wait(1);\r\n    eg10_on = 1;\r\n    wait(0.5);\r\n}\r\n\r\n\r\nint wait_answer(int timeout)\r\n{\r\n    timer.start(); \/\/ start timer\r\n    myled2 = 1;\r\n    while (timer.read() &lt; timeout) {\r\n        if (gprs.readable()) {\r\n            myled3 = 1;\r\n            wait_ms(100);\r\n            while (gprs.readable()) {\r\n                char c = gprs.getc();\r\n                usb.putc(c);\r\n            }\r\n            myled3 = 0;\r\n        }\r\n    }\r\n    timer.stop(); \/\/ stop timer\r\n    timer.reset(); \/\/ clear timer\r\n    myled2 = 0;\r\n    return 0;\r\n}\r\n\r\n\r\nint main(void)\r\n{\r\n    myled1 = 0;\r\n    myled2 = 0;\r\n    myled3 = 0;\r\n    myled4 = 0;\r\n    \r\n    myled1 = 1;\r\n    EG10PowerUp();\r\n    myled1 = 0;\r\n    \r\n    gprs.baud(115200);\r\n    while (true) {\r\n        usb.printf(\"I am a virtual serial port\\r\\n\");\r\n        gprs.printf(\"AT\\r\\n\");\r\n        wait_answer(1 \/* sec *\/);\r\n    }\r\n    return 0;\r\n}\r\n<\/pre>\n<div class='skype-share' data-href='https:\/\/gronlier.fr\/blog\/2014\/11\/seeeduino-arch-gprs-v2\/' data-lang='auto' data-style='large' data-source='WordPress' ><\/div><div style='clear:both;padding-bottom:10px;'><\/div>\n<div class=\"twitter-share\"><a href=\"https:\/\/twitter.com\/intent\/tweet?via=ticapix\" class=\"twitter-share-button\">Tweet<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>I just received my Seeeduino Arch GPRS V2. The doc is as light as the price \ud83d\ude42 So don't be afraid and open the Eagle file and the bottom of the product wiki page. You'll also need the LPC11U37 datasheet and AN_SIM900 Reference Design Guide_V1.02 (you might find an online copy of the pdf is &hellip; <a href=\"https:\/\/gronlier.fr\/blog\/2014\/11\/seeeduino-arch-gprs-v2\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Seeeduino Arch GPRS V2<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[14,24,23],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Seeeduino Arch GPRS V2 - Bits and Bytes<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/gronlier.fr\/blog\/2014\/11\/seeeduino-arch-gprs-v2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Seeeduino Arch GPRS V2 - Bits and Bytes\" \/>\n<meta property=\"og:description\" content=\"I just received my Seeeduino Arch GPRS V2. The doc is as light as the price \ud83d\ude42 So don&#039;t be afraid and open the Eagle file and the bottom of the product wiki page. You&#039;ll also need the LPC11U37 datasheet and AN_SIM900 Reference Design Guide_V1.02 (you might find an online copy of the pdf is &hellip; Continue reading Seeeduino Arch GPRS V2 &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/gronlier.fr\/blog\/2014\/11\/seeeduino-arch-gprs-v2\/\" \/>\n<meta property=\"og:site_name\" content=\"Bits and Bytes\" \/>\n<meta property=\"article:published_time\" content=\"2014-11-23T14:27:29+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-03-30T09:43:45+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/gronlier.fr\/blog\/wp-content\/uploads\/2014\/11\/sim900_power01-150x150.jpg\" \/>\n<meta name=\"author\" content=\"ticapix\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"ticapix\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/gronlier.fr\/blog\/2014\/11\/seeeduino-arch-gprs-v2\/\",\"url\":\"https:\/\/gronlier.fr\/blog\/2014\/11\/seeeduino-arch-gprs-v2\/\",\"name\":\"Seeeduino Arch GPRS V2 - Bits and Bytes\",\"isPartOf\":{\"@id\":\"https:\/\/gronlier.fr\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/gronlier.fr\/blog\/2014\/11\/seeeduino-arch-gprs-v2\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/gronlier.fr\/blog\/2014\/11\/seeeduino-arch-gprs-v2\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/gronlier.fr\/blog\/wp-content\/uploads\/2014\/11\/sim900_power01-150x150.jpg\",\"datePublished\":\"2014-11-23T14:27:29+00:00\",\"dateModified\":\"2020-03-30T09:43:45+00:00\",\"author\":{\"@id\":\"https:\/\/gronlier.fr\/blog\/#\/schema\/person\/9abd8d0260a4d942d7069de75446e2bc\"},\"breadcrumb\":{\"@id\":\"https:\/\/gronlier.fr\/blog\/2014\/11\/seeeduino-arch-gprs-v2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/gronlier.fr\/blog\/2014\/11\/seeeduino-arch-gprs-v2\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/gronlier.fr\/blog\/2014\/11\/seeeduino-arch-gprs-v2\/#primaryimage\",\"url\":\"http:\/\/gronlier.fr\/blog\/wp-content\/uploads\/2014\/11\/sim900_power01-150x150.jpg\",\"contentUrl\":\"http:\/\/gronlier.fr\/blog\/wp-content\/uploads\/2014\/11\/sim900_power01-150x150.jpg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/gronlier.fr\/blog\/2014\/11\/seeeduino-arch-gprs-v2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/gronlier.fr\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Seeeduino Arch GPRS V2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/gronlier.fr\/blog\/#website\",\"url\":\"https:\/\/gronlier.fr\/blog\/\",\"name\":\"Bits and Bytes\",\"description\":\"As the default template said: &quot;Just another WordPress site&quot;\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/gronlier.fr\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/gronlier.fr\/blog\/#\/schema\/person\/9abd8d0260a4d942d7069de75446e2bc\",\"name\":\"ticapix\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/gronlier.fr\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/94bba7228ec3665afea02078abebfa94?s=96&d=monsterid&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/94bba7228ec3665afea02078abebfa94?s=96&d=monsterid&r=g\",\"caption\":\"ticapix\"},\"url\":\"https:\/\/gronlier.fr\/blog\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Seeeduino Arch GPRS V2 - Bits and Bytes","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/gronlier.fr\/blog\/2014\/11\/seeeduino-arch-gprs-v2\/","og_locale":"en_US","og_type":"article","og_title":"Seeeduino Arch GPRS V2 - Bits and Bytes","og_description":"I just received my Seeeduino Arch GPRS V2. The doc is as light as the price \ud83d\ude42 So don't be afraid and open the Eagle file and the bottom of the product wiki page. You'll also need the LPC11U37 datasheet and AN_SIM900 Reference Design Guide_V1.02 (you might find an online copy of the pdf is &hellip; Continue reading Seeeduino Arch GPRS V2 &rarr;","og_url":"https:\/\/gronlier.fr\/blog\/2014\/11\/seeeduino-arch-gprs-v2\/","og_site_name":"Bits and Bytes","article_published_time":"2014-11-23T14:27:29+00:00","article_modified_time":"2020-03-30T09:43:45+00:00","og_image":[{"url":"http:\/\/gronlier.fr\/blog\/wp-content\/uploads\/2014\/11\/sim900_power01-150x150.jpg"}],"author":"ticapix","twitter_card":"summary_large_image","twitter_misc":{"Written by":"ticapix","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/gronlier.fr\/blog\/2014\/11\/seeeduino-arch-gprs-v2\/","url":"https:\/\/gronlier.fr\/blog\/2014\/11\/seeeduino-arch-gprs-v2\/","name":"Seeeduino Arch GPRS V2 - Bits and Bytes","isPartOf":{"@id":"https:\/\/gronlier.fr\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/gronlier.fr\/blog\/2014\/11\/seeeduino-arch-gprs-v2\/#primaryimage"},"image":{"@id":"https:\/\/gronlier.fr\/blog\/2014\/11\/seeeduino-arch-gprs-v2\/#primaryimage"},"thumbnailUrl":"http:\/\/gronlier.fr\/blog\/wp-content\/uploads\/2014\/11\/sim900_power01-150x150.jpg","datePublished":"2014-11-23T14:27:29+00:00","dateModified":"2020-03-30T09:43:45+00:00","author":{"@id":"https:\/\/gronlier.fr\/blog\/#\/schema\/person\/9abd8d0260a4d942d7069de75446e2bc"},"breadcrumb":{"@id":"https:\/\/gronlier.fr\/blog\/2014\/11\/seeeduino-arch-gprs-v2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/gronlier.fr\/blog\/2014\/11\/seeeduino-arch-gprs-v2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/gronlier.fr\/blog\/2014\/11\/seeeduino-arch-gprs-v2\/#primaryimage","url":"http:\/\/gronlier.fr\/blog\/wp-content\/uploads\/2014\/11\/sim900_power01-150x150.jpg","contentUrl":"http:\/\/gronlier.fr\/blog\/wp-content\/uploads\/2014\/11\/sim900_power01-150x150.jpg"},{"@type":"BreadcrumbList","@id":"https:\/\/gronlier.fr\/blog\/2014\/11\/seeeduino-arch-gprs-v2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/gronlier.fr\/blog\/"},{"@type":"ListItem","position":2,"name":"Seeeduino Arch GPRS V2"}]},{"@type":"WebSite","@id":"https:\/\/gronlier.fr\/blog\/#website","url":"https:\/\/gronlier.fr\/blog\/","name":"Bits and Bytes","description":"As the default template said: &quot;Just another WordPress site&quot;","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/gronlier.fr\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/gronlier.fr\/blog\/#\/schema\/person\/9abd8d0260a4d942d7069de75446e2bc","name":"ticapix","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/gronlier.fr\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/94bba7228ec3665afea02078abebfa94?s=96&d=monsterid&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/94bba7228ec3665afea02078abebfa94?s=96&d=monsterid&r=g","caption":"ticapix"},"url":"https:\/\/gronlier.fr\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/gronlier.fr\/blog\/wp-json\/wp\/v2\/posts\/136"}],"collection":[{"href":"https:\/\/gronlier.fr\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gronlier.fr\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gronlier.fr\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gronlier.fr\/blog\/wp-json\/wp\/v2\/comments?post=136"}],"version-history":[{"count":10,"href":"https:\/\/gronlier.fr\/blog\/wp-json\/wp\/v2\/posts\/136\/revisions"}],"predecessor-version":[{"id":326,"href":"https:\/\/gronlier.fr\/blog\/wp-json\/wp\/v2\/posts\/136\/revisions\/326"}],"wp:attachment":[{"href":"https:\/\/gronlier.fr\/blog\/wp-json\/wp\/v2\/media?parent=136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gronlier.fr\/blog\/wp-json\/wp\/v2\/categories?post=136"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gronlier.fr\/blog\/wp-json\/wp\/v2\/tags?post=136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}