{"id":217,"date":"2015-12-06T06:01:41","date_gmt":"2015-12-06T06:01:41","guid":{"rendered":"https:\/\/carson.fenimorefamily.com\/?p=217"},"modified":"2016-01-01T17:32:18","modified_gmt":"2016-01-01T17:32:18","slug":"my-favorite-fona-commands","status":"publish","type":"post","link":"https:\/\/carson.fenimorefamily.com\/?p=217","title":{"rendered":"My favorite FONA commands"},"content":{"rendered":"<p>These are more like &#8220;the commands i have found useful as of present.&#8221;  I bear no real affinity for them, except that I do appreciate the data they yield.<\/p>\n<table>\n<tr>\n<td>AT+COPS?<\/td>\n<td>Ensure you are connected to the network (it gives &#8220;+COPS: 0&#8221; if you are not)<\/td>\n<\/tr>\n<tr>\n<td>at+ccid<\/td>\n<td>Get the SIM number; you need this for activation<\/td>\n<\/tr>\n<tr>\n<td>\nAT+CMGF=1\n<\/td>\n<td>\nThis sets us into text mode. I haven&#8217;t used the other mode (PDU) yet.\n<\/td>\n<\/tr>\n<tr>\n<td>\nat+sapbr=3,1,&#8221;contype&#8221;,&#8221;gprs&#8221;\n<\/td>\n<td>\nYou can set the connection type to GPRS (data) or CSD (circuit switched) &#8211; i think this is why you can call or do data on gsm networks, but not both (at the same time).\n<\/td>\n<\/tr>\n<tr>\n<td>\nat+sapbr=3,1,&#8221;apn&#8221;,&#8221;wholesale&#8221;\n<\/td>\n<td>\nUntil you set your access point name, you might not be able to do things like geolocate (based on cell towers) or do data stuff.  TING&#8217;s APN is &#8220;wholesale&#8221; &#8211; im sure it is different for every provider.<\/td>\n<\/tr>\n<tr>\n<td>\nat+sapbr=1,1\n<\/td>\n<td>\nOpen up your bearer. . . sounds good, but im not entirely sure what that means.\n<\/td>\n<\/tr>\n<tr>\n<td>\nat+cipgsmloc=1,1\n<\/td>\n<td>\nThis gives you your lat\/lon. Note that on my old T-Mobile sim card, which had no data plan, i got nothing back for some reason; apparently you have to have a data plan to get this info?\n<\/td>\n<\/tr>\n<\/table>\n<p>For SMS (which i used only briefly) I found the following useful:<\/p>\n<table>\n<tr>\n<td>at+cmgl=&#8221;all&#8221;<\/td>\n<td>I didn&#8217;t realize this, but all text messages really are stored somewhere in the providers network, at least until you do something with them (makes sense) &#8211; i just found it interesting that I transplated my SIM card from my tmobile device to my FONA, and could see text messages from years ago.<\/td>\n<\/tr>\n<tr>\n<td>at+cmgs=&#8221;180188xyzwl&#8221;<\/td>\n<td>This is of course how you send a text.  You press enter, after typing the phone number (&#8220;1801..&#8221; &#8211; notice the leading &#8220;1&#8221;, since im in the USA; not sure if this is needed, but it works with it).  When you are done you must hit <Ctrl-Z>; if you hit <ESC> it cancels the message!<\/td>\n<\/tr>\n<tr>\n<td>at+cmgr=<msgnum<\/td>\n<td>This is your way of reading a text message<\/td>\n<\/tr>\n<\/table>\n<p>For GPS I used the following (note I have v2 of the FONA808 &#8211; the commands are different for v1)<\/p>\n<table>\n<tr>\n<td>AT+CGNSPWR=1<\/td>\n<td>The device starts with the GPS off.  So i turn it on, cause i want it.<\/td>\n<\/tr>\n<tr>\n<td>AT+CGNSINF<\/td>\n<td>Gives you a crudload of gps-related info, including lat-lon, altitude, utc, etc. (see table 2-2 in the &#8220;SIM800 GNSS Application Note&#8221;)<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<\/tr>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>These are more like &#8220;the commands i have found useful as of present.&#8221; I bear no real affinity for them, except that I do appreciate the data they yield. AT+COPS? Ensure you are connected to the network (it gives &#8220;+COPS: 0&#8221; if you are not) at+ccid Get the SIM number; you need this for activation &hellip; <a href=\"https:\/\/carson.fenimorefamily.com\/?p=217\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">My favorite FONA commands<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-217","post","type-post","status-publish","format-standard","hentry","category-diy-cell-phone"],"_links":{"self":[{"href":"https:\/\/carson.fenimorefamily.com\/index.php?rest_route=\/wp\/v2\/posts\/217","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/carson.fenimorefamily.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/carson.fenimorefamily.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/carson.fenimorefamily.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/carson.fenimorefamily.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=217"}],"version-history":[{"count":6,"href":"https:\/\/carson.fenimorefamily.com\/index.php?rest_route=\/wp\/v2\/posts\/217\/revisions"}],"predecessor-version":[{"id":223,"href":"https:\/\/carson.fenimorefamily.com\/index.php?rest_route=\/wp\/v2\/posts\/217\/revisions\/223"}],"wp:attachment":[{"href":"https:\/\/carson.fenimorefamily.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=217"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/carson.fenimorefamily.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=217"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/carson.fenimorefamily.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=217"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}