{"id":143720,"date":"2020-05-20T07:13:50","date_gmt":"2020-05-20T14:13:50","guid":{"rendered":"https:\/\/m2msupport.net\/m2msupport\/?page_id=143720"},"modified":"2020-05-20T07:13:52","modified_gmt":"2020-05-20T14:13:52","slug":"atcfsrfile-read-data-from-file","status":"publish","type":"page","link":"https:\/\/m2msupport.net\/m2msupport\/atcfsrfile-read-data-from-file\/","title":{"rendered":"AT+CFSRFILE &#8211; Read data from file"},"content":{"rendered":"\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/m2msupport.net\/m2msupport\/wp-content\/uploads\/2020\/05\/at_cfsrfile.png\" alt=\"\" class=\"wp-image-32155\"\/><\/figure>\n\n\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>\n<\/p>\n<pre style=\"color: blue; background-color: white; border: 1px solid black;\">\/\/Script: at+cfsrfile\n\/\/The AT commands in this script are applicable for Simcom modules only\n\/\/Check SIMCOM Module AT Command documentaiton\n\n\/\/Get the support for the commands\nAT+CFSRFILE=?\n\n\/\/Wait\nWAIT=1\n\n\/\/Get the txt file size\nAT+CFSGFIS=0,\"myfile.txt\"\n\n\n\/\/Read file\n\/\/1st parameter - index &gt; 0 -\/custapp\/ 1-\/fota\/ 2-\/datatx\/ 3 -\/customer\/\n\/\/2nd parameter - FILE NAME\n\/\/3RD parameter - Mode 0 -&gt; overwrite 1-&gt;read at position\n\/\/4th parameter - File size\n\/\/5th parameter - position\n\/\/6th parameter - len_filename\nAT+CFSRFILE=0,\"myfile.txt\",0,22,0\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<\/a><\/p>\n<pre style=\"color: blue; background-color: #ffffcc; border: 1px solid black;\">AT+CFSRFILE=?\n\n+CFSRFILE: (0-3),50,(0-1),(1-10240),(0-filesize)\n\nOK\nAT+CFSGFIS=0,\"myfile.txt\"\n\n+CFSGFIS: 22\n\nOK\nAT+CFSRFILE=0,\"myfile.txt\",0,22,0\n\n+CFSRFILE: 22\nmy file dataadd at end\n\nOK\n\n\n\n<\/pre>\n<div class=\"video-responsive\"><iframe loading=\"lazy\" id=\"youTubePlayer\" src=\"https:\/\/www.youtube.com\/embed\/RNy8CBFmyVk\" width=\"750\" height=\"421\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/div>","protected":false},"excerpt":{"rendered":"<p>Try the below script in the AT Command Tester tool \/\/Script: at+cfsrfile \/\/The AT commands in this script are applicable for Simcom modules only \/\/Check SIMCOM Module AT Command documentaiton \/\/Get the support for the commands AT+CFSRFILE=? \/\/Wait WAIT=1 \/\/Get &hellip; <a href=\"https:\/\/m2msupport.net\/m2msupport\/atcfsrfile-read-data-from-file\/\">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-143720","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages\/143720","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=143720"}],"version-history":[{"count":1,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages\/143720\/revisions"}],"predecessor-version":[{"id":143722,"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/pages\/143720\/revisions\/143722"}],"wp:attachment":[{"href":"https:\/\/m2msupport.net\/m2msupport\/wp-json\/wp\/v2\/media?parent=143720"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}