Example program to demonstrate the use of the UbloxATCellularInterfaceExt class, providing FTP, HTTP, and CellLocate support. It may be used on the C027 and C030 (non-N2xx flavour) boards.
Dependencies: ublox-cellular-driver-gen gnss ublox-cellular-base ublox-at-cellular-interface-ext
Revision 6:7a33376899e5, committed 2017-06-09
- Comitter:
- RobMeades
- Date:
- Fri Jun 09 14:38:38 2017 +0000
- Parent:
- 5:540b2d19fc5c
- Child:
- 7:7781212f4bb4
- Commit message:
- Switch to using set_credentials(), simpler that way.
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Jun 09 11:46:38 2017 +0000 +++ b/main.cpp Fri Jun 09 14:38:38 2017 +0000 @@ -145,8 +145,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 (int x = 0; interface->connect(PIN, APN, USERNAME, PASSWORD) != 0; x++) { + for (int 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"); @@ -243,7 +244,7 @@ } } wait_ms(5000); - printf("[Checking user button]\n"); + printf("[Checking if user button has been pressed]\n"); } pulseEvent();