public class ModemManager extends Object
Modifier and Type | Field and Description |
---|---|
static int |
INIT_FINISHED
value returned by
getModemInitStatus() when the modem initialisation is complete. |
static int |
INIT_IN_PROGRESS
value returned by
getModemInitStatus() when the modem initialisation is started and in progress. |
static int |
INIT_PENDING
value returned by
getModemInitStatus() when the modem initialisation is pending and not yet started. |
Modifier and Type | Method and Description |
---|---|
static int |
getDialoutCounter() |
static int |
getGsmNetReg() |
static int |
getGsmOpId() |
static int |
getModemDetectionErr() |
static int |
getModemInitStatus()
This function returns information about the Modem initialisation process.
|
static int |
getSmsCount()
This function reports the number of SMS currently in the queue and waiting to be read.
|
static SmsMessage |
readSms()
Use this function to read an SMS from the SMS queue.
|
static void |
resetModem()
Reset the eWON modem.
|
static void |
updateClientInOut()
During an active outgoing PPP communication, this function will update the volumes exchanged.
|
public static final int INIT_FINISHED
getModemInitStatus()
when the modem initialisation is complete.public static final int INIT_IN_PROGRESS
getModemInitStatus()
when the modem initialisation is started and in progress.public static final int INIT_PENDING
getModemInitStatus()
when the modem initialisation is pending and not yet started.public static void resetModem()
public static int getModemInitStatus()
This information is usefull during eWON boot or after the modem has been reset with the resetModem()
function.
public static void updateClientInOut() throws EWException
EWException
public static int getDialoutCounter() throws EWException
. But faster.EWException
public static int getGsmNetReg() throws EWException
. But faster.EWException
public static int getGsmOpId() throws EWException
. But faster.EWException
public static int getModemDetectionErr() throws EWException
. But faster.EWException
public static int getSmsCount()
readSms()
function.readSms()
public static SmsMessage readSms()
SmsMessage
object. This object provides a number of methods to
obtain the following information: SMS reception date and time, phone number of the SMS sender, SMS message.
The following example shows how to print the SMS information.
try { SmsMessage smsMessage = ModemManager.readSms(); System.out.println("SmsNdx: "+smsMessage.getSmsNdx()); System.out.println("SmsDateTime"+ new Date(smsMessage.getSmsDataTime()).toString()); System.out.println("SmsDateTime"+Long.toString(smsMessage.getSmsDataTime())); System.out.println("SmsFrom: "+smsMessage.getSmsFrom()); System.out.println("SmsMessage: "+smsMessage.getSmsMessage()); } catch (Exception e) { //for example there are no SMS to read. System.out.println("Error: "+e.toString()); }
SmsMessage