You are on page 1of 3

 

   dataGrid1.DataSource=dt; 

The above code will read all unread messages from SIM memory. The
method ShowMessage is used for displaying the read message. The message may be a
status report, stored message sent/un sent, or a received message. The only change in
processing Received message and Read message is the first parameter.

For received message

Hide Copy Code


DecodedShortMessage[] messages = 
  CommSetting.comm.ReadMessages(PhoneMessageStatus.ReceivedUnread, storage); 

For read all messages

Hide Copy Code


DecodedShortMessage[] messages = 
   CommSetting.comm.ReadMessages(PhoneMessageStatus.All, storage); 

5) Delete Messages (One or All)


The DeleteScope is an Enum which contains:

1. All
2. Read
3. ReadAndSent
4. ReadSentAndUnsent

Applications
Here are some interesting applications where you can use and modify this software.

1) Pre paid Electricity

Scenario (Customer)

The customer has agreed for pre paid electricity recharges with the help of recharge
coupons. The coupon is made available at shops. The customer will first buy the
coupons from shops; every coupon consists of Coupon PIN which will be masked, the
customer needs to scratch to view the PIN number. The customer will send an SMS to
the SMS Server with a specified message format for recharging.

Message Format for Recharging:


RECHARGE <Coupon No> <Customer ID>

Scenario (Server Database)

On the Server, the Database consists of Customer information along with his telephone
number, there will a field named Amount which will be used and updated when the
customer recharged with some amount. This application becomes somewhat complex,
an automatic meter reading software along with hardware needs to be integrated with
this. Automatic meter reading systems will read all meter readings and calculate the
amount to be deducted for the customer.

2) Astrology
You can implement as astrology software. The user will send an SMS with his zodiac
sign. The SMS server will maintain an Astrology Database with zodiac sign and a text
description which contains a message for the day. The Database is required to be
updated daily for all zodiac signs.
Message Format which will be used by the user to get message of the day:
Zodiac Sign

3) Remote Controlling System


We can implement a remote controlling system, for example you need to:

1. Shutdown
2. Restart
3. Log off system

You can send an SMS. The SMS server will listen and then process the message. Based
on the message format sent by the user we can take action.
Example if message format is:
SHUTDOWN
Send to SMS phone number.

Conclusion
This project wouldn't be completed unless I thank the GSMComm Lib developer "Stefan
Mayr". I customized my application using this Library. You can download the sample
project, library from the web link which I provided under the Reference section.

Reference
 http://www.scampers.org/steve/sms/index.htm

License
This article, along with any associated source code and files, is licensed under The Code
Project Open License (CPOL)

You might also like