Question

Developing an API to send SMS through the PC

Asked by: hasitha007

dear all
i have started a project where i have to develop and API to send and receive SMS through a pc. i will be using a NOKIA 3310 mobile phone and will be connecting it through the COMM port. But still i have a very little idea in starting the project. i know that the phones communicate using the AT commands. can any one give guide me ? please let me know where i can find the nessasary information.
thank you,
best regards,
hasitha007

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2004-04-08 at 22:21:16ID20948621
Tags

sms

,

send

,

api

Topic

Global System for Mobile Communications (GSM)

Participating Experts
10
Points
200
Comments
19

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Send SMS via serial cable with Nokia 3310
    I'm developing an SMS application using a third-party API (JSMS) to connect to my GSM Phone (Nokia 3310) via Serial Cable (COM1). The JSMS API is using AT command to send and receive the SMS. I found that the application is able to connect to the COM port, but failed to send...
  2. SMS
    I want to add the SMS feature in my website, so ppl can send sms directly to my phone from the website. Anyone know how can I achieve this in php? I registered on http://www.clickatell.com what next? Moiz
  3. SMS API for clickatel.com
    Hello, Im currently lookin at developing a small appliaction with clickatel.com's sms api. im not looking for the fnal product at the moment but i am looking to just send some test text messages so that i can get used to the script and to develop my application from there. t...
  4. Java comm API
    hi for my project i need to send an sms from the server. i heard that you can send sms using java comm api through an IR port. i do not have a GSM modem. can sms be sent without it? can anyone help me?

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: MeffPosted on 2004-04-10 at 23:42:25ID: 10800032

 

by: anupvijayPosted on 2004-04-13 at 06:11:17ID: 10813022

Hi Hasitha,
Meff has given some very good links.
One thing that you might like to find out before starting out with AT commands on any phone is that whether the phones
support the AT commands needed by you.
Although ETSI standards lays out the standard AT commands that should be present I have seen mobile which do not
have all the AT commands incorporated.
It simply means that an AT command   which works with one phone should not necessarily work with others.
So be careful if you want your APIs to be generic for different phones.

Coming to your project.....I can give you pointers.
Use a hyperterminal to connect to your COM port and fire AT commands to check everything is working fine.

Now for your APIs......(assuming you are on windows). You need to use the win32 APIs to open/write/read/close COM ports
What you will be writing would be mostly your AT commands. And what you will be reading would be responses to the  AT
commands.

I think a good starting point would be to get your api to communicate with a COM port initially and then advance step by step
towards your ultimate goal.
A link that could help you.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp

Keep posting about your progress and we here will try to help you out.

Cheers,
Anup

 

by: virenderpratapPosted on 2004-04-14 at 00:28:09ID: 10821032

3310 , 3350 doesn't support AT command and ALSO offically Nokia  haven't lauched the Serrial cable too for it.
8210 , 8250 are the cheepest model which Supports AT commands But they DO NOT the Communicate Via  Serial Port , U can use IRDA port to communicate and run ur AT commands on them.
Minimum Nokia Model to use Serial port and AT commands is Nokia 3100 , better ask Nokia Service Center.

 

by: f_rodriguezPosted on 2004-04-16 at 06:44:57ID: 10842353

What language are you developing in? I wrote this VB6 module once to take care of sending/receiving SMS's from my VB6 projects using a GSM modem connected to the serial port. I use the MSComm control for the actual comms. Note that the functions require a reference to an MSComm control as the first argument.



Option Explicit

Public Function RemoveInternationalDiallingCode(ByVal tTelNumber As String) As String
    RemoveInternationalDiallingCode = "0" & Mid(tTelNumber, 4)
End Function

Public Function GetSMSNum(ByVal tSMSNotification As String) As String
    Dim lCRPos As Long
   
    lCRPos = InStrRev(tSMSNotification, vbCr)
    If lCRPos > 0 Then GetSMSNum = Mid(tSMSNotification, lCRPos - 2, 2)
    If Left(GetSMSNum, 1) = "," Then GetSMSNum = Right(GetSMSNum, 1)
End Function

