Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

sending message from gsm to txtweb service

shreeshashreesha indiaPosts: 1Member

hello everyone i am trying to send message from gsm to txtweb service special number 51115.here is the code

include "prototype.h"

/************************* GSM INITIALIZATION **********************************/ void gsm_ini() { uart_string("AT"); uart_tx(0x0D); uart_tx(0x0A);
RI = 0; while(uart_rx() != 'K');

uart_string("ATE0");
uart_tx(0x0D); 
uart_tx(0x0A);
while(uart_rx() != 'K');

uart_string("AT+CNMI=2,2,0,0,0");
uart_tx(0x0D); 
uart_tx(0x0A);  
while(uart_rx() != 'K');

uart_string("AT+CMGF=1");
uart_tx(0x0D); 
uart_tx(0x0A);
while(uart_rx() != 'K');

}

/******************************* GSM SENDING ***********************************/ void gsm_send(unsigned char *num) {
uart_string("at+cmgs=\""); uart_string( num ); uart_tx('"');

uart_tx(0x0D); 
uart_tx(0x0A); 

while(uart_rx() != '>');


func();
lcd_cmd(0x01);
lcd_string("Sending....");
    uart_tx(0x1A);

while(uart_rx() != 'K');

lcd_cmd(0x01);
lcd_cmd(0x80);

} /************************** message function ****************************/ void func() { int g; uart_string("HELP ME!!!!!!"); uart_tx(0x0D); uart_tx(0x0A);

    uart_string("lattitude:");
    for(g=18;g<29;g++)
    uart_tx(b[g]);

uart_tx(0x0D); 
uart_tx(0x0A);

    uart_string("longitude:");
        for(g=30;g<42;g++)
        uart_tx(b[g]);

}

but i am failing to send the message .please somebody who used txtweb service before please help.

Answers

Sign In or Register to comment.