example-ublox-cellular-interface_test
Dependencies: ublox-at-cellular-interface ublox-cellular-base ublox-cellular-base-n2xx ublox-at-cellular-interface-n2xx
Revision 43:0865a8f69787, committed 2019-11-08
- Comitter:
- wajahat.abbas@u-blox.com
- Date:
- Fri Nov 08 15:41:30 2019 +0500
- Parent:
- 42:130e8965c41e
- Commit message:
- Updated example program
Changed in this revision
--- a/main.cpp Fri Nov 08 10:40:01 2019 +0000 +++ b/main.cpp Fri Nov 08 15:41:30 2019 +0500 @@ -153,13 +153,17 @@ #else InterruptIn userButton(SW0); #endif - + // Attach a function to the user button userButton.rise(&cbButton); - + good(); printf("Starting up, please wait up to 180 seconds for network registration to complete...\n"); interface->set_credentials(APN, USERNAME, PASSWORD); +#ifdef TARGET_UBLOX_C030_R41XM + interface->init(PIN); + interface->disable_power_saving_mode(); //Please use PSM example to test PSM functionality(https://os.mbed.com/teams/ublox/code/example-ublox-cellular-psm/) +#endif for (x = 0; interface->connect(PIN) != 0; x++) { if (x > 0) { bad(); @@ -167,7 +171,7 @@ } } pulseEvent(); - + printf("Getting the IP address of \"developer.mbed.org\" and \"2.pool.ntp.org\"...\n"); if ((interface->gethostbyname("2.pool.ntp.org", &udpServer) == 0) && (interface->gethostbyname(TCP_SERVER, &tcpServer) == 0)) { @@ -202,13 +206,13 @@ printNtpTime(buf, x); printf("-------------------------------------------------------\n"); } - } + } printf("Closing socket...\n"); sockUdp.close(); pulseEvent(); printf("Socket closed.\n"); } - + #ifndef TARGET_UBLOX_C030_N211 // TCP Sockets printf("=== TCP ===\n"); @@ -249,7 +253,7 @@ printf("[Checking if user button has been pressed]\n"); #endif } - + pulseEvent(); printf("User button was pressed, stopping...\n"); interface->disconnect();
--- a/mbed_app.json Fri Nov 08 10:40:01 2019 +0000 +++ b/mbed_app.json Fri Nov 08 15:41:30 2019 +0500 @@ -1,4 +1,7 @@ { + "config": { + "default-mno-profile": 100 + }, "target_overrides": { "*": { "lwip.ppp-enabled": true, @@ -6,4 +9,3 @@ } } } -
--- a/ublox-cellular-base.lib Fri Nov 08 10:40:01 2019 +0000 +++ b/ublox-cellular-base.lib Fri Nov 08 15:41:30 2019 +0500 @@ -1,1 +1,1 @@ -https://developer.mbed.org/teams/ublox/code/ublox-cellular-base/#38230504a646 +https://developer.mbed.org/teams/ublox/code/ublox-cellular-base/#2f8ef6ac16dc