Mike Pulice / ublox_C200Test

Fork of SprintUSBModemHTTPClientTest by Donatien Garnier

Embed: (wiki syntax)

« Back to documentation index

SprintUSBModem Class Reference

SprintUSBModem Class Reference

Sprint USB Modem (Sierra Wireless 598U) More...

#include <SprintUSBModem.h>

Public Member Functions

 SprintUSBModem (PinName powerGatingPin=NC, bool powerGatingOnWhenPinHigh=true, int serial=0)
 Create Sprint USB Modem (Sierra Wireless 598U) API instance.
int connect (const char *apn=NULL, const char *user=NULL, const char *password=NULL)
 Open a 3G internet connection.
int disconnect ()
 Close the internet connection.
int sendSM (const char *number, const char *message)
 Send a SM.
int getSM (char *number, char *message, size_t maxLength)
 Receive a SM.
int getSMCount (size_t *pCount)
 Get the number of SMs in the incoming box.
ATCommandsInterfacegetATCommandsInterface ()
 Get the ATCommandsInterface instance.
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

Sprint USB Modem (Sierra Wireless 598U)

Definition at line 33 of file SprintUSBModem.h.


Constructor & Destructor Documentation

SprintUSBModem ( 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 31 of file SprintUSBModem.cpp.


Member Function Documentation

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

Open a 3G internet connection.

Returns:
0 on success, error code on failure

Definition at line 80 of file SprintUSBModem.cpp.

int disconnect (  )

Close the internet connection.

Returns:
0 on success, error code on failure

Definition at line 129 of file SprintUSBModem.cpp.

ATCommandsInterface * getATCommandsInterface (  )

Get the ATCommandsInterface instance.

Returns:
Pointer to the ATCommandsInterface instance

Definition at line 269 of file SprintUSBModem.cpp.

int getSM ( char *  number,
char *  message,
size_t  maxLength 
)

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 215 of file SprintUSBModem.cpp.

int getSMCount ( size_t *  pCount )

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 242 of file SprintUSBModem.cpp.

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.

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

Definition at line 274 of file SprintUSBModem.cpp.

int sendSM ( const char *  number,
const char *  message 
)

Send a SM.

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

Definition at line 188 of file SprintUSBModem.cpp.