Question : Get SMS Modem response while sending message

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

Answer : Get SMS Modem response while sending message



good evening!

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

sumthing like this...


i hope i can give u some idea...



game-master
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
 
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
Random Solutions  
 
programming4us programming4us