{"id":22246,"date":"2019-04-05T23:43:10","date_gmt":"2019-04-06T06:43:10","guid":{"rendered":"https:\/\/m2msupport.net\/m2msupport\/?page_id=22246"},"modified":"2019-04-05T23:47:03","modified_gmt":"2019-04-06T06:47:03","slug":"atcmgl-list-sms-messages-from-preferred-storage","status":"publish","type":"page","link":"https:\/\/m2msupport.net\/m2msupport\/atcmgl-list-sms-messages-from-preferred-storage\/","title":{"rendered":"AT+CMGL &#8211; List SMS messages from preferred storage"},"content":{"rendered":"<p><a href=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2019\/04\/a_cmgl.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-22283\" src=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2019\/04\/a_cmgl.png\" alt=\"\" width=\"861\" height=\"729\" srcset=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2019\/04\/a_cmgl.png 861w, https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2019\/04\/a_cmgl-300x254.png 300w, https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2019\/04\/a_cmgl-768x650.png 768w, https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2019\/04\/a_cmgl-600x508.png 600w\" sizes=\"auto, (max-width: 861px) 100vw, 861px\" \/><\/a><\/p>\n<p>Try the below script in the <a href=\"https:\/\/m2msupport.net\/m2msupport\/download-at-command-tester-for-simcom-modules\/\">AT Command Tester tool<\/a><\/p>\n<pre style=\"color: blue; background-color: white; border: 1px solid black;\">\/\/\/\/Script: at_cmgl.at\n\/\/Use this script to AT+CMGL AT command\n\n\/\/Get the command support\nAT+CMGL=?\n\nWAIT=2\n\n\/\/Set it for SMS text mode\nAT+CMGF=1\n\n\/\/SMS text mode, get received unread messages\nAT+CMGL=\"REC UNREAD\"\n\nWAIT=1\n\n\/\/SMS text mode, get received read messages\nAT+CMGL=\"REC READ\"\n\nWAIT=1\n\n\/\/SMS text mode, get stored unsent messages\nAT+CMGL=\"STO UNSENT\"\n\nWAIT=1\n\n\/\/SMS text mode, get stored sent messages\nAT+CMGL=\"STO SENT\"\n\nWAIT=1\n\n\/\/SMS text mode, get all messages\nAT+CMGL=\"ALL\"\n\nWAIT=1\n\n\/\/Set it for SMS pdu mode\nAT+CMGF=0\n\nWAIT=1\n\n\/\/SMS pdu mode, get received unread messages\nAT+CMGL=0\n\nWAIT=1\n\n\/\/SMS pdu mode, get received read messages\nAT+CMGL=1\n\nWAIT=1\n\n\/\/SMS pdu mode, get stored unsent messages\nAT+CMGL=2\n\nWAIT=1\n\n\/\/SMS pdu mode, get stored sent messages\nAT+CMGL=3\n\nWAIT=1\n\n\/\/SMS pdu mode, get all messages\nAT+CMGL=4\n\nWAIT=1\n\n\n<\/pre>\n<p>Output of the above script in the <a href=\"https:\/\/m2msupport.net\/m2msupport\/download-at-command-tester-for-simcom-modules\/\">AT Command Tester tool\u00a0<\/a>tool.<\/p>\n<pre style=\"color: blue; background-color: #ffffcc; border: 1px solid black;\">AT+CMGL=?\n\n+CMGL: (0-4)\n\nOK\nAT+CMGF=1\n\nOK\nAT+CMGL=\"REC UNREAD\"\n\nOK\nAT+CMGL=\"REC READ\"\n\n+CMGL: 0,\"REC READ\",\"+17026089670\",\"\",\"19\/04\/05,23:32:12-28\"\nTest message to AT Command Tester\n+CMGL: 1,\"REC READ\",\"+17026089670\",\"\",\"19\/04\/05,23:32:34-28\"\nTesting AT+CMGL Command\n+CMGL: 2,\"REC READ\",\"+17026089670\",\"\",\"19\/04\/05,23:33:40-28\"\nRead all SMS messages\n\nOK\nAT+CMGL=\"STO UNSENT\"\n\nOK\nAT+CMGL=\"STO SENT\"\n\nOK\nAT+CMGL=\"ALL\"\n\n+CMGL: 0,\"REC READ\",\"+17026089670\",\"\",\"19\/04\/05,23:32:12-28\"\nTest message to AT Command Tester\n+CMGL: 1,\"REC READ\",\"+17026089670\",\"\",\"19\/04\/05,23:32:34-28\"\nTesting AT+CMGL Command\n+CMGL: 2,\"REC READ\",\"+17026089670\",\"\",\"19\/04\/05,23:33:40-28\"\nRead all SMS messages\n\nOK\nAT+CMGF=0\n\nOK\nAT+CMGL=0\n\nOK\nAT+CMGL=1\n\n+CMGL: 0,1,\"\",48\n07912180958739F1040B917120069876F000009140503223218A21D4F29C0E6A97E7F3F0B90CA2BF41412A68F86EB7C36E32885A9ED3CB72\n+CMGL: 1,1,\"\",40\n07912180958739F1040B917120069876F000009140503223438A17D4F29C9E769F4141EA6AD83C3241C377BB1D769341\n+CMGL: 2,1,\"\",38\n07912180958739F1040B917120069876F000009140503233048A15D272980C0AB3D9A069730A6A97E7F3F0B93C07\n\nOK\nAT+CMGL=2\n\nOK\nAT+CMGL=3\n\nOK\nAT+CMGL=4\n\n+CMGL: 0,1,\"\",48\n07912180958739F1040B917120069876F000009140503223218A21D4F29C0E6A97E7F3F0B90CA2BF41412A68F86EB7C36E32885A9ED3CB72\n+CMGL: 1,1,\"\",40\n07912180958739F1040B917120069876F000009140503223438A17D4F29C9E769F4141EA6AD83C3241C377BB1D769341\n+CMGL: 2,1,\"\",38\n07912180958739F1040B917120069876F000009140503233048A15D272980C0AB3D9A069730A6A97E7F3F0B93C07\n\nOK\n\n\n<\/pre>\n<div class=\"video-responsive\"><iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/I9Sfg2cmq3s\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Try the below script in the AT Command Tester tool \/\/\/\/Script: at_cmgl.at \/\/Use this script to AT+CMGL AT command \/\/Get the command support AT+CMGL=? WAIT=2 \/\/Set it for SMS text mode AT+CMGF=1 \/\/SMS text mode, get received unread messages AT+CMGL=&#8221;REC &hellip; <a href=\"https:\/\/m2msupport.net\/m2msupport\/atcmgl-list-sms-messages-from-preferred-storage\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"atcommands.php","meta":{"footnotes":""},"class_list":["post-22246","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages\/22246","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/comments?post=22246"}],"version-history":[{"count":2,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages\/22246\/revisions"}],"predecessor-version":[{"id":22284,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages\/22246\/revisions\/22284"}],"wp:attachment":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/media?parent=22246"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}