![](/media/cache/profiles/68fc61f6fd79afe9607a3ec58f2e6ad1.jpg.50x50_q85.jpg)
IM920地温観測システム CQ 2017ARMセミナー用サンプルプログラム
Dependencies: C027_Support_ForIM920
Fork of C027_SupportTest by
Diff: main.cpp
- Revision:
- 33:e27f40fada64
- Parent:
- 32:b838fcaba45e
- Parent:
- 30:062717f25e41
- Child:
- 34:1cbf923d4ca7
--- a/main.cpp Thu Aug 11 07:09:44 2016 +0000 +++ b/main.cpp Thu Aug 11 07:12:02 2016 +0000 @@ -20,7 +20,7 @@ // These parameters are ignored for LISA-C200 variants and can be left NULL. //------------------------------------------------------------------------------------ //! Set your secret SIM pin here (e.g. "1234"). Check your SIM manual. -#define SIMPIN NULL +#define SIMPIN "1922" /*! The APN of your network operator SIM, sometimes it is "internet" check your contract with the network operator. You can also try to look-up your settings in google: https://www.google.de/search?q=APN+list */ @@ -78,14 +78,6 @@ } 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" - printf("Ussd Send Command %s\r\n", ussd); - ret = mdm.ussdCommand(ussd, buf); - if (ret > 0) - printf("Ussd Got Answer: \"%*s\"\r\n", ret, buf); - // join the internet connection MDMParser::IP ip = mdm.join(APN,USERNAME,PASSWORD); if (ip == NOIP) @@ -182,7 +174,16 @@ // disconnect mdm.disconnect(); } + + // 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" + printf("Ussd Send Command %s\r\n", ussd); + ret = mdm.ussdCommand(ussd, buf); + if (ret > 0) + printf("Ussd Got Answer: \"%s\"\r\n", buf); } + printf("SMS and GPS Loop\r\n"); char link[128] = ""; unsigned int i = 0xFFFFFFFF;