Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: ublox-at-cellular-interface-n2xx ublox-at-cellular-interface ublox-cellular-base-n2xx ublox-cellular-base ublox-ppp-cellular-interface
Fork of example-ublox-cellular-interface by
Diff: main.cpp
- Revision:
- 8:3e170c40a284
- Parent:
- 5:bf352de1d3e5
- Child:
- 10:1f35371d572d
diff -r e3eeff78eef0 -r 3e170c40a284 main.cpp
--- a/main.cpp Mon Jun 12 22:16:17 2017 +0000
+++ b/main.cpp Wed Jun 14 09:28:20 2017 +0000
@@ -16,6 +16,16 @@
#include "mbed.h"
#include "UbloxATCellularInterface.h"
+#include "UbloxPPPCellularInterface.h"
+
+// If you wish to use LWIP and the PPP cellular interface, select
+// the line UbloxPPPCellularInterface, otherwise select the line
+// UbloxATCellularInterface. Using the AT cellular interface does not
+// require LWIP and hence uses less RAM (significant on C027. It also
+// allows other AT command operations (e.g. sending an SMS) to happen
+// during a data transfer.
+#define INTERFACE_CLASS UbloxATCellularInterface
+//#define INTERFACE_CLASS UbloxPPPCellularInterface
// The credentials of the SIM in the board. If PIN checking is enabled
// for your SIM card you must set this to the required PIN.
@@ -111,12 +121,12 @@
int main()
{
- UbloxATCellularInterface *interface = new UbloxATCellularInterface();
+ INTERFACE_CLASS *interface = new UbloxATCellularInterface();
// If you need to debug the cellular interface, comment out the
// instantiation above and uncomment the one below.
-// UbloxATCellularInterface *interface = new UbloxATCellularInterface(MDMTXD, MDMRXD,
-// MBED_CONF_UBLOX_CELL_BAUD_RATE,
-// true);
+// INTERFACE_CLASS *interface = new INTERFACE_CLASS(MDMTXD, MDMRXD,
+// MBED_CONF_UBLOX_CELL_BAUD_RATE,
+// true);
TCPSocket sockTcp;
UDPSocket sockUdp;
SocketAddress udpServer;
