I am using sim868 module interface with msp432p401r controller through serial communication. I want to post the data on server.But code is not posting the data.When i send"AT+HTTPREAD"command to sim868 from msp432 i got response{}( blank bracket). I am sending " AT+HTTPDATA=192, 10000" command to sim868 i got response " DOWNLOAD" and after 10000 ms i got ok response also.the data will post within 10000 ms.
Below is my code:-
UART initialize();
uart_puts((char *)"AT"); // COMMAND FOR INITIALIZING GSM
uart_putc(0x0D);//CARRIAGE RETURN
__delay_cycles(1000000);//DELAY...WAIT FOR OK FROM GSM
ok_response();
uart_puts((char *)"AT+SAPBR=3,1,\"Contype\",\"GPRS\""); // COMMAND FOR INITIALIZING GSM
uart_putc(0x0D);//CARRIAGE RETURN
__delay_cycles(1000000);//DELAY...WAIT FOR OK FROM GSM
ok_response();
uart_puts((char *)"AT+SAPBR=3,1,\"APN\",\"internet\"");//SEND A MESSAGE TO PARTICULAR NUMBER
uart_putc(0x0D);
__delay_cycles(1000000);//DELAY...WAIT FOR OK FROM GSM
ok_response();
uart_puts((char *)"AT+CGATT=1"); // AT commands to initialize gsm modem
uart_putc(0x0D);
__delay_cycles(1000000);//DELAY...WAIT FOR OK FROM GSM
ok_response();
uart_puts((char *)"AT+SAPBR=1,1"); // AT commands to initialize gsm modem
uart_putc(0x0D);
__delay_cycles(100000000);//DELAY...WAIT FOR OK FROM GSM
ok_response();
uart_puts((char *)"AT+SAPBR=2,1"); // AT commands to initialize gsm modem
uart_putc(0x0D);
__delay_cycles(1000000);//DELAY...WAIT FOR OK FROM GSM
ok_response();
uart_puts((char *)"AT+HTTPINIT"); // AT commands to initialize gsm modem
uart_putc(0x0D);
__delay_cycles(1000000);//DELAY...WAIT FOR OK FROM GSM
ok_response();
uart_puts((char *)"AT+HTTPPARA=\"CID\",1"); // AT commands to initialize gsm modem
uart_putc(0x0D);
__delay_cycles(1000000);//DELAY...WAIT FOR OK FROM GSM
ok_response();
uart_puts((char *)"AT+HTTPPARA=\"URL\",http://resonics.xyz:8995/submit/data"); // AT commands to initialize gsm modem
uart_putc(0x0D);
__delay_cycles(1000000);//DELAY...WAIT FOR OK FROM GSM
ok_response();
uart_puts((char *)"AT+HTTPPARA=\"CONTENT\",\"application/x-www-form-urlencoded\""); // AT commands to initialize gsm modem
uart_putc(0x0D);
__delay_cycles(1000000);//DELAY...WAIT FOR OK FROM GSM
ok_response();
((char *)"AT+HTTPDATA=99,100000"); // AT commands to initialize gsm modem
uart_putc(0x0D);
__delay_cycles(5000000);
b=a;
if( buff[b-3]=='D')
{
count=count+1;
__delay_cycles(5000000);
uart_puts((char *)"{ \"testID\" : 1, \"testLevel\" : 1, }"); // AT commands to initialize gsm modem
uart_putc(0x0D);
__delay_cycles(5000000); //DELAY...WAIT FOR OK FROM GSM
}
else
{
variable=variable+1;
}
uart_puts((char *)"AT+HTTPACTION=1");
uart_putc(0x0D);
__delay_cycles(5000000);//DELAY...WAIT FOR OK FROM GSM
ok_response();
uart_puts((char *)"AT+HTTPREAD");
uart_putc(0x0D);
__delay_cycles(5000000);//DELAY...WAIT FOR OK FROM GSM
// UART interrupt service routine
void EUSCIA0_IRQHandler(void)
{
if (EUSCI_A0->IFG & EUSCI_A_IFG_RXIFG)
{
EUSCI_A0->IFG &=~ EUSCI_A_IFG_RXIFG;// Clear interrupt
// Echo the received character back
buff[a]= EUSCI_A0->RXBUF;
a++;
}
}
Please help me ??