HTTPClient test for IoT Workshop

Dependencies:   UbloxUSBModem mbed

Fork of UbloxModemHTTPClientTest by mbed official

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 #include "UbloxUSBGSMModem.h"
00002 #include "UbloxUSBCDMAModem.h"
00003 #include "httptest.h"
00004 
00005 #define MODEM_UBLOX_CDMA
00006 
00007 #if !defined(MODEM_UBLOX_GSM) && !defined(MODEM_UBLOX_CDMA)
00008 #warning No modem defined, using GSM by default
00009 #define MODEM_UBLOX_GSM
00010 #endif
00011 
00012 #ifndef MODEM_APN
00013 #warning APN not specified, using "internet"
00014 #define MODEM_APN "internet"
00015 #endif
00016 
00017 #ifndef MODEM_USERNAME
00018 #warning username not specified
00019 #define MODEM_USERNAME NULL
00020 #endif
00021 
00022 #ifndef MODEM_PASSWORD
00023 #warning password not specified
00024 #define MODEM_PASSWORD NULL
00025 #endif
00026 
00027 int main()
00028 {
00029 #ifdef MODEM_UBLOX_GSM
00030     UbloxUSBGSMModem modem;
00031 #else
00032     UbloxUSBCDMAModem modem(p18, true, 1);
00033     printf("CDMA MODEM\n");
00034 #endif
00035     httptest(modem, MODEM_APN, MODEM_USERNAME, MODEM_PASSWORD);
00036     while (true);
00037 }
00038