u-blox USB modems (GSM and CDMA)

Dependencies:   CellularUSBModem

Dependents:   C027_CANInterfaceComm C027_ModemTransparentUSBCDC_revb UbloxModemHTTPClientTest C027_HTTPClientTest ... more

Embed: (wiki syntax)

« Back to documentation index

UbloxUSBCDMAModem Class Reference

UbloxUSBCDMAModem Class Reference

u-blox LISA-C200 modem More...

#include <UbloxUSBCDMAModem.h>

Public Member Functions

 UbloxUSBCDMAModem (PinName powerGatingPin=NC, bool powerGatingOnWhenPinHigh=true, int serial=0)
 Create Sprint USB Modem (Sierra Wireless 598U) API instance.
virtual int connect (const char *apn=NULL, const char *user=NULL, const char *password=NULL)
 Open a 3G internet connection.
virtual int disconnect ()
 Close the internet connection.
virtual int sendSM (const char *number, const char *message)
 Send a SM.
virtual int getSM (char *number, char *message, size_t maxLength)
 Receive a SM.
virtual int getSMCount (size_t *pCount)
 Get the number of SMs in the incoming box.
virtual ATCommandsInterface * getATCommandsInterface ()
 Get the ATCommandsInterface instance.
virtual int power (bool enable)
 Switch power on or off In order to use this function, a pin name must have been entered in the constructor.

Detailed Description

u-blox LISA-C200 modem

Definition at line 34 of file UbloxUSBCDMAModem.h.


Constructor & Destructor Documentation

UbloxUSBCDMAModem ( PinName  powerGatingPin = NC,
bool  powerGatingOnWhenPinHigh = true,
int  serial = 0 
)

Create Sprint USB Modem (Sierra Wireless 598U) API instance.

Parameters:
powerGatingPinOptional pin commanding a power gating transistor on the modem's power line
powerGatingOnWhenPinHightrue if the pin needs to be high to power the dongle, defaults to true

Definition at line 33 of file UbloxUSBCDMAModem.cpp.


Member Function Documentation

int connect ( const char *  apn = NULL,
const char *  user = NULL,
const char *  password = NULL 
) [virtual]

Open a 3G internet connection.

Returns:
0 on success, error code on failure

Definition at line 84 of file UbloxUSBCDMAModem.cpp.

int disconnect (  ) [virtual]

Close the internet connection.

Returns:
0 on success, error code on failure

Definition at line 133 of file UbloxUSBCDMAModem.cpp.

ATCommandsInterface * getATCommandsInterface (  ) [virtual]

Get the ATCommandsInterface instance.

Returns:
Pointer to the ATCommandsInterface instance

Definition at line 273 of file UbloxUSBCDMAModem.cpp.

int getSM ( char *  number,
char *  message,
size_t  maxLength 
) [virtual]

Receive a SM.

Parameters:
numberPointer to a buffer to store the sender's phone number (must be at least 17 characters-long, including the sapce for the null-terminating char)
messagePointer to a buffer to store the the incoming message
maxLengthMaximum message length that can be stored in buffer (including null-terminating character)
Returns:
0 on success, error code on failure

Definition at line 219 of file UbloxUSBCDMAModem.cpp.

int getSMCount ( size_t *  pCount ) [virtual]

Get the number of SMs in the incoming box.

Parameters:
pCountpointer to store the number of unprocessed SMs on
Returns:
0 on success, error code on failure

Definition at line 246 of file UbloxUSBCDMAModem.cpp.

int power ( bool  enable ) [virtual]

Switch power on or off In order to use this function, a pin name must have been entered in the constructor.

Parameters:
enabletrue to switch the dongle on, false to switch it off
Returns:
0 on success, error code on failure

Definition at line 278 of file UbloxUSBCDMAModem.cpp.

int sendSM ( const char *  number,
const char *  message 
) [virtual]

Send a SM.

Parameters:
numberThe receiver's phone number
messageThe message to send
Returns:
0 on success, error code on failure

Definition at line 192 of file UbloxUSBCDMAModem.cpp.