小学生
最后登录1970-1-1
在线时间 小时
注册时间2020-10-19
|
recv=Join_AP(NetWork_Name,NetWork_Auth,NetWork_Encry,NetWork_KeyWord); //链接wifi
if(recv==1)
{
Build_TCP("TCP","Client",Network_IP,Network_Port); //链接TCP
Mode_STA("AT+WMODE=STA"); //进入sta模式
Sethttp_IP(Network_IP,Network_Port); //配置HTTP
Wifi_SendCmd("AT+HTTPTP=POST",2000); //post请求
Wifi_SendCmd("AT+HTPHEAD=Host:122.112.150.69",2000); //请求头
sprintf(URL,"AT+HTTPPH=%s",Network_URL); //要接受数据的网址
Wifi_SendCmd(URL,2000);
}
sprintf((char *)Json,"MachineId=%d,RecordList=[{\"RecID\":\"%s\",\"ItemIndex\":\"%s\",\"ItemName\":\"%s\",\"SampleName\":\"%s\",\"ChannelID\":\"%s\",\"CalcResult\":\"%s\",\"TxtResult\":\"%s\",\"Supplier\":\"%s\",\"AbsorbX\":\"%s\",\"TestLimit\":\"%s\",\"CheckResult\":\"%s\",\"UintName\":\"%s\",\"Uint\":\"%s\",\"ProducePlace\":\"%s\",\"CodeId\":\"%s\",\"CheckPerson\":\"%s\",\"TestTime\":\"%s\",\"TestDate\":\"%s\"}]",GetLockCode(),RecID,ItemIndex1,ItemName,SampleName,ChannelID,CalcResult,TxtResult,Supplier,AbsorbX,TestLimit,CheckResult,UintName,Uint,ProducePlace,CodeId,CheckPerson,TestTime,TestDate);
//要发送的数据
|
-
-
|