×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    32

    Send SMS , Please advice

    Hi, I am developing a VB application to send out sms.
    Currently, I've got a function that do this.

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

    Comm.Output = "AT+CSCA=""+60162999902"",145" & Chr(13)

    Comm.Output = "AT+CMGS=""+60164115155"",145" & Chr(13)

    Comm.Output = "It Works!!" & Chr(26)

    Whenever I run that function, i can see that it passes some weird character to the Terminal, and no sms will be send.

    However, if I do one statement by one statement, which means, execute the above statements separately. ANd in between each statement, I wait for the Modem to return OK only then i go on to the next statememnt.

    My Question is, is it necessary that I always wait like this before executing the next statement? If this is the only way, that mean ii will have to write my program to run the first statement, wait for OK then run second statement.....etc et.c... ??

    Wouldn't that be very inefficient? Is there a faster and more convenient way to do this?

    Anyone with such experience, Please advice. Every opinions is greatly appreciated.

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    439
    Hi,

    You can try some delay between these commands, because execution of previous command can be ongoing when following command is started. That can cause problem.

    Regards

    M2M Support

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    19

    RE:

    To go faster:

    1. No need to set every time SCA: Comm.Output = "AT+CSCA=""+60162999902"",145" & Chr(13)

    2. Before sending Comm.Output = "It Works!!" & Chr(26) you must wait for vbCrLf & ">" & vbCrLf from modem. This means that modem is ready to receive message chars.

Posting Permissions

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