インターフェース2014年10月号のu-blox C027で3G通信する記事で使用したプログラム。   CQ publishing Interface 2014.10 issue, C027 3G test program.

Dependencies:   C027_Support C027_SupportTest mbed picojson

Fork of C027_SupportTest by u-blox

インターフェース2014年10月号のu-blox C027で3G通信する記事で使用したプログラムです。

Files at this revision

API Documentation at this revision

Comitter:
mazgch
Date:
Wed May 28 09:21:55 2014 +0000
Parent:
19:f022ff746eb8
Child:
21:a090a5043e23
Commit message:
use latest lib

Changed in this revision

C027_Support.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/C027_Support.lib	Tue May 27 09:20:46 2014 +0000
+++ b/C027_Support.lib	Wed May 28 09:21:55 2014 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/teams/ublox/code/C027_Support/#34985b4d821e
+http://mbed.org/teams/ublox/code/C027_Support/#055dcfcf9dcc
--- a/main.cpp	Tue May 27 09:20:46 2014 +0000
+++ b/main.cpp	Wed May 28 09:21:55 2014 +0000
@@ -55,12 +55,8 @@
     bool mdmOk = mdm.init(SIMPIN, &devStatus);
     mdm.dumpDevStatus(&devStatus);
     if (mdmOk) {
-        // wait until we are connected
-        mdmOk = mdm.registerNet(&netStatus);
-        mdm.dumpNetStatus(&netStatus);
-    }
-    if (mdmOk)
-    {
+#if 0
+        // file system API
         const char* filename = "File";
         char buf[] = "Hello World";
         printf("writeFile \"%s\"\r\n", buf);
@@ -72,7 +68,14 @@
                 printf("readFile %d \"%.*s\"\r\n", len, len, buf);
             mdm.delFile(filename);
         }
-    
+#endif
+
+        // wait until we are connected
+        mdmOk = mdm.registerNet(&netStatus);
+        mdm.dumpNetStatus(&netStatus);
+    }
+    if (mdmOk)
+    {
         // http://www.geckobeach.com/cellular/secrets/gsmcodes.php
         // http://de.wikipedia.org/wiki/USSD-Codes
         const char* ussd = "*130#"; // You may get answer "UNKNOWN APPLICATION"