Question

using ASP to send sms using a GSM modem?????

Asked by: heyhey84

Is there any guide for me?

i would like to send a SMS using a GSM modem in ASP.
code provided would be better

Can anyone help?

thank you

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-01-20 at 06:17:22ID20856444
Tags

sms

,

send

,

modem

,

gsm

,

using

Topic

Global System for Mobile Communications (GSM)

Participating Experts
7
Points
20
Comments
24

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. GSM/SMS concepts
    Hi Ive been reading some of the discussions on how sending of sms operates. Id like to you guys to validate and confirm my understanding so far : so ive heard there are 3 ways to send messages : 1) cellphone --> SMSC (Telco) * this will send one sms message at a time...
  2. gsm
    will u plz send me the code for sending sms from pc to mobile using gsm modem in vc++?
  3. SMS project for gsm mobile
    hi...i need to do wireless project related to SMS..so ineed to develop interactive between Pc and handphone. my project is like reminder...for example ihave a meeting 3p.m...then i sms to my server that i have meeting at 3 p.m...then the server will sms me at ot before 3p.m t...
  4. GSM
    I Already Own A GSM Modem, Should I Also Need To Subscribe To Any Service Providers(airtel , hutch ,etc.) For Sending SMS From PC To Mobile . Urgently Required...Please Reply At Earliest..

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-01-21 at 12:01:47ID: 10168128

On http://www.visualtron.com/download.htm you may will find the answer to your question.
API downloads for VisualGSM Enterprise
 
Code for sending SMS
 From DOS command-line
 Java class code
 PHP code
 ASP code (download free HTTP component)
 DirectSQL execution
 ASP/VB/Delphi/C++ code (download free ActiveX HTTP component)
 
Regards
Meff
www.gsm-modem.de

 

by: heyhey84Posted on 2004-01-22 at 19:57:42ID: 10181212

i do not need such a complex content or component.

i just need some simple code to send a SMS.... For example how to open the com port, set the AT command and so on......A very simple coding to send SMS.

thank you

 

by: MeffPosted on 2004-01-26 at 13:41:05ID: 10204403

 

by: heyhey84Posted on 2004-01-27 at 03:19:11ID: 10208257

i know those At command........ but wat i want is
in asp, how am i going to use all this command.......................

u got wat i mean?

 

by: indiagomobilePosted on 2004-02-01 at 05:09:27ID: 10246400

Dear Friend,

What all you know is great about At commands and MsComm in Vb or Asp all you need to do is open the Port for Mscomm when ur device si connected and write those specifiv at commands through them.

This is all you need to do for ASP.

for details regarding commands
http://www.agarwalandsons.com/mobile


Regards
Vikas Agarwal

 

by: heyhey84Posted on 2004-02-01 at 06:46:54ID: 10246624

Hi Vikas Agarwal,

how come i still dont get answer that i want.............

where is the actual asp coding to send sms?

 

by: virenderpratapPosted on 2004-02-02 at 02:00:21ID: 10251311

Dear,
What Vikas is trying to say is ...
you have to Develop one ActiveX component in VB , Which will open COM port to send AT Command for u...
this component can be eassly called by ur ASP page..

here is some lines of code in VB...

public Sub SendSMSMessage(String msg)

MSComm1.InputLen = 0
MSComm1.RThreshold = 5
MSComm1.CommPort = 3
MSComm1.InBufferCount = 0
MSComm1.PortOpen = True
MSComm1.Output = "AT + CMGF = 1" & vbCrLf
MSComm1.Output = "AT+CMGS=9872091812"
If MSComm1.InBufferCount Then
     if(StrConv(MSComm1.Input, vbUnicode)=">") then
                 MSComm1.Output =  Msg
     end if
End If
End Sub

write this fucntion on Active DLL and create its object in ASP...
like:
ASP Page :VB Script

Set obj=Server.CreateObject("MySMSSender.DLLForASP")
obj.SendSMSMessage "My First Message"



 

by: heyhey84Posted on 2004-02-02 at 02:14:18ID: 10251354

actually i still dont know how to use the above information.

Is there anyway i can d/l the Asp coding and start sending sms using the GMS modem in  a ACTIVE SERVER PAGE?

 

by: virenderpratapPosted on 2004-02-02 at 21:01:51ID: 10258530

