|
|
at command
|
|
|
|
sending sms to GSM module |
Code size: | |
Author: | ielectro |
Source files included: | no |
Version: | |
Use circleOS: | no |
Creation date: | 2014-04-20 02:09:31 |
Hardware modification: | no |
Modification date: | 2014-04-20 02:09:56 |
Based on the STM32 Primer: | no |
| |
|
|
Downloads: | 2381 |
Views: | 32724 |
|
|
Vote: |
|
Average ratings: | 0/5 (0 rates) |
Download:
at-command-.zip (2 KB)
Description:i have to configure usart for sending SMS to GSM module (SIM900) via stm32f4 microcontroller i have this error \"incompatible pointer to integer conversion assigning to \'char*\' from \'int\'\" and i don\'t understand how to correct it
please somone can help me
void send_to_sim(char *s)
{
while(*s)
{
USART_SendData(UART4, (unsigned int) *s++);
while(USART_GetFlagStatus(UART4, USART_FLAG_TXE) == RESET); //USART_FLAG_TXE : Transmit data register empty flag
}
}
void send_sms ( char* number,char* text_sms)
{ char* data ;
USART_Init( UART4 , &GSM_InitStruct) ;
data = sprintf ( \"AT+CMGS %s%s\",number,text_sms); //error
USART_Cmd(UART4,ENABLE);
USART_LINCmd(UART4,ENABLE);
USART_SendBreak(UART4);
send_to_sim( data);
while(USART_GetFlagStatus(UART4, USART_FLAG_TC) == RESET)
{
}
}
|
|
|
|
|