Home | Tools | Samples | Libraries | Links | Other | Contact  

SMS source samples (for GSM phones)


Here you will find some source code samples I wrote for sending or working with short messages (SMS).

You can use this software free of charge, but at your own risk.


Samples overview

 go to topgo to bottom 

Sending SMS using a Nokia phone with PC Connectivity SDK version 2.1

The PC Connectivity SDK version 2.1 is the SDK for older Nokia phones like the 5110, 6150 or 6210. If you want to work with a phone of that generation, use the sample provided here.

Download

VB6 projectVB6: SendSMS_SDK21_VB6_20031112_H.zip
 
 go to topgo to bottom 

Sending SMS using a Nokia phone with PC Connectivity SDK Version 3.0

Note that the SDK version 3.0 includes two libraries: The "Component Library" and the "Extensive Component Library". This sample uses the "Extensive Component Library".

Download

VB6 projectVB6: SendSMS2_SDK30_VB6_20040414.zip
C# projectC#: SMSSend_SDK30_CS_20040414.zip
Requires .NET Framework 1.1
 
 go to topgo to bottom 

Using AT commands to send SMS messages

Using AT commands you're not restricted to a specific phone model, as long as the phone supports the commands you are using.

This program uses the text mode for sending the message, which is good for starting, but it may not be supported by every phone. If you want to use the PDU mode instead of the text mode - which is supported by all mobiles but is more complicated - see the PDU encoding sample for creating the required data.

Sample source code is available for VB6.

Details about the VB6 sample:

Download

VB6 projectVB6: SendSMS_AT_VB6_20041025.zip
 
 go to topgo to bottom 

Encoding SMS messages for PDU mode

This demonstrates how to create an SMS-SUBMIT PDU for a simple text message.

Download

VB6 projectVB6: EncodePDU_VB6_20040419.zip
C# projectC#: EncodePDU_CS_20040418.zip
Requires .NET Framework 1.1
 

Note: This program does only the coding, it does not actually send the message. For testing you can use a terminal program like HyperTerminal (included in Windows) to transfer the encoded message, as given in the following sample:

AT+CMGF=0<CR>
AT+CMGS=<actual PDU length><CR>
<encoded message><EOF>

<CR> = ASCII 13 = ENTER
<EOF> = ASCII 26 = CTRL+Z

You can also modify the AT command sample to use the PDU mode.

 go to topgo to bottom 

Using AT commands to read SMS messages

Using AT commands you're not restricted to a specific phone model, as long as the phone supports the commands you are using.

This program uses the text mode for reading the messages, which is good for learning how it works, but it may not be supported by every phone. You may have to change character sets depending on the characters used in the messages to get the original text back.

Download

C# projectC#: ReadSMS_AT_CS20_20060718.zip
Requires .NET Framework 2.0
 
 go to topgo to bottom 
 go to top