Look on other articals in this forum for more details..Like
vb code for 2 way messaging...
or
Search GOOGLE or other Searc engine for SMS Code in VB
Any code written in VB to send SMS can work for ASP also .. USE VB SCRIPT in ASP Page...

ok here are is some code which u can use in ASP page written in VB Script..

<%
Set obj=Server.CreateObject("MSCOMMLib.MSComm")
MSComm1.InputLen = 0
MSComm1.RThreshold = 5
MSComm1.CommPort = 1
MSComm1.InBufferCount = 0
MSComm1.PortOpen = True
MSComm1.Output = "AT + CMGF = 1" & vbCrLf
MSComm1.Output = "AT+CMGS=9872091812"
If MSComm1.InBufferCount Then
     if(StrConv(MSComm1.Input, vbUnicode)=">") then
                 MSComm1.Output =  "My First Message"
     end if
End If
End Sub
%>
Make one ASP ge , write above code in VB Script
Instead of "My First Message" String, u can take Request.Form("SMSMessage") (Value send by user client)
I don't know whether above AT Commands work with ur phone or not...
To Know abt AT comand See other Acrticals in this forum..
Look, no body can write a complete code u ....

 

by: heyhey84Posted on 2004-02-04 at 02:59:09ID: 10269809

Hi thank for the coding....

but from the coding, which command is for input of the reciever number?

MSComm1.Output = "AT+CMGS=9872091812" -> is setting for the service center right?

so which command to enter the reciever hp number?

 

by: virenderpratapPosted on 2004-02-04 at 05:02:39ID: 10270369

To Set Service Center Number the Command is :its not required sometime, if mobile is already configured ...
"AT+CMCA=\"982345676\"\r"
To send SMS
First Send :
"AT+CMGF=1\r" //Command to Put the Mobile in Text Mode
then
"AT+CMGS=\"9872091812\"\r"
then in response u get
">"
then only u can send Text Message.... of 160 character...
Last character must be char(26)

is it ok ?....





 

by: heyhey84Posted on 2004-02-04 at 08:24:07ID: 10272186

i paste the coding in my ASP page and i get this error.

Server object, ASP 0177 (0x800401F3)
Invalid class string

i think the error is saying abt this statement

->

Set MSComm1=Server.CreateObject("MSCOMMLib.MSComm")

wat should i do?

 

by: virenderpratapPosted on 2004-02-04 at 20:29:23ID: 10277816

Are u sure the line number is same where error is coming...

if yes, then check do u have mscomm32.ocx file in system32 directory..
then check if it is register properly or not in OLE view Tool comes with V.Studio ...or Find entry in registry of "MSCOMMLib.MSComm" or
"MSCOMMLib.MSComm.1"

u can register ur ocx file by running command in run window
Regsvr32 mscomm32.ocx

 

by: heyhey84Posted on 2004-02-05 at 06:31:43ID: 10280645

i run the command , but object cannot be found.
i am using window XP

btw would it be better that u email me the ASP page with the coding.

My email address is whyalwaysme@catcha.com

Thank you

 

by: BigRatPosted on 2004-02-05 at 09:09:47ID: 10282151

The MSComm control is a licensed product and is neither availabe on XP nor in ASP.

It is available in Professional Visual Basic 6.

There is an alternative FreeWare control at http://ourworld.compuserve.com/homepages/richard_grier/NETCommOCX.htm.

You'll still need the .ocx file though.

 

by: virenderpratapPosted on 2004-02-05 at 20:15:17ID: 10287332

Dear u never mention before that u don't have Visual Basic installed,
but still u can copy this mxcomm32.ocx and register it on ur machine ...
it will work fine with ASP..

or BigRat has already given uthe alternative...

 

by: heyhey84Posted on 2004-02-05 at 22:49:30ID: 10287996

sorry for that... thanks but i am still trying....

hope to get ur advise again.

thank you

 

by: heyhey84Posted on 2004-02-12 at 07:51:13ID: 10343472

Hi virenderpratap,
what is Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'StrConv'
??????????

 

by: heyhey84Posted on 2004-02-12 at 08:19:53ID: 10343810

How to set the setting to  9600 baud, no parity, 8 data, and 1 stop bit.

