Hello, welcome to our forum.

It looks like you have registered but you have not yet posted and messages. Our requirements are that you must post at least two messages, to allow the moderators to review your registration, before you will be allowed access to the full range of forum areas.

Please make a couple of posts, until then you may see a notice that says you are banned from certain forum areas.

Thank you.

Remove Text Formatting

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2004

    Question How do i Send Multiple SMS messages?

    Hello All

    i am presently working on a project which has to send SMS msg when certain conditions are reached.
    this works fine as you can see from the code here.
    my question is "Is it possible to send the same SMS msgs to say 5 different mobile phone numbers without having to do 5 different subs
    as i need to notify 5 different mobile numbers which the same message.


    HSEROUT[ "AT" ,13]                  'Sending "AT" and Carraige return to GSM module
                                  ' If its ok, the it will send a response back : "OK"           
    HSERIN 5000, SMS,[WAIT("OK")]       ' wait for response ok for 5 seconds 
                                        ' if it times out, it will go back to SMS and retry 
    'If GSM Module is OK, will send response "OK"
    ' Other wise it will go back to SMS and retry
    HSEROUT["AT+CMGF=1",13]             'Here the GSM module is being entered in TEXT MODE.
    HSERIN 5000, SMS,[WAIT("OK")]       ' wait for response ok for 5 seconds 
                       ' if it times out, it will go back to SMS and retry
    HSEROUT[ "AT+CMGS=+4475--------"]  'Here the GSM module is told the desitnation phone number.
    'This is done by sending string "AT+CMGS= desitnation mobile number" 
    HSERIN 5000 , SMS, [WAIT(">")]
    HSEROUT[ " Battery Volts too Low" ,10,13]'result
    HSEROUT[ 26] ' this is ASCII for Ctrl+Z
    HSERIN 15000 , SMS,[WAIT("+CMG")]
    'Here we are waiting for a string CMG. If that is received it means that the message
    'has been transmitted successfuly! 
     LCDout I, Clr 
     lcdout I,Line1+3,"  Batt Alert "
     lcdout I,Line2+2," SMS MSG Sent to"
     lcdout I,Line3+2," +4475---------- "
     lcdout I,Line4+4,"  Msg sent OK"
     pause 500

  2. #2
    Join Date
    May 2008

    Default Re: How do i Send Multiple SMS messages?

    Issac, You should write your numbers to eeprom. Say first number form location 0 to 15 (assuming your phones numbers of 15 digits), the 2nd from 16 to 30 and so on.

    Than you will write the start and end reference in an array byte.

    Start[0]=0 ; Last[0]=15 - Start[1]=16; Last[1]=30 ..... And so on.

    Than you make a loop for/next to repeat the number

    For call_numb=0 to 4

    Hserout "AT+CMGS="

    For num = Start[call_numb] To Last[call_numb]
    Read num,send
    Hserout Send
    Next num
    Here your code till Hserin 15000, SMS.....
    Next call_numb

    It should work


    All progress began with an idea

Members who have read this thread : 1

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