Delphi SMSCodec (SMS Processing Component)
Posted by Daniel - 4,330 Views
SMSCODEC is my own Delphi version of SMS Encoding/Decoding component. Its a simple one but quite enough to assemble a PDU format of an SMS send message to be sent via cellphone and to decode SMS message (received message) from my cellphone to get the sender number and the message content.
Several functions that you can use to perform SMS processing are: PDU7BIT2ASCII, PDU8BIT2ASCII, PDU16BIT2ASCII, ASCII2PDU7BIT, DecodeSMS, and EncodeSMS. Some lines in the component source code are commented and a demo/usage example project is also included in this package.
If you only need a utility to test the AT-Command of a GSM modem or a cellphone you may consider AT-CMD Tester, my GSM AT-Comand utility or a more complete one, the PDUSpy.
Installing Delphi SMSCodec
Delphi SMSCodec requires CPort Component to be installed. If you haven’t done it yet, please check the CPort instalation steps on my other post. If you have the CPort installed, follow these steps to install Delphi SMSCodec,
- Download the zipped component source then extract it.
- Copy “smscodec.pas” into Delphi Lib folder
- Use [Component] - [Install Component] menu item in Delphi IDE.
- Click [Browse] on the Unit file name textbox then find “smscodec.pas” to open it.
- Click OK then choose [Yes] to confirm the installation. The SMSCodec component is placed on the [averagecoder] tab.
Available download:
- Download the Delphi SMSCodec (212 KB).
Related Resources:
- Visual Basic Version of ASCII-to-PDU and PDU-to-ASCII Converter Functions
- Using CPort Delphi Component to read data from your cellphone
- C Version of ASCII To PDU Converter
- SMS and the PDU format
__________________________
The following posts are programmatically considered as related to the current post by YARPP Plugin:
- CPort Component (Serial port interface component for Delphi)
- MPEG Audio Component (A Delphi component to play audio files)
- An example: Using CPort Delphi Component to read data from your cellphone
- Runtime-Form-Creation. Automatically creating child forms in a Delphi MDI application with a component array
- XP Menu Component (MS-Office XP style on Delphi menu and toolbar)
Related posts brought to you by Yet Another Related Posts Plugin.
Latest from Tested Software
- Sweet Home 3D, a free home design software
- SmartFTP Client is no longer Free. What would be the best replacement for it?
- Kantaris Media Player, The most suitable Free Media Player on my Audio Environment
- TCPView for Windows, Tool to check TCP and UDP Connections on your system
- The Code Snippet Plugin, my favourite syntax highlighter plugin for WordPress
9 Responses to “Delphi SMSCodec (SMS Processing Component)”
Leave a Reply
Latest Blog Entries
- Sweet Home 3D, a free home design software
- 26x Optical Zoom on a Compact Digital Camera?
- Windows 7 Release Candidate is now available
- Microsoft Excel Import External Data Problem: When Microsoft Query doesn’t recognize some of your parameters
- The Lack of Chances is the Source of Poverty, Can we make a different?
- SmartFTP Client is no longer Free. What would be the best replacement for it?
- Kantaris Media Player, The most suitable Free Media Player on my Audio Environment
Categories
Neighbours and Friends
- Anti Teori
- Busby SEO Test Page
- Deny Sri
- Digital Media Convert
- Freeware Maniac
- Oeroek
- RidhoCyber
- Suraja Web
Comments - Thanks Guys :)
Therese Lachance: Hi, Any idea how to have ContuttoPDF fetch the correct page language?
Marlena Albu: Super Blog, Dude! I am constantly on the watch for new and interesting sites and postings about audio equipment… which is what...
tresloukadu: yo how did u fixed when the tags shows <? and it shows < “& l t ; ” ?? please send me an email.
Sean: This is a great piece of code and thanks for adding the updates. Sean’s last blog post: Not All Text Message Marketing Is Created...
rodhy: Thank for your code, it very usefull for me. best regard.
Most Popular Entries
- Passing arguments to your VB.NET console application
- ConsoleProgressBar - Simple Progress Bar Function for your VB.Net Console Application
- ASCII To PDU Converter (Convert ASCII to PDU and vice versa)
- An example: Using CPort Delphi Component to read data from your cellphone
- Microsoft Excel Import External Data Problem: When Microsoft Query doesn’t recognize some of your parameters
Software Collections
- Sweet Home 3D, a free home design software
- SmartFTP Client is no longer Free. What would be the best replacement for it?
- Kantaris Media Player, The most suitable Free Media Player on my Audio Environment
- TCPView for Windows, Tool to check TCP and UDP Connections on your system
- The Code Snippet Plugin, my favourite syntax highlighter plugin for WordPress
Blogging Related Stuff
- Change the WordPress permalink structure to the best format, and yes it’s a little bit scary :D
- Something is wrong, the Google Search Result from my blog looks bad, don’t laugh please :D
- Several tips to reduce Blog Noise, especially when your blog covers more than one niche
- How to remove your indexed pages or even your entire site from Google and Yahoo!


















February 20th, 2008 at 11:46 am
Nice piece of work!
A little notice for SMSCodec DEMO would be that ENCOD SMS does not include the optional ‘TP-VALIDITY-PERIOD’ but DECODE SMS seems to be expecting it even if the first octet is set to 00′01′. Therefore if you feed the encoded message into
decoder the result would be different. I believe presence of ‘TP-VALIDITY-PERIOD octet’ is handeled in ‘First octet of SMS-SUBMIT’ and is placed before ‘TP-User-Data-Length’.
Emanuel from Sweden
February 20th, 2008 at 11:48 am
Hi, It’s a good code, but i need enconde latin characters. Like á, é, í, ó, ú… etc. You know what i need develop to do this? Excuse my poor English.
Thanks from Mexico.
February 20th, 2008 at 11:52 am
@Jazter: I had never tried to include those chars into decoding process but the 7-bit Default Alphabet table which you can find it here,
http://www.dreamfabric.com/sms/default_alphabet.html
already included those chars and they have its reference on ISO-8859-1. Can you paste the result from your test here?
@Emmanuel: thanks for you deep digg :) Yep, it’s a flaw, will take a look on it when I get my GSM-Modem repaired.
Cheers
__________
Daniel
October 21st, 2008 at 1:11 am
Please, would you like to give us step by step procedure to install this component?
I could not install it on my Delphi 7 :(
October 21st, 2008 at 3:17 am
@Umar: The post has been updated with the installation steps. Please check above…
_________
Daniel
May 6th, 2009 at 1:35 pm
Great Post Thanx.
for free’s last blog post: Jonathan Krohn Addresses CPAC
July 28th, 2009 at 6:52 am
Averagecoder function working & usefull.
But i have problem (using Delphi6, Comport, Averagecoder smscodec, Siemens M35):
- First: When I send SMS for long SMS (more than 20 char but less than 160 char) then SMS received can be read correctly but long of message is less than amount char on transmitted SMS. Finally i’m use trick to add long of message 1 char for each 7 char length. It’s can work helpfull but not perfect, sometimes we lost 1 or 2 char on SMS received.
- Number 2: when i’m reading SMS, why decoding result always get extra chart “@” or “@@” on last message? I Have problem to make different if genui messagge using char “@” on last char.
I Think PDUSpy is perfect tool for PDU, but i can’t integrate it to Delphi :(
Thanks
January 2nd, 2010 at 2:12 am
Thank for your code, it very usefull for me.
best regard.
February 7th, 2010 at 11:15 am
This is a great piece of code and thanks for adding the updates.
Sean’s last blog post: Not All Text Message Marketing Is Created Equal