Is it MSComm1.Settings = "9600,n,8,1"?

But my code cannot works.

<%

Sub Delay(DelaySeconds)
SecCount = 0
Sec2 = 0
While SecCount < DelaySeconds + 1
Sec1 = Second(Time())
If Sec1 <> Sec2 Then
Sec2 = Second(Time())
SecCount = SecCount + 1
End If
Wend
End Sub

%>

<%

Dim MSComm1,strReceived

Set MSComm1=Server.CreateObject("MSCOMMLib.MSComm")

'MSComm1.Settings = 9600,n,8,1'
MSComm1.CommPort = 2
MSComm1.RThreshold = 1
MSComm1.SThreshold = 1



MSComm1.PortOpen = Not MSComm1.PortOpen

If MSComm1.PortOpen Then

     response.write "Comm. Port " & MSComm1.CommPort & " Settings: " & MSComm1.Settings

Else
     response.write "Comport Problem "
End If


MSComm1.Output = "AT+CMGF=1" & vbCrLf
Delay(0.2)

MSComm1.Output = "AT+CSCA=+6596845997" ' Set GSM service centre no. '
Delay(0.2)
MSComm1.Output = "AT+CMGS=98157058" 'phone number'
Delay(0.2)
MSComm1.Output = "Hello this is a test. pls reply if u recieve this message.Thanks" + Chr(26)
Delay(2)

%>

 

by: virenderpratapPosted on 2004-02-13 at 00:50:25ID: 10350493

U must me passing worng argument to 'StrConv' , this fucntion need string to convert it to other format(like Lower case upppercase,SimplifiedChinese etc)..

Secondly, easy way to set the com port  setting is just don't touch the setting properties of MSCOMM, rather go to Device Manager and select com port and change the desire setting ,

ur Setting strings looks ok , ... it should be like that only...






 

by: babsjidPosted on 2004-04-29 at 07:12:16ID: 10949575

Hello Guys,
I want to send SMS through an application built in asp.net using my phone connected to the PC (The communication between my PC and phone is Infrared. Can Anyone assist me in how i can do this

Thank you.

 

by: esamslahPosted on 2004-06-29 at 04:31:23ID: 11424834

Hi babsjid

In order to send SMSs from your web application you can follow the approach discussed befor for classic asp.

but you will need to make some modifications ..like : u will not need to use Server.CreateObject("MSCOMMLib.MSComm")

instead .. u will add a refrerence to the COM component called [Microsoft Comm Control] after that u will have the MSCommLib in the references node at the solution explorer

now u can put a button on the WebForm and write this code :-

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim MSComm1 As New MSCommLib.MSCommClass
        Dim strReceived As String

        MSComm1.Settings = "9600,n,8,1"
        MSComm1.CommPort = 2
        MSComm1.RThreshold = 1
        MSComm1.SThreshold = 1



        MSComm1.PortOpen = Not MSComm1.PortOpen

        If MSComm1.PortOpen Then

            Response.Write("Comm. Port " & MSComm1.CommPort & " Settings: " & MSComm1.Settings)

        Else
            Response.Write("Comport Problem ")
        End If


        MSComm1.Output = "AT+CMGF=1" & vbCrLf
        Threading.Thread.Sleep(2000)

        MSComm1.Output = "AT+CSCA=+6596845997" ' Set GSM service centre no. '
        Threading.Thread.Sleep(2000)
        MSComm1.Output = "AT+CMGS=98157058" 'phone number'
        Threading.Thread.Sleep(2000)
        MSComm1.Output = "Hello this is a test. pls reply if u recieve this message.Thanks" + Chr(26)
        Threading.Thread.Sleep(2000)



    End Sub

insure that the serial parameters are correct for ur configuration like the comPort number and the supported message format
 I can be of help if u need more

 

by: davidlars99Posted on 2004-09-18 at 20:46:06ID: 12094175

hi Guys,
I just stumbled this discussion and found it very interestning (story that has no ending)  would you please somebody end it :)
heyhey84, what was the correct use of MSComm, did you find out...
BTW, I looked at  heyhey84's question history and last one he posted was in May-2004.

 

by: davidlars99Posted on 2004-09-18 at 20:47:52ID: 12094182

well, I guess  heyhey84 became byebye84 :)

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...