ubloxUSBModem

The ublox LISA-C200 modem enables an mbed microcontroller to the internet through the Sprint network, as well as send/receive SMS messages.

Hardware options:

Workshop notes

Hardware Setup

picpic
mbed application boardu-blox c16-c20 Evaluation Board

Hello World

Here is an example application using the UbloxUSBModem and the HTTPClient, enabling mbed to fetch a URL over HTTP, and print the contents.

There are various other "hello world" programs that demonstrate SMS, NTP, Socket and Websocket interfaces, as well as management commands (check balance, link status, etc). See "Resources" section below.

Import program

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

Other examples

Import programUbloxModemWebsocketTest

u-blox modem Websockets client test

Import programUbloxModemSMSTest

u-blox modem SMS test

Library

Import libraryUbloxUSBModem

u-blox USB modems (GSM and CDMA)


All wikipages