Public Function ReadSMS(comms As MSComm, ByVal tSMSNum As String, tMessage As String, tSender As String, tDate As String, tTime As String, bRead As Boolean) As Boolean
    Dim tChar As String * 1
    Dim i As Long
    Dim tRead As String
    Dim lQuoteNum As Long
    Dim tDateTime As String
    Dim tData As String
   
    Const TIMEOUT = 10000
   
    On Error GoTo ErrHandler
   
    tData = "AT+CMGR=" & tSMSNum & vbCr
    comms.InBufferCount = 0
    comms.Output = tData
    tData = ""
   
    i = timeGetTime
    Do While timeGetTime - i <= TIMEOUT And InStr(tData, "OK" & vbCrLf) = 0 And InStr(tData, "ERROR" & vbCrLf) = 0
        DoEvents
        If comms.InBufferCount > 0 Then
            tChar = comms.Input
            tData = tData & tChar
        End If
    Loop
           
    If InStr(tData, "ERROR") = 0 And tData <> "" Then
        For i = 1 To Len(tData)
            tChar = Mid(tData, i, 1)
            If tChar = """" Then lQuoteNum = lQuoteNum + 1
            If lQuoteNum = 1 And tChar <> """" Then tRead = tRead & tChar
            If lQuoteNum = 3 And tChar <> """" Then tSender = tSender & tChar
            If lQuoteNum = 5 And tChar <> """" Then tDateTime = tDateTime & tChar
            If lQuoteNum = 6 And tChar <> """" Then tMessage = tMessage & tChar
        Next i
       
        bRead = (tRead = "REC READ")
        tDate = Left(tDateTime, 8)
        tTime = Mid(tDateTime, 10, 8)
        tMessage = Mid(tMessage, 3)
        tMessage = Mid(tMessage, 1, InStr(tMessage, vbCr) - 1)
        ReadSMS = True
    End If
    Exit Function
   
ErrHandler:
    ReadSMS = False
End Function

Public Function DeleteAllSMSes(comms As MSComm) As Boolean
    Dim i As Long
   
    For i = 1 To 15
        DeleteAllSMSes = InStr(TransmitAndReceiveData(comms, "AT+CMGD=" & i & vbCr), "OK")
    Next i
End Function

Public Function DeleteSMS(comms As MSComm, ByVal lSMSNum As Long) As Boolean
    DeleteSMS = InStr(TransmitAndReceiveData(comms, "AT+CMGD=" & lSMSNum & vbCr), "OK")
End Function

Public Function SendSMS(comms As MSComm, ByVal tSMSNum As String, ByVal tMessage As String) As Boolean
    SendSMS = InStr(TransmitAndReceiveData(comms, "AT+CMGS=" & """" & tSMSNum & """" & vbCr & tMessage & Chr(26)), "OK")
End Function

Public Function TestModem(comms As MSComm) As String
    TestModem = TransmitAndReceiveData(comms, "AT")
End Function

Public Function ManufacturerInfo(comms As MSComm) As String
    ManufacturerInfo = TransmitAndReceiveData(comms, "AT+CGMI")
   
End Function

Public Function ModelInfo(comms As MSComm) As String
    ModelInfo = TransmitAndReceiveData(comms, "AT+CGMM")
End Function

Public Function FirmwareInfo(comms As MSComm) As String
    FirmwareInfo = TransmitAndReceiveData(comms, "AT+CGMR")
End Function

Public Function IMEIInfo(comms As MSComm) As String
    IMEIInfo = TransmitAndReceiveData(comms, "AT+CGSN")
End Function

Public Function IMSIInfo(comms As MSComm) As String
    IMSIInfo = TransmitAndReceiveData(comms, "AT+CIMI")
End Function

Public Function EF_CCIDInfo(comms As MSComm) As String
    EF_CCIDInfo = TransmitAndReceiveData(comms, "AT+CCID")
End Function

Public Function NetworkRegStatus(comms As MSComm) As String
    NetworkRegStatus = TransmitAndReceiveData(comms, "AT+CREG?")
End Function

Public Function AvailablePLMNs(comms As MSComm) As String
    AvailablePLMNs = TransmitAndReceiveData(comms, "AT+COPS?")
End Function

Public Function NetworkFieldStrength(comms As MSComm) As String
    NetworkFieldStrength = TransmitAndReceiveData(comms, "AT+CSQ")
End Function

Public Function MainCellMainParams(comms As MSComm) As String
    MainCellMainParams = TransmitAndReceiveData(comms, "AT+CCED=0")
End Function

Public Function TransmitAndReceiveData(comms As MSComm, ByVal tData As String) As String
    Dim lTime As Long
   
    Const TIMEOUT = 10000
   
    tData = tData & vbCr
   
    With comms
        .InBufferCount = 0
        .Output = tData
        tData = ""
   
        lTime = timeGetTime
        tData = ""
        Do While timeGetTime - lTime <= TIMEOUT And InStr(tData, "OK") = 0 And InStr(tData, "ERROR" & vbCrLf) = 0
            DoEvents
            If .InBufferCount > 0 Then tData = tData & .Input
        Loop
    End With
           
    TransmitAndReceiveData = tData
End Function

 

by: digitalconvictPosted on 2004-05-02 at 05:46:27ID: 10971262

If you manage to find a phone that supports the serial port interface, you could try the Whisperstream SerialComm GSM SDK, you can get it from http://www.whisperstream.com/software/serialcomm/

It has source code and examples.......I used it for a project I did a while ago and you can extend it if you want.......it's written in C# .NET though, dunno if that will work for you.

 

by: amit1978Posted on 2004-05-04 at 04:24:02ID: 10985343

thanks for help.......

 

by: hasitha007Posted on 2004-05-11 at 02:20:25ID: 11038608

hi

i tried to send an SMS through the Hyperterminal but i faild. i connected the NOKIA 3310 phone to the COM port by using a data cable . at the hyperterminal editor i could not type any thing .  so i could not type the AT commands. could u pls tell me the steps to send an SMS by using the hyperterminal.
thank you  

 

by: virenderpratapPosted on 2004-05-11 at 02:40:07ID: 11038701

Please See my pervious comment....
3310 , 3350 doesn't support AT command and ALSO offically Nokia  haven't lauched the Serial cable for them. you can't communicate with thru hyperterminal with these mobiles....

 

by: hasitha007Posted on 2004-05-11 at 21:39:01ID: 11046785

hi virenderpratap
thanks for the info. then i think i need to buy a NOKIA 8250.
i will be using c/c++ language to develop my API . can anyone tell me how to start cording. at the morment i really have no idea in starting the project.

 

by: virenderpratapPosted on 2004-05-11 at 22:15:52ID: 11046944

If you are palnning to buy 8250 then it will work on IRDA only,
So, to work with IRDA use IRCOMM to communicate with mobile phone..
IRCOMM is nothing but a virtual com port, so you just need to open IR com port simiral to actual com port , and write the AT commands on it,  f_rodriguez has already posted the code for you in VB, for VC++ just use CreateFile and WriteFile ReadFile Fucntions to Open , IR com(Generally COM4 in Win98) , write data and read data. See the Answered posts in this section you will found your anwser how to start as well as how to code it in C/C++

You may face problem in Other versions of Windwos (Like 2000, NT) becos they don't have direct support for IRComm. But if you buy phone which can have AT command AND Serial Cabel Support then your work will be more easy...

Call to nokia service center they will tell the cheepest model which support AT as well as Serial communication.

 

by: hasitha007Posted on 2004-05-24 at 02:44:56ID: 11141545

hi,
I tried with a  nokia 5110 and when i used the hyperterminal and typed  "AT" the charactor that was displayed was " } a " and it replied with " mk ". could u pls tell me whether i can use the Nokia 5110 phone or whether i  have to go for nokia 6110 for serial communication ? which phones supports serial communication and the AT commands ? i have a NOKIA 6120 . does it support serial communication ?
and why did i receive "mk" insted of the "ok". is it a problem with the operating system. i used windows 2000.
thank you,

 

by: lanxiPosted on 2004-05-27 at 08:01:24ID: 11172344

You can try this tool called EasiSMS from http://www.inspire-tech.com

It supports command line so you don't need to use AT commands. It can support both serial cable, USB cable and even infrared.

 

by: ctsttomPosted on 2004-06-02 at 12:10:49ID: 11215780

You guys dont even read what the question was that hasitha007 asked. hasitha007 is trying to program a c app to send SMS's with not find one to send sms's with.

 

by: digitalconvictPosted on 2004-06-02 at 14:29:53ID: 11216994

Well the whisperstream solution has source code with it, that might aid hasitha007 in the coding of the app.

Granted it's C#, but I'll often look at other languages to get an idea how to code something.  Do you not agree?

 

by: hasitha007Posted on 2004-06-03 at 23:14:10ID: 11230010

dear all,
now i am facing a big problem. that is which phone to select for AT commands serial communication.
now i have recognized that only some phones supports the AT commands ,serial communication. i tried with nokia 3310,5110,6120, but neither one supported the serial communication of AT commands.  
After that i tried to work with IRDA. Then I faced another problem. That is the IRDA adapter has only the USB ports and then i cannot communicate with the serial port.
So can any one tell me which are the cheapest phones that supports serial communication of the AT commands.

Thank you.

 

by: digitalconvictPosted on 2004-06-03 at 23:27:54ID: 11230084

A Nokia 6210, will definately work (you'll need a dlr-3 serial cable, about 5GBP on ebay).....that's the one supported in the whisperstream sdk and it's what I use.  I'm pretty sure a nokia 6110 will also work.

Anyway hope that helps

 

by: hasitha007Posted on 2004-06-04 at 03:27:42ID: 11231083

dear  digitalconvict
thanks for the information. i will try to get one over the weekend and let u know.
thanks.

 

by: uckermark-girlPosted on 2005-04-28 at 01:02:38ID: 13883658

Hello please help.
For my diploma thesis i have to write an apllication what send automatically after an error ocurs an sms over serial cable to my siemens tc35 and then to the mobilphone of the pc administrator.
On this homepage i found some code for sending one at command to the com port but doesn´t know how i can use it for sending an sms and an question is can i send sms in textformat or i have to change the sms text into pduformat? Can someone help my?
I using Windows 2000, a siemens tc25 gsm modem and visual studio 6.0 with the programmlanguage  c++. How i have to start? With Hyperterminal the creation and sending of an sms with the at commands works. In my apllication i want to use the at+cpin, at commands for sending an sms.

Thanks for help and an answer and sorry for my english.

 

by: abd9090Posted on 2005-05-15 at 00:50:56ID: 14004912

hi man go to
http://www.forum.nokia.com/main.html
download sdk 3.0 and start developing
sdk3.0 full of example for vb6 developer
have a nice day

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...