?
Solved

Get SMS Modem response while sending message

Posted on 2009-02-20
6
Medium Priority
?
731 Views
Last Modified: 2013-12-09
Dear Experts,
I am using Multitech Modem to send automatically triggered sms from database. I use the MSComm component in vb6 exe to send SMS with AT commands. I have provided a sleep timeout of 15 sec between each sms. This is to ensure that the message has been successfully sent before the next sms could be sent from queue. Everything seems to be fine but occassionally the modem gets stuck up which needs a power OFF and ON reset of the modem. All i could understand from this forum is that the application has to get the modem response before proceeding with the sending of SMS. I have three questions
1. How to check the signal strength using AT command? Can i get the value so that i can store it into a log.
2. How to check the SMS modem response after a message has been triggered?
3. Any AT command to reset the modem (i.e. Power OFF and the ON).
I have very little knowledge and working experience in vb6 application development and i have developed this small application. Now i require some add-ons on the above mentioned lines. I would deeply appreciate if experts could respond to my queries  with code snippets.

Masha
0
Comment
Question by:kandallu
  • 2
4 Comments
 
LVL 7

Expert Comment

by:thiyaguk
ID: 23699228
0
 

Author Comment

by:kandallu
ID: 23703488
Hi thiaquk,

I have list of all those AT commands eg AT+CSQ to check signal strength, AT+CPAS to get the activity status etc,. My question/problem is how to get the response from the GSM modem on these commands executed from an exe using MSComm. I have tried a few codes posted on the net but they couldn't really solve my problem. What I need is code to recieve the feedback/response from the modem for all the AT commands and log them.
0
 
LVL 13

Accepted Solution

by:
game-master earned 2000 total points
ID: 25372406


good evening!

you have to read the data from the MSComm...

sumthing like this...


i hope i can give u some idea...



game-master

 
Private Sub GSMModem_OnComm()
    Dim modemInput As String
    
    If GSMModem.CommEvent = comEvReceive Then
        modemInput = GSMModem.Input
        If Len(modemInput) > 0 Then
            If Asc(modemInput) = 13 Or Asc(modemInput) = 10 Then
                    debug.print  modemLine  'this the response on the modem
                    modemLine = ""
                End If
            Else
                modemLine = modemLine & modemInput
            End If
        End If
    End If
End Sub

Open in new window

0
 

Author Closing Comment

by:kandallu
ID: 31549531
Thanks
0

Featured Post

 The Evil-ution of Network Security Threats

What are the hacks that forever changed the security industry? To answer that question, we created an exciting new eBook that takes you on a trip through hacking history. It explores the top hacks from the 80s to 2010s, why they mattered, and how the security industry responded.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Tired of waiting for your show or movie to load?  Are buffering issues a constant problem with your internet connection?  Check this article out to see if these simple adjustments are the solution for you.
Online collaboration is quickly becoming embedded in the workplace, and its benefits are tangible. See what the current landscape looks like and what the future holds for collaboration tools and the future of work.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question