Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 2 of 2

Sending SMS to port

This is a discussion on Sending SMS to port within the MapPoint Desktop Discussion forums, part of the Map Forums category; I am trying to retrieve, data from port7 and pass it to another computer through SMS, from port1 of same ...

  1. #1
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    Sending SMS to port

    I am trying to retrieve, data from port7 and pass it to another computer through SMS, from port1
    of same computer.I am using 2 comm controls for same purpose.MSComm1 is commected to port1
    and MSComm2 is connected to port2.Now my problem is that, i am able to retrieve data from port1,
    but i am not able to SMS it to other computer.ReadMsg(MessageNo) is the procedure to send SMS.
    The program do not show any error, but it foes not send SMS either.On debugging, the control passes
    through ReadMsg() procedure, but do not send SMS.I am attaching the code with my query.
    Do anybody have any idea?
    Regards,
    BN


    Private Sub Form_Load()
    If MSComm1.PortOpen = True Then MSComm1.PortOpen = False

    MSComm1.RThreshold = 1
    MSComm1.RTSEnable = True
    MSComm1.Settings = "9600,n,8,1"
    MSComm1.CommPort = 7
    MSComm1.PortOpen = True
    MSComm1.Output = "AT+CMGF=1" & vbCr

    End Sub

    Private Sub MSComm1_OnComm()

    Dim MsgNo
    Dim cominput


    cominput = ""
    cominput = MSComm1.Input

    Text1 = Text1 & cominput

    If InStr(cominput, "GetPos") > 0 Then
    Call PortOpen
    ElseIf InStr(cominput, "CMTI:") > 0 Then
    MsgNo = (Mid(cominput, InStr(cominput, "SM") + 4))
    Text3 = MsgNo
    Call ReadMsg(Text3)
    End If

    cominput = ""

    End Sub

    Private Sub MSComm2_OnComm()
    Text2 = Text2 & MSComm2.Input
    End Sub

    Private Sub ReadMsg(MessageNo)
    Dim str
    If MSComm1.PortOpen = True Then MSComm1.PortOpen = False
    MSComm1.RThreshold = 1
    MSComm1.RTSEnable = True
    MSComm1.Settings = "9600,n,8,1"
    MSComm1.CommPort = 7

    MSComm1.PortOpen = True
    MSComm1.Output = "AT+CMGR=" & MessageNo & vbCr

    End Sub

    Private Sub PortOpen()

    If MSComm2.PortOpen = True Then MSComm2.PortOpen = False

    MSComm2.RThreshold = 1
    MSComm2.RTSEnable = True
    MSComm2.Settings = "9600,n,8,1"
    MSComm2.CommPort = 4
    MSComm2.PortOpen = True

    End Sub

  2. #2
    techecho's Avatar
    techecho is offline Junior Member White Belt
    Join Date
    May 2004
    Posts
    7

    may not under stand question

    If InStr(cominput, "GetPos") > 0 Then
    Call PortOpen
    ???????
    MSComm2.Output = "AT+CMGR=" & cominput & vbCr
    ???????
    ElseIf InStr(cominput, "CMTI:") > 0 Then
    MsgNo = (Mid(cominput, InStr(cominput, "SM") + 4))
    Text3 = MsgNo
    Call ReadMsg(Text3)
    End If

    "CMTI:" looks to be being sent back to CommPort = 7
    but
    "GetPos" only opens CommPort = 4 but does not send anything

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. COM port for GPS
    By koan in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 09-15-2004, 04:00 PM
  2. IP and Port
    By amitsh in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 03-24-2004, 12:59 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27