UART1_SendString("AT+CIPCLOSE=1"); //关闭连接 delay_ms(100); Second_AT_Command("AT+CIPSHUT","SHUT OK",2); //关闭移动场景 Second_AT_Command("AT+CGCLASS="B"","OK",2);//设置GPRS移动台类别为B,支持包交换和数据交换 Second_AT_Command("AT+CGDCONT=1,"IP","CMNET"","OK",2);//设置PDP上下文,互联网接协议,接入点等信息 Second_AT_Command("AT+CGATT=1","OK",2);//附着GPRS业务 Second_AT_Command("AT+CIPCSGP=1,"CMNET"","OK",2);//设置为GPRS连接模式 Second_AT_Command("AT+CIPMUX=0","OK",2);//设置为单路连接 Second_AT_Command("AT+CIPHEAD=1","OK",2);//设置接收数据显示IP头(方便判断数据来源,仅在单路连接有效) Second_AT_Command("AT+CIPMODE=1","OK",2);//打开透传功能 Second_AT_Command("AT+CIPCCFG=5,2,200,1,0,200,50","OK",2);//配置透传模式:单包重发次数:5,间隔400mS认为一帧结束,每次发送200的字节,每次接收200字节 Second_AT_Command((char*)string,"OK",5);//建立连接,进入透传模式