新手上路
- 积分
- 23
- 金钱
- 23
- 注册时间
- 2020-11-13
- 在线时间
- 6 小时
|
1金钱
unsigned char end_char[2];
end_char[0] = 0x1A;//结束字符
end_char[1] = '\0';
Usart_SendString(USART2, "asdasd\r\n",8);
delay_ms(5000);
Usart_SendString(USART2, "AT+CMGF=1\r\n",11);
delay_ms(5000);
Usart_SendString(USART2, "AT+CSCS=\"GSM\"\r\n",15);
delay_ms(5000);
Usart_SendString(USART2, "AT+CMGS=\"18060616817\"\r\n",23);
delay_ms(5000);
Usart_SendString(USART2, "4856\r\n",6);//短信内容
delay_ms(5000);
Usart_SendString(USART2,end_char,1);
delay_ms(5000);
delay_ms(5000);
这是主要代码,用的板子是stm32f103-ZET6,串口2的数据能正常发送,可是就是发不了短信。
|
|