Simple example for SARA modem.
Dependencies: ublox-at-cellular-interface-n2xx ublox-at-cellular-interface ublox-cellular-base-n2xx ublox-cellular-base
Fork of example-ublox-cellular-interface by
Diff: main.cpp
- Revision:
- 3:7ca70581ef20
- Parent:
- 2:dbf7dd3da592
- Child:
- 4:3e2b789c3adc
--- a/main.cpp Fri Jun 09 11:55:01 2017 +0000
+++ b/main.cpp Fri Jun 09 14:36:07 2017 +0000
@@ -128,8 +128,9 @@
printf("Starting up, please wait up to 180 seconds for network registration to complete...\n");
if (interface->init(PIN)) {
pulseEvent();
+ interface->set_credentials(APN, USERNAME, PASSWORD);
printf("Registered, connecting to the packet network...\n");
- for (x = 0; interface->connect(PIN, APN, USERNAME, PASSWORD) != 0; x++) {
+ for (x = 0; interface->connect() != 0; x++) {
if (x > 0) {
bad();
printf("Retrying (have you checked that an antenna is plugged in and your APN is correct?)...\n");
@@ -211,7 +212,7 @@
printf("Socket closed.\n");
}
wait_ms(5000);
- printf("[Checking user button]\n");
+ printf("[Checking if user button has been pressed]\n");
}
pulseEvent();
