Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

SIM800L SMS Issue

Status
Not open for further replies.

Suraj143

Active Member
I want to send 2 SMS messages to 2 admin phone numbers. But the problem is the SMS wont send to the 2nd phone number most of the time. I guess the delay between the 2 messages cause this issue...!! How to do it properly?

Code:
Wait_Button    ----            ;wait until SW pressed
        ----            ;Debounce
        call        Send_SMS_1
        call        Send_SMS_2
        goto        Wait_Input



Send_SMS_1    movlw        'A'
        call        TX_232
        movlw        'T'
        call        TX_232
        movlw        '+'
        call        TX_232
        movlw        'C'
        call        TX_232
        movlw        'M'
        call        TX_232
        movlw        'G'
        call        TX_232
        movlw        'S'
        call        TX_232
        movlw        '='
        call        TX_232           
        ;
        movlw        '"'
        call        TX_232
        movlw        '+'
        call        TX_232
        movlw        'n'
        call        TX_232
        movlw        'n'
        call        TX_232
        movlw        'n'
        call        TX_232
        movlw        'n'
        call        TX_232
        movlw        'n'
        call        TX_232
        movlw        'n'
        call        TX_232
        movlw        'n'
        call        TX_232
        movlw        'n'
        call        TX_232
        movlw        'n'
        call        TX_232
        movlw        'n'
        call        TX_232
        movlw        'n'
        call        TX_232
        movlw        '"'
        call        TX_232
        movlw        .13            ; CR
        call        TX_232
        call        Del_1Sec
        ;
        movlw        'S'
        call        TX_232
        movlw        'M'
        call        TX_232
        movlw        'S'
        call        TX_232
        movlw        '1'
        call        TX_232
        ;
        movlw        .26            ; CTRL + Z
        call        TX_232
        ;
        call        Del_1Sec
        call        Del_1Sec
        call        Del_1Sec
        call        Del_1Sec
        call        Del_1Sec
        call        Del_1Sec        
         return
return
 
You appear to be simply sending two messages via RS232 to your module. Surely there needs to be some code to select the number sent to.

Mike.
Edit, Ahhh, I see, the message contains the AT commands. Are the 'n' entries the number to send to?
 
You appear to be simply sending two messages via RS232 to your module. Surely there needs to be some code to select the number sent to.

Mike.
Edit, Ahhh, I see, the message contains the AT commands. Are the 'n' entries the number to send to?
You got it. The 'n' entries are the mobile number (including country code).I still doubt there should be some delays must be included inside the SMS routine..!!
 
Some old code we used on a Sim900 module, should be very similar to the Sim800
 

Attachments

  • Sim900.ino
    2.6 KB · Views: 222
  • 000910.jpg
    000910.jpg
    27.7 KB · Views: 204
Hi,

We used that code about seven years ago and cannot remember much about it now as we never used that project for long.
Cannot remember the source of the code we used either but as you can see each line is given a small delay so cannot see any problem with leaving it in there, it did work ok.

Ah, just found the original tutorial /code, does not seem to be on the web any more , but we did download it all at the time.
Seems we cannot attach those files direct or as a .zip file to this site.
If you do want them , you could PM us with an email address and we will send them over.

As you can see below those delays and serial prints were specified by the author, not us.

000912.jpg
000911.jpg
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top