send incomming msg (SMS) to VB


Closed Thread
Results 1 to 20 of 20

Hybrid View

  1. #1
    Join Date
    Mar 2006
    Posts
    13


    Did you find this post helpful? Yes | No

    Default

    Try this setup to initially change your cell's default setting.



    to set up, try this:

    at+cmgf=1 (set to text mode)
    at+cnmi=2,1,0,0,0 (set to hear sms delivery response on terminal)
    at+cpms="me","me","me" (set mem storage to phone mem read/write)




    to read the sms, try this:

    +CMTI: "ME",27 (replace "27" with your message bank number)


    I don't understand what you mean when you say the new message doesnt output. Are you talking about a new sms being sent won't read or are you saying that trying to read another message won't appear? You have to remember to change the memory bank that you are reading from.


    Also, take a look at this part of your code:

    Do
    DoEvents
    buffer$ = buffer$ & MSComm1.Input
    Loop Until InStr(buffer$, "OK")

    Do you realize that when you receive your message, the cell phone does not reply "OK" ? It only response with "OK" when you issue a command TO the cell phone, not the other way around. It is possible that your program reads the message and then hangs because it is waiting for an "OK" reply which it never will receive. Just an observation, I might be incorrect as to what you are trying to do with your code.

    Good luck.

  2. #2
    Join Date
    Feb 2006
    Location
    johor,Malaysia
    Posts
    57


    Did you find this post helpful? Yes | No

    Default

    thankQ
    kamet

    i set the phone like this
    at+cmgf=1
    at+cnmi=2,1,2,0,0
    at+cpms="me","sm","me"

    how to save this setting. because after i disconnet the the phone dont save the setting.i must set the phone back if i want read recieve msg.

    thank for help me

  3. #3
    Join Date
    Mar 2006
    Posts
    13


    Did you find this post helpful? Yes | No

    Default

    PoTeToJB, I don't think you can save the settings when you disconnect the phone. If somebody knows how to, I would like to know that as well because I can't save it myself. I always initialize the connection with those settings everytime to ensure that they are properly set.

  4. #4
    Join Date
    Sep 2003
    Location
    INDIA
    Posts
    161


    Did you find this post helpful? Yes | No

    Default

    i have a SIMCOM Modem and I give a command AT&W which writes my current setting to the modem. Hope it works and helps.


    Well I am looking for some help in rx SMS using VB6. I have successfully rx the SMS using a PIC Micro and PBP. But don't know how to Rx it in VB.

    I understood the CMGR command but I don't know How I can skip a set of 51 character to escape the SMS details and copy just the message.

    Any Help ?

    Thanks in advance.

  5. #5
    Join Date
    Feb 2006
    Location
    johor,Malaysia
    Posts
    57


    Did you find this post helpful? Yes | No

    Default

    hello
    charudatt

    i use this code for read the msg and serperate the msg...

    Private Sub Command1_Click()
    Dim buffer$
    DIM newMsg As String, MSG As String

    MSComm1.Output = "AT+CMGF=1" + Chr(13)

    Do
    DoEvents
    buffer$ = buffer$ & MSComm1.Input
    Loop Until InStr(buffer$, "OK")
    Text1.Text = Text1.Text & vbCr & buffer$
    buffer$ = ""
    MSComm1.Output = "AT+CMGR=1" + Chr(13)

    Do
    DoEvents
    buffer$ = buffer$ & MSComm1.Input
    Loop Until InStr(buffer$, "OK")
    Text1.Text = Text2.Text & vbCr & buffer$
    Text2.Text = buffer$
    buffer$ = ""


    newMsg = Text2.Text
    newMsg = Right(newMsg, Len(newMsg) - 51) 'SKIP 51 character

    MSG = Left(newMsg, 100) 'NO 100 DEPEND YOUR MSG LENGTH,IF DONT KNOW U CAN PUT MORE THAN 100

    newMsg = newMsg & "MESSAGE =" & MSG & vbCrLf

    MSComm1.PortOpen = False
    End Sub



    Private Sub Form_Load()
    MSComm1.CommPort = 1
    MSComm1.Settings = "57600,n,8,1"
    MSComm1.PortOpen = True
    MSComm1.Handshaking = comNone

    End Sub

    i hope help u abit.
    but i still problem for read incomming msg.. i still study now

  6. #6
    Join Date
    Sep 2003
    Location
    INDIA
    Posts
    161


    Did you find this post helpful? Yes | No

    Default Thank you

    Thank you. But my idea is to read a incoming SMS using VB. This includes the following steps.

    (from cell phone): +CMTI: "ME",27
    (from computer): at+cmgr=27
    (from cell phone): +CMGR: "REC UNREAD","+15551234567","John Doe","05/10/18,23:21:45-20"
    Hello World

    This is simple using PIC BASIC Pro but I am not sure how to do this in VB6
    OK step one has definate characters to trap as I am going to keep my SMS's below 10
    Step 2 Is simple as I can just issue a command using VB.
    Step 3 is a bit challengeing as I am interested in only "Hello World"

    Any help. Are there any free ActiveX/OCX for receiving SMS for VB6

    regards
    Charudatt

    an after thought : should i be trapping a carriage return as the EOM (End Of Message) marker ?
    Last edited by charudatt; - 15th April 2006 at 17:51.

  7. #7
    Join Date
    Feb 2006
    Location
    johor,Malaysia
    Posts
    57


    Did you find this post helpful? Yes | No

    Default

    hello
    charudatt

    u say simple using PIC BASIC Pro for read incomming msg.
    can u share it..
    i want send and read incomming msg.. using pic

Similar Threads

  1. Active low input?
    By CosMecc in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 8th August 2010, 21:31
  2. Please send me a SMS program
    By hjcool in forum GSM
    Replies: 7
    Last Post: - 17th June 2009, 11:33
  3. how to send and receive sms using vb?
    By shyhigh2002 in forum Off Topic
    Replies: 0
    Last Post: - 1st April 2009, 10:18
  4. Replies: 0
    Last Post: - 1st September 2008, 08:03
  5. sms send sht11 pic16f876 nokia 6210
    By elektoro2009 in forum GSM
    Replies: 11
    Last Post: - 9th June 2008, 09:57

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

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