Tool/software: Code Composer Studio
Hi all,
I am trying to implement a project to send a SMS using MSP430F2416 with SIM800L GSM module. The code has been developed in CCS 6.0.1 compiler. Here with i have attached the code which I have developed. The issue for me is always my mobile receive empty SMS only, whevever the AT command has been sent via msp430 UART. So i have tried to send AT commands to SIM800L module via PC using hyper terminal, in this test theSMS text is successfully received the mobile. The only difference I have seen is the recognition of the CTRL+Z (char(26)).
Also I have tried with SIM900 GSM module and msp430 (Sending AT commands via UART), for this case the SMS text is successfully received.
Since the msp30 is working with SIM900 module, and SIM800L is working fine with hyperterminal communication, with this testing results I can ensure there won't be any problem in MSP430 as well SIM800L module. Whenever I am trying to communicate with SIM800L via MSP430 UART the empty SMS only received to the mobile. I am unable to find any clue to solve this.
But the SIM800L module size is comparatively smaller than SIM900 module. So I have to use only SIM 800L module. Does anyone else faced such a kind of issue? Will this problem arise because of any compiler issue?
The UART driver has been implemented in polling method.
Thanks in advance.
#include<msp430.h> #include <stdint.h> #include <string.h> #include <stdlib.h> #include <uart.h> unsigned char ctrlz = (char)26; unsigned char at[4] = {"AT\r\n"}; unsigned char cmgf[13] = {"AT+CMGF=1\r\n"}; unsigned char cmgs[30] = {"AT+CMGS=\"+919001111111\"\r\n"}; //SMS number int main(void) { WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer uint8_t index = 0, i = 0; uint32_t k = 0; int ind = 0; unsigned char tmpLatLong[10] = {0}; unsigned char txfrBuffer[1]='a'; //__bis_SR_register(GIE); // interrupts enabled Uart_Open(1); Uart_Open(0); Uart_TXn(&at[0],4, 1); k = 200000; do{ --k; } while(k > 0); Uart_TXn(&cmgf[0],sizeof(cmgf),1); k = 200000; do{ --k; } while(k > 0); Uart_TXn(&cmgs[0],sizeof(cmgs), 1); k = 200000; do{ --k; } while(k > 0); Uart_TXn(&txfrBuffer[0], sizeof(txfrBuffer), 1); k = 2000000; do{ --k; } while(k > 0); Uart_TXn(&ctrlz, sizeof(ctrlz), 1); k = 200000; do{ --k; } while(k > 0); while(1); }