金牌会员
 
- 积分
- 1625
- 金钱
- 1625
- 注册时间
- 2014-7-11
- 在线时间
- 285 小时
|
1金钱
MG301为什么能连接上,发送不了数据
本人再做STM32与MG301项目,怎么能连接上,却不能发送数据
程序都正常,发送AT指令都正常,就是服务器收不到数据,请问是怎么回事
Uart2_SendString("AT^SICS=0,conType,GPRS0\r\n");
// delay_ms(800);
// Uart2_SendString("AT^SICS=0,apn,cmnet\r\n");
delay_ms(800);
Uart2_SendString("AT^SISS=0,srvType,Socket\r\n");
delay_ms(800);
Uart2_SendString("AT^SISS=0,conid,0\r\n");
delay_ms(800);
Uart2_SendString("AT^SISS=0,address,\"socktcp://");
Uart2_SendString(ip);
Uart2_SendString("\"\r\n");
这是AT命令,
void Send_LOUDIAN(void)
{
Uart2_SendString("AT^SISW=0,7\r\n");//发送数据长度:2
// UART2_SendLR();
// Delay_nMs(100);
delay_ms(100);
// Uart2_SendStr(uf8);
Uart2_SendString("loudian\r\n"); //回复OK
delay_ms(100);
// Delay_nMs(100);
// CLR_Buf2();
}
这是是发送数据程序,请问是怎么回事,并且一连上就断线
|
|