Online documentation for SMS
Generated 2006-03-17
A component which can be used to send and receive SMS
Description
This component can be used to send and receive SMS
messages. To do this,
it must be used on a computer which is attached to
a GSM device that can be fully controlled using AT commands
(AT commands represent a standard for controlling GSM
devices from computers).
It has been fully tested with an MTC45 GSM/GPRS modem (which uses a
Siemens MC45 GPRS module), and is likely to work with
any GSM modem. It may also work when connected to a mobile
phone (see your phone instructions for details of how to connect
your phone to
a computer). However, although AT commands can be used
to send SMS through many mobile phones, it is common
for AT commands which support the receiving of SMS
not to work properly. Hence, if you wish to receive
SMS, the use of a GSM modem is recommended.
Installation
With whatever device you wish to use, you have to attach
it to your computer in such a way as to make it
visible as a COM port. GSM modems commonly
connect directly to a computer's serial port, and require
no driver installation (since the serial port automatically
appears as a COM port). Newer modems may connect via
USB, and require a driver to create a virtual COM port
representing the device. Mobile phones may also
connect via USB and require driver installation. Check
your manual for more details.
Configuration
To configure the component, first set the following
properties to values which are correct for
your device and driver set-up (you may need to look
these up in your manual)
- configBaudRate (rate of serial communication with device)
- configPort (COM port which can be used to communicate with device)
A typical baud rate for communicating with the MC45 GSM modem
is 19200 baud.
Then set the configured property to true. If the
component successfully connects to the device using the settings
that you have provided, then property connected
will be set to true. If not, then you will be given
an error message (through property attention)
indicating the error.
Note that only one device can use a serial port at any one
time, so you can only run one component per GSM device. To
disconnect from the GSM device, set configured
to false.
Usage
To send a message, enter the phone number you wish to send to
into property sendTo, and then enter the message you
wish to send into property sendMessage. Depending upon
the properties of the GSM device you are using, there may
be limits on the length of message that you send (your message
may be truncated if it is too long for your device to handle).
The most-recent message received will always be displayed
through property receivedMessage, and will be archived
to a list of received messages on property messages.
Note that a message may be
deleted from your GSM device by the component as soon as
it has received it, to save storage space on the SIM card being
used by the device.
Technical Details
The component uses the Java comm api to interact
with a GSM device, by sending AT commands
over a comm connection.