- 论坛徽章:
- 0
|
现在我有simcom公司的sim300一块,并配有开通gprs业务中国移动sim卡一张。嵌入式系统是s3c2410,基本的sms业务已经实现了。接下来想通过gprs建立和服务器的通信,所使用的协议是sim300内置的tcp、ip协议栈。
因为UDP比较简单,故采用之。
我的过程如下:
记录一:
Client====please input gprs test AT Cmd or "exit": #系统提示
at+cipcsgp=1,"cmnet"
OK
Client====please input gprs test AT Cmd or "exit":
at+clport="udp","8888" #设定传输模式和端口号
OK
Client====please input gprs test AT Cmd or "exit":
at+cstt
OK
Client====please input gprs test AT Cmd or "exit":
at+ciicr
OK
Client====please input gprs test AT Cmd or "exit":
at+cifsr
10.192.37.195
Client====please input gprs test AT Cmd or "exit":
at+cipstart="udp","219.245.106.114","4567" #设置服务器参数,即将开始传送数据了
CONNECT OK
OK
Client====please input gprs test AT Cmd or "exit":
at+cifsr
10.192.37.195
Client====please input gprs test AT Cmd or "exit":
at+cipstatus
OK
STATE: CONNECT OK
Client====please input gprs test AT Cmd or "exit":
at+cipsend
No data
>
Input data to send to server!(end with "Enter")
23455
No data
#发送失败,在服务器端监听的套接字没有接受到数据
###########################################################
记录二:
Client====please input gprs test AT Cmd or "exit": #系统提示
at+cipcsgp=1,"cmnet"
OK
Client====please input gprs test AT Cmd or "exit":
at+clport="udp","8888"
OK
Client====please input gprs test AT Cmd or "exit":
at+cstt
OK
Client====please input gprs test AT Cmd or "exit":
at+ciicr
OK
Client====please input gprs test AT Cmd or "exit":
at+cifsr
10.196.101.96
Client====please input gprs test AT Cmd or "exit":
at+cipstart="udp","219.245.106.114","4567" #告诉服务器,即将开始发送数据
CONNECT OK
OK
Client====please input gprs test AT Cmd or "exit":
at+cipsend
return with No Data
Input data to send to server!(end with "Enter")
abcdef
return with No Data
Client====please input gprs test AT Cmd or "exit":
at
return with No Data
########################################################
at+cipsend后,始终没有出现期待的send ok
两次尝试均告失败,估计是客户端程序中,数据发送格式有问题,明天期待进一步完善。
~~~
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/104050/showart_2057150.html |
|