Get SMS Modem response while sending message

Posted on 2009-02-20
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.

Question by:kandallu
    LVL 7

    Expert Comment


    Author Comment

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

    Accepted Solution


    good evening!

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

    sumthing like this...

    i hope i can give u some idea...

    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
                    modemLine = modemLine & modemInput
                End If
            End If
        End If
    End Sub

    Open in new window


    Author Closing Comment


    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    To properly understand GitHub, let’s divide it into two words ‘Git’ and ‘Hub’. Git is basically a ‘Distribution Version Control’ (DVC) and ‘Source Code Management’ (SCM) system widely used by software programmers while Hub means the efficient centre…
    In this article we have discussed about the OS X EI Capitan and how to fix Wi-Fi issue in OS X El Capitan. We have explained how to delete system level preferences and create a new Wi-Fi location to resolve Wi-Fi issue.
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
    This Micro Tutorial will show you how to maximize your wireless card to its maximum capability. This will be demonstrated using Intel(R) Centrino(R) Wireless-N 2230 wireless card on Windows 8 operating system.

    734 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now