public class PPPDialup extends java.lang.Object implements Transport, java.lang.Runnable
See the init(Properties)
section for details about the OS-specific configuration.
Note:
PPPDialup does not deblock pin-code protected SIM-Cards. To activate a protected
SIM-Card, open a GsmSmsService
first and close
it again.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BSD_PEER_FILE
BSD_PEER_FILE is the name of the constant holding the value "ppp.bsd.peerfile".
|
static java.lang.String |
BSD_PPP_CONNECTION_ESTABLISHED
BSD_PPP_CONNECTION_ESTABLISHED is the name of the constant holding the value
"ppp.bsd.connection.established".
|
static java.lang.String |
BSD_PPP_DEAMON
BSD_PPP_DEAMON is the name of the constant holding the value "ppp.bsd.daemon".
|
static java.lang.String |
OPERATING_SYSTEM
OPERATING_SYSTEM is the name of the constant holding the value "ppp.os".
|
static java.lang.String |
RAS_DIALUP_ENTRY
RAS_DIALUP_ENTRY is the name of the constant holding the value "ppp.ras.dialup.entry".
|
static java.lang.String |
RAS_GATEWAY
RAS_GATEWAY is the name of the constant holding the value "ppp.ras.addroute".
|
static java.lang.String |
RAS_INTERFACE
RAS_INTERFACE is the name of the constant holding the value "ppp.ras.interface".
|
static java.lang.String |
RAS_MODEM
RAS_MODEM is the name of the constant holding the value "ppp.ras.modem".
|
static java.lang.String |
RAS_PASSWORD
RAS_PASSWORD is the name of the constant holding the value "ppp.ras.password".
|
static java.lang.String |
RAS_PHONE_NUMBER
RAS_PHONE_NUMBER is the name of the constant holding the value "ppp.ras.phonenumber".
|
static java.lang.String |
RAS_USE_IFACE_FOR_ROUTE
RAS_USE_IFACE_FOR_ROUTE is the name of the constant holding the value "ppp.ras.search.iface".
|
static java.lang.String |
RAS_USER
RAS_USER is the name of the constant holding the value "ppp.ras.user".
|
static java.lang.String |
TIMEOUT
TIMEOUT is the name of the constant holding the value "ppp.timeout".
|
Constructor and Description |
---|
PPPDialup() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the PPP connection.
|
void |
init(java.util.Properties serialProperties)
Initialize the PPP Transport implementation.
|
boolean |
isConnected()
Determine if the connection to the MMSC is currently established.
|
void |
open()
Start the PPP connection.
|
void |
run()
Observe the PPP connection.
|
public static final java.lang.String TIMEOUT
public static final java.lang.String OPERATING_SYSTEM
public static final java.lang.String BSD_PEER_FILE
public static final java.lang.String BSD_PPP_DEAMON
public static final java.lang.String BSD_PPP_CONNECTION_ESTABLISHED
public static final java.lang.String RAS_DIALUP_ENTRY
public static final java.lang.String RAS_INTERFACE
public static final java.lang.String RAS_PHONE_NUMBER
public static final java.lang.String RAS_MODEM
public static final java.lang.String RAS_PASSWORD
public static final java.lang.String RAS_USER
public static final java.lang.String RAS_GATEWAY
public static final java.lang.String RAS_USE_IFACE_FOR_ROUTE
public void open() throws java.io.IOException, TransportException
open
in interface Transport
java.io.IOException
- if an I/O error occurs.TransportException
- if the PPP connection cannot be established.public void close() throws java.io.IOException
public void init(java.util.Properties serialProperties) throws TransportException
Property | Description |
---|---|
mms.transport.ppp.timeout | number of seconds to wait for the PPP connection to be ready |
mms.transport.ppp.os |
Override the autodetection of your Operating System.
Set this property to [WIN] for a system which is using a RAS dialer |
Property | Description |
---|---|
mms.transport.ppp.bsd.peerfile | Name of the PPP peer file in use (usually located in /etc/ppp/peers/). |
mms.transport.ppp.bsd.daemon | Location of the pppd Executable. Defaults to "/usr/sbin/pppd". |
ppp.bsd.connection.established | Part of a string that the PPP daemon writes to stdout when the PPP connection is established. jSMS will wait until it sees this string from pppd before continuing its work. Defaults to "remote IP address" |
Property | Description | |
---|---|---|
mms.transport.ppp.ras.user | Username for authenticating the PPP peer. If unset, authentication is not required. | |
mms.transport.ppp.ras.password | Password for authenticating the PPP peer. | |
mms.transport.ppp.ras.modem | Name of the modem you are using to establish a PPP connection. | |
mms.transport.ppp.ras.interface |
Name of the RAS interface which will be registered once the PPP connection
has been established.
If you don't yet know the name of the RAS interface, just skip this entry and run the MMS "SendExample" that comes with jSMS. Running this example creates a new RAS Dialup entry named "jSMS-Dialup" which will be listed under "Network Connections" in your Control Panel. Next, invoke the command "route print" in a Command Prompt window, then start the "jSMS-Dialup" connection and invoke "route print" again after the PPP connection has been established. The RAS interface name can now be determined by looking at the "Interface List" output of the "route print" command. |
|
mms.transport.ppp.ras.dialup.entry | Name of the RAS Dialup entry to use for establishing a PPP connection. If you leave this property empty, jSMS will automatically create and use a RAS Dialup entry called "jSMS-Dialup". Do not reconfigure this entry since the changes will be overwritten by jSMS. | |
mms.transport.ppp.ras.addroute | IP address of a router/gateway that must be used for reaching the MMSC. If set, jSMS will add a route to the MMSC using the given address as a gateway. | |
ppp.ras.use_iface_for_route | If this property is set to "true", jSMS will look for the name/number of the PPP interface and will use this information when adding a route to the MMSC. Defaults to "false". |
init
in interface Transport
serialProperties
- Configuration Properties.TransportException
- if initialisation fails.public boolean isConnected()
Transport
isConnected
in interface Transport
public void run()
run
in interface java.lang.Runnable
object XP, Inc. © 2000-2013. All rights reserved